jwanative.pas 757 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043
  1. {******************************************************************************}
  2. { }
  3. { Interface unit for the Windows NT Native API }
  4. { Copyright (C) 1999, 2000, 2005 Marcel van Brakel (brakelm) }
  5. { Copyright (C) 2000-2001, 2005 Oliver Schneider (assarbad) }
  6. { }
  7. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
  8. { }
  9. { You may retrieve the latest version of this file at the Project JEDI }
  10. { APILIB home page, located at http://jedi-apilib.sourceforge.net }
  11. { }
  12. { The contents of this file are used with permission, subject to the Mozilla }
  13. { Public License Version 1.1 (the "License"); you may not use this file except }
  14. { in compliance with the License. You may obtain a copy of the License at }
  15. { http://www.mozilla.org/MPL/MPL-1.1.html }
  16. { }
  17. { Software distributed under the License is distributed on an "AS IS" basis, }
  18. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  19. { the specific language governing rights and limitations under the License. }
  20. { }
  21. { Alternatively, the contents of this file may be used under the terms of the }
  22. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  23. { provisions of the LGPL License are applicable instead of those above. }
  24. { If you wish to allow use of your version of this file only under the terms }
  25. { of the LGPL License and not to allow others to use your version of this file }
  26. { under the MPL, indicate your decision by deleting the provisions above and }
  27. { replace them with the notice and other provisions required by the LGPL }
  28. { License. If you do not delete the provisions above, a recipient may use }
  29. { your version of this file under either the MPL or the LGPL License. }
  30. { }
  31. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  32. { }
  33. {******************************************************************************}
  34. // $Id: JwaNative.pas,v 1.21 2005/09/03 14:27:48 marquardt Exp $
  35. {******************************************************************************}
  36. {** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING **}
  37. {******************************************************************************}
  38. {** **}
  39. {** The prototypes, declarations and information in this file has been **}
  40. {** compiled from various sources as well as through reverse engineering **}
  41. {** techniques. We make no guarantee as to the correctness of the contents. **}
  42. {** Caution is recommended, USE AT YOUR OWN RISK. **}
  43. {** **}
  44. {******************************************************************************}
  45. {** About the Native API ** }
  46. {******************************************************************************}
  47. {** **}
  48. {** The functions herein are usually referred to as the NT Native API. **}
  49. {** The Native API is subdivided into several functional categories, which **}
  50. {** you can distinguish by the function name prefix: **}
  51. {** **}
  52. {** Cc = Cache Controller **}
  53. {** Cm = Configuration Manager **}
  54. {** Csr = Client Server support functions (LPC; related: CSRSS.EXE) **}
  55. {** Dbg = Debugger support functions **}
  56. {** Etw = Event Tracing for Windows **}
  57. {** Ex = Executive **}
  58. {** Fs = File system support functions **}
  59. {** Hal = Hardware abstraction layer functions **}
  60. {** Inbv = Something like: _In_itial _B_oot _V_ideo functions **}
  61. {** Io = I/O manager support functions **}
  62. {** Kd = Kernel debugger support functions **}
  63. {** Ke = General Kernel **}
  64. {** Ki = Kernel internal support functions (???) **}
  65. {** Ldr = PE image loader support functions **}
  66. {** Lpc = LPC support functions **}
  67. {** Lsa = Local security authority support functions **}
  68. {** Mm = Memory manager support functions **}
  69. {** Nls = National Language Support **}
  70. {** Nt = Generic Native APIs **}
  71. {** Ob = Object manager functions **}
  72. {** Pfx = Name prefix support functions (???) **}
  73. {** Po = Power management support functions **}
  74. {** Ps = Process management support functions **}
  75. {** Rtl = Runtime library functions **}
  76. {** Rtlp = Private runtime library functions 1) **}
  77. {** Se = Security support functions **}
  78. {** Wmi = Windows management instrumentation support functions **}
  79. {** Vf = Driver Verifier **}
  80. {** Zw = Nt* counterparts. Zw == "Zero Warranty"??? **}
  81. {** 1) "p" after the prefix means "private" **}
  82. {** **}
  83. {** The Native API is split into a user mode component (mainly NTDLL.DLL) **}
  84. {** and a kernel mode component (mainly NTOSKRNL.EXE). While a large part of **}
  85. {** the Native API is available both from usermode and kernelmode, some **}
  86. {** functions are exclusive to either mode. This unit only deals with **}
  87. {** functions that are available to usermode code. **}
  88. {** **}
  89. {** Note that the functions prefixed with "Nt" and "Zw" usually appear in **}
  90. {** pairs, though not always! For details see http://native.assarbad.net **}
  91. {** **}
  92. {** Most of the Native API is undocumented. However, Microsoft recently **}
  93. {** started to document a subset of the API in "winternl.h" in the Platform **}
  94. {** SDK. A small part of the Native API functions, specifically those useful **}
  95. {** for kernel mode development (device drivers) are documented in the DDK. **}
  96. {** **}
  97. {******************************************************************************}
  98. {** Special notes **}
  99. {******************************************************************************}
  100. {** **}
  101. {** Some functions herein have been implemented instead of being imported. **}
  102. {** That's due to the fact, that the FASTCALL calling convention is not **}
  103. {** available in Delphi. These functions include: **}
  104. {** - RtlUshortByteSwap() **}
  105. {** - RtlUlongByteSwap() **}
  106. {** - RtlUlonglongByteSwap() **}
  107. {** **}
  108. {** Other functions are implemented and also imported, but have been made **}
  109. {** available for OS versions not actually supporting them. These are: **}
  110. {** - RtlGetLastWin32Error() **}
  111. {** - RtlSetLastWin32Error() **}
  112. {** **}
  113. {** Starting with Windows XP, the Kernel32!GetLastError() and counterpart **}
  114. {** Kernel32!SetLastError() have been moved into NTDLL and are only function **}
  115. {** forwarders to the NTDLL functions with the names above. **}
  116. {** By importing them directly from Kernel32.dll via their old names we **}
  117. {** enable you to use these functions transparently without regard to the OS **}
  118. {** version. **}
  119. {** **}
  120. {** RtlCopyMemory() had to be implemented via Delphi means because it's only **}
  121. {** a macro (pointing to memcpy) in the C-world. **}
  122. {** **}
  123. {** Last but not least we've implemented our own versions of some of the **}
  124. {** functions available through NTDLL [declared private Ntp*, Rtlp*]: **}
  125. {** - NtpGetProcessHeap() **}
  126. {** - NtpCurrentTeb() **}
  127. {** - RtlpGetCurrentPeb() **}
  128. {** **}
  129. {** Plus a function that is available starting from Windows XP, but could be **}
  130. {** useful on earlier versions as well [declared private Rtlp*]: **}
  131. {** - RtlpValidateUnicodeString() **}
  132. {** **}
  133. {** And our own flavor of it, omitting the first (currently unused) **}
  134. {** parameter: **}
  135. {** - RtlpValidateUnicodeString2() **}
  136. {** **}
  137. {******************************************************************************}
  138. {** References, Tools, Docs **}
  139. {******************************************************************************}
  140. {** **}
  141. {** - Windows NT/2000 Native API References (Gary Nebbett) **}
  142. {** ISBN 1-57870-199-6 **}
  143. {** - Undocumented Windows 2000 Secrets (Sven B. Schreiber) **}
  144. {** ISBN 0-201-72187-2 **}
  145. {** - Undocumented Windows NT (Prasad Dabak, Sandeep Phadke, Milind Borate) **}
  146. {** ISBN 0-7645-4569-8 **}
  147. {** - Platform SDK for Windows 2003 Server (or later version) **}
  148. {** http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ **}
  149. {** - Windows 2003 DDK (or similar DDK version **}
  150. {** http://www.microsoft.com/whdc/ddk/ **}
  151. {** - WinDbg - a debugger that is usually badly underestimated! **}
  152. {** http://www.microsoft.com/whdc/devtools/debugging **}
  153. {** - IDA Pro Standard 4.7 (or later) - world's best disassembler **}
  154. {** http://www.datarescue.com/idabase/ **}
  155. {** - NTDEV, NTFSD, WINDBG mailing lists and more ... **}
  156. {** http://www.osronline.com/ **}
  157. {** - Sysinternals tools and documentation of some "Windows secrets" **}
  158. {** http://www.sysinternals.com/ **}
  159. {** - A nicely done online compilation of NT Native APIs **}
  160. {** http://undocumented.ntinternals.net/ **}
  161. {** - ReactOS (to cross-check own assumptions with those of other smart guys)**}
  162. {** http://www.reactos.com/ **}
  163. {** **}
  164. {******************************************************************************}
  165. unit JwaNative;
  166. interface
  167. {$INCLUDE jediapilib.inc}
  168. uses
  169. JwaWinType, JwaWinBase, JwaNTStatus, JwaWinNT;
  170. {$WEAKPACKAGEUNIT}
  171. // For native APIs we consider RTDL the better method of importing
  172. {$DEFINE RTDL}
  173. {$IFDEF RTDL}{$DEFINE DYNAMIC_LINK}{$ENDIF}
  174. const
  175. ntdll = 'ntdll.dll';
  176. //------------------------------------------------------------------------------
  177. type
  178. _CLIENT_ID = record
  179. UniqueProcess: HANDLE;
  180. UniqueThread: HANDLE;
  181. end;
  182. CLIENT_ID = _CLIENT_ID;
  183. PCLIENT_ID = ^CLIENT_ID;
  184. TClientID = CLIENT_ID;
  185. PClientID = ^TClientID;
  186. KPRIORITY = LONG;
  187. _KWAIT_REASON = (
  188. Executive,
  189. FreePage,
  190. PageIn,
  191. PoolAllocation,
  192. DelayExecution,
  193. Suspended,
  194. UserRequest,
  195. WrExecutive,
  196. WrFreePage,
  197. WrPageIn,
  198. WrPoolAllocation,
  199. WrDelayExecution,
  200. WrSuspended,
  201. WrUserRequest,
  202. WrEventPair,
  203. WrQueue,
  204. WrLpcReceive,
  205. WrLpcReply,
  206. WrVirtualMemory,
  207. WrPageOut,
  208. WrRendezvous,
  209. Spare2,
  210. Spare3,
  211. Spare4,
  212. Spare5,
  213. Spare6,
  214. WrKernel,
  215. MaximumWaitReason);
  216. KWAIT_REASON = _KWAIT_REASON;
  217. TKWaitReason = KWAIT_REASON;
  218. _VM_COUNTERS = record
  219. PeakVirtualSize: SIZE_T;
  220. VirtualSize: SIZE_T;
  221. PageFaultCount: ULONG;
  222. PeakWorkingSetSize: SIZE_T;
  223. WorkingSetSize: SIZE_T;
  224. QuotaPeakPagedPoolUsage: SIZE_T;
  225. QuotaPagedPoolUsage: SIZE_T;
  226. QuotaPeakNonPagedPoolUsage: SIZE_T;
  227. QuotaNonPagedPoolUsage: SIZE_T;
  228. PagefileUsage: SIZE_T;
  229. PeakPagefileUsage: SIZE_T;
  230. end;
  231. VM_COUNTERS = _VM_COUNTERS;
  232. PVM_COUNTERS = ^VM_COUNTERS;
  233. TVmCounters = VM_COUNTERS;
  234. PVmCounters = ^TVmCounters;
  235. const
  236. NonPagedPool = 0;
  237. PagedPool = 1;
  238. NonPagedPoolMustSucceed = 2;
  239. DontUseThisType = 3;
  240. NonPagedPoolCacheAligned = 4;
  241. PagedPoolCacheAligned = 5;
  242. NonPagedPoolCacheAlignedMustS = 6;
  243. MaxPoolType = 7;
  244. NonPagedPoolSession = 32;
  245. PagedPoolSession = NonPagedPoolSession + 1;
  246. NonPagedPoolMustSucceedSession = PagedPoolSession + 1;
  247. DontUseThisTypeSession = NonPagedPoolMustSucceedSession + 1;
  248. NonPagedPoolCacheAlignedSession = DontUseThisTypeSession + 1;
  249. PagedPoolCacheAlignedSession = NonPagedPoolCacheAlignedSession + 1;
  250. NonPagedPoolCacheAlignedMustSSession = PagedPoolCacheAlignedSession + 1;
  251. type
  252. POOL_TYPE = NonPagedPool..NonPagedPoolCacheAlignedMustSSession;
  253. _IO_STATUS_BLOCK = record
  254. //union {
  255. Status: NTSTATUS;
  256. // PVOID Pointer;
  257. //}
  258. Information: ULONG_PTR;
  259. end;
  260. IO_STATUS_BLOCK = _IO_STATUS_BLOCK;
  261. PIO_STATUS_BLOCK = ^IO_STATUS_BLOCK;
  262. TIoStatusBlock = IO_STATUS_BLOCK;
  263. PIoStatusBlock = ^TIoStatusBlock;
  264. const
  265. ViewShare = 1;
  266. ViewUnmap = 2;
  267. type
  268. SECTION_INHERIT = ViewShare..ViewUnmap;
  269. _THREADINFOCLASS = (
  270. ThreadBasicInformation,
  271. ThreadTimes,
  272. ThreadPriority,
  273. ThreadBasePriority,
  274. ThreadAffinityMask,
  275. ThreadImpersonationToken,
  276. ThreadDescriptorTableEntry,
  277. ThreadEnableAlignmentFaultFixup,
  278. ThreadEventPair_Reusable,
  279. ThreadQuerySetWin32StartAddress,
  280. ThreadZeroTlsCell,
  281. ThreadPerformanceCount,
  282. ThreadAmILastThread,
  283. ThreadIdealProcessor,
  284. ThreadPriorityBoost,
  285. ThreadSetTlsArrayAddress,
  286. ThreadIsIoPending,
  287. ThreadHideFromDebugger,
  288. ThreadBreakOnTermination, // was added in XP - used by RtlSetThreadIsCritical()
  289. MaxThreadInfoClass);
  290. THREADINFOCLASS = _THREADINFOCLASS;
  291. THREAD_INFORMATION_CLASS = THREADINFOCLASS;
  292. TThreadInfoClass = THREADINFOCLASS;
  293. KAFFINITY = ULONG;
  294. PKAFFINITY = ^KAFFINITY;
  295. PKNORMAL_ROUTINE = procedure(NormalContext, SystemArgument1, SystemArgument2: PVOID); stdcall;
  296. _PROCESSINFOCLASS = (
  297. ProcessBasicInformation,
  298. ProcessQuotaLimits,
  299. ProcessIoCounters,
  300. ProcessVmCounters,
  301. ProcessTimes,
  302. ProcessBasePriority,
  303. ProcessRaisePriority,
  304. ProcessDebugPort,
  305. ProcessExceptionPort,
  306. ProcessAccessToken,
  307. ProcessLdtInformation,
  308. ProcessLdtSize,
  309. ProcessDefaultHardErrorMode,
  310. ProcessIoPortHandlers, // Note: this is kernel mode only
  311. ProcessPooledUsageAndLimits,
  312. ProcessWorkingSetWatch,
  313. ProcessUserModeIOPL,
  314. ProcessEnableAlignmentFaultFixup,
  315. ProcessPriorityClass,
  316. ProcessWx86Information,
  317. ProcessHandleCount,
  318. ProcessAffinityMask,
  319. ProcessPriorityBoost,
  320. ProcessDeviceMap,
  321. ProcessSessionInformation,
  322. ProcessForegroundInformation,
  323. ProcessWow64Information, // = 26
  324. ProcessImageFileName, // added after W2K
  325. ProcessLUIDDeviceMapsEnabled,
  326. ProcessBreakOnTermination, // used by RtlSetProcessIsCritical()
  327. ProcessDebugObjectHandle,
  328. ProcessDebugFlags,
  329. ProcessHandleTracing,
  330. MaxProcessInfoClass);
  331. PROCESSINFOCLASS = _PROCESSINFOCLASS;
  332. PROCESS_INFORMATION_CLASS = PROCESSINFOCLASS;
  333. TProcessInfoClass = PROCESSINFOCLASS;
  334. _KPROFILE_SOURCE = (
  335. ProfileTime,
  336. ProfileAlignmentFixup,
  337. ProfileTotalIssues,
  338. ProfilePipelineDry,
  339. ProfileLoadInstructions,
  340. ProfilePipelineFrozen,
  341. ProfileBranchInstructions,
  342. ProfileTotalNonissues,
  343. ProfileDcacheMisses,
  344. ProfileIcacheMisses,
  345. ProfileCacheMisses,
  346. ProfileBranchMispredictions,
  347. ProfileStoreInstructions,
  348. ProfileFpInstructions,
  349. ProfileIntegerInstructions,
  350. Profile2Issue,
  351. Profile3Issue,
  352. Profile4Issue,
  353. ProfileSpecialInstructions,
  354. ProfileTotalCycles,
  355. ProfileIcacheIssues,
  356. ProfileDcacheAccesses,
  357. ProfileMemoryBarrierCycles,
  358. ProfileLoadLinkedIssues,
  359. ProfileMaximum);
  360. KPROFILE_SOURCE = _KPROFILE_SOURCE;
  361. TKProfileSource = KPROFILE_SOURCE;
  362. PIO_APC_ROUTINE = procedure(ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Reserved: ULONG); stdcall;
  363. _FILE_FULL_EA_INFORMATION = record
  364. NextEntryOffset: ULONG;
  365. Flags: UCHAR;
  366. EaNameLength: UCHAR;
  367. EaValueLength: USHORT;
  368. EaName: array[0..0] of CHAR;
  369. end;
  370. FILE_FULL_EA_INFORMATION = _FILE_FULL_EA_INFORMATION;
  371. PFILE_FULL_EA_INFORMATION = ^FILE_FULL_EA_INFORMATION;
  372. TFileFullEaInformation = FILE_FULL_EA_INFORMATION;
  373. PFileFullEaInformation = ^TFileFullEaInformation;
  374. _FSINFOCLASS = (
  375. FileFsFiller0,
  376. FileFsVolumeInformation, // 1
  377. FileFsLabelInformation, // 2
  378. FileFsSizeInformation, // 3
  379. FileFsDeviceInformation, // 4
  380. FileFsAttributeInformation, // 5
  381. FileFsControlInformation, // 6
  382. FileFsFullSizeInformation, // 7
  383. FileFsObjectIdInformation, // 8
  384. FileFsMaximumInformation);
  385. FS_INFORMATION_CLASS = _FSINFOCLASS;
  386. PFS_INFORMATION_CLASS = ^FS_INFORMATION_CLASS;
  387. TFsInformationClass = FS_INFORMATION_CLASS;
  388. PFsInformationClass = ^TFsInformationClass;
  389. UUID = GUID;
  390. _FILE_BASIC_INFORMATION = record
  391. CreationTime: LARGE_INTEGER;
  392. LastAccessTime: LARGE_INTEGER;
  393. LastWriteTime: LARGE_INTEGER;
  394. ChangeTime: LARGE_INTEGER;
  395. FileAttributes: ULONG;
  396. end;
  397. FILE_BASIC_INFORMATION = _FILE_BASIC_INFORMATION;
  398. PFILE_BASIC_INFORMATION = ^FILE_BASIC_INFORMATION;
  399. TFileBasicInformation = FILE_BASIC_INFORMATION;
  400. PFileBasicInformation = ^TFileBasicInformation;
  401. _FILE_NETWORK_OPEN_INFORMATION = record
  402. CreationTime: LARGE_INTEGER;
  403. LastAccessTime: LARGE_INTEGER;
  404. LastWriteTime: LARGE_INTEGER;
  405. ChangeTime: LARGE_INTEGER;
  406. AllocationSize: LARGE_INTEGER;
  407. EndOfFile: LARGE_INTEGER;
  408. FileAttributes: ULONG;
  409. end;
  410. FILE_NETWORK_OPEN_INFORMATION = _FILE_NETWORK_OPEN_INFORMATION;
  411. PFILE_NETWORK_OPEN_INFORMATION = ^FILE_NETWORK_OPEN_INFORMATION;
  412. TFileNetworkOpenInformation = FILE_NETWORK_OPEN_INFORMATION;
  413. PFileNetworkOpenInformation = ^TFileNetworkOpenInformation;
  414. _FILE_INFORMATION_CLASS = (
  415. FileFiller0,
  416. FileDirectoryInformation, // 1
  417. FileFullDirectoryInformation, // 2
  418. FileBothDirectoryInformation, // 3
  419. FileBasicInformation, // 4 wdm
  420. FileStandardInformation, // 5 wdm
  421. FileInternalInformation, // 6
  422. FileEaInformation, // 7
  423. FileAccessInformation, // 8
  424. FileNameInformation, // 9
  425. FileRenameInformation, // 10
  426. FileLinkInformation, // 11
  427. FileNamesInformation, // 12
  428. FileDispositionInformation, // 13
  429. FilePositionInformation, // 14 wdm
  430. FileFullEaInformation, // 15
  431. FileModeInformation, // 16
  432. FileAlignmentInformation, // 17
  433. FileAllInformation, // 18
  434. FileAllocationInformation, // 19
  435. FileEndOfFileInformation, // 20 wdm
  436. FileAlternateNameInformation, // 21
  437. FileStreamInformation, // 22
  438. FilePipeInformation, // 23
  439. FilePipeLocalInformation, // 24
  440. FilePipeRemoteInformation, // 25
  441. FileMailslotQueryInformation, // 26
  442. FileMailslotSetInformation, // 27
  443. FileCompressionInformation, // 28
  444. FileObjectIdInformation, // 29
  445. FileCompletionInformation, // 30
  446. FileMoveClusterInformation, // 31
  447. FileQuotaInformation, // 32
  448. FileReparsePointInformation, // 33
  449. FileNetworkOpenInformation, // 34
  450. FileAttributeTagInformation, // 35
  451. FileTrackingInformation, // 36
  452. FileMaximumInformation);
  453. FILE_INFORMATION_CLASS = _FILE_INFORMATION_CLASS;
  454. PFILE_INFORMATION_CLASS = ^FILE_INFORMATION_CLASS;
  455. TFileInformationClass = FILE_INFORMATION_CLASS;
  456. PFileInformationClass = ^TFileInformationClass;
  457. _FILE_STANDARD_INFORMATION = record
  458. AllocationSize: LARGE_INTEGER;
  459. EndOfFile: LARGE_INTEGER;
  460. NumberOfLinks: ULONG;
  461. DeletePending: ByteBool;
  462. Directory: ByteBool;
  463. end;
  464. FILE_STANDARD_INFORMATION = _FILE_STANDARD_INFORMATION;
  465. PFILE_STANDARD_INFORMATION = ^FILE_STANDARD_INFORMATION;
  466. TFileStandardInformation = FILE_STANDARD_INFORMATION;
  467. PFileStandardInformation = ^TFileStandardInformation;
  468. _FILE_POSITION_INFORMATION = record
  469. CurrentByteOffset: LARGE_INTEGER;
  470. end;
  471. FILE_POSITION_INFORMATION = _FILE_POSITION_INFORMATION;
  472. PFILE_POSITION_INFORMATION = ^FILE_POSITION_INFORMATION;
  473. TFilePositionInformation = FILE_POSITION_INFORMATION;
  474. PFilePositionInformation = ^TFilePositionInformation;
  475. _FILE_ALIGNMENT_INFORMATION = record
  476. AlignmentRequirement: ULONG;
  477. end;
  478. FILE_ALIGNMENT_INFORMATION = _FILE_ALIGNMENT_INFORMATION;
  479. PFILE_ALIGNMENT_INFORMATION = ^FILE_ALIGNMENT_INFORMATION;
  480. TFileAlignmentInformation = FILE_ALIGNMENT_INFORMATION;
  481. PFileAlignmentInformation = ^TFileAlignmentInformation;
  482. _KEY_SET_INFORMATION_CLASS = (KeyWriteTimeInformation);
  483. KEY_SET_INFORMATION_CLASS = _KEY_SET_INFORMATION_CLASS;
  484. _KEY_INFORMATION_CLASS = (
  485. KeyBasicInformation,
  486. KeyNodeInformation,
  487. KeyFullInformation,
  488. KeyNameInformation);
  489. KEY_INFORMATION_CLASS = _KEY_INFORMATION_CLASS;
  490. TKeyInformationClass = KEY_INFORMATION_CLASS;
  491. _KEY_VALUE_INFORMATION_CLASS = (
  492. KeyValueBasicInformation,
  493. KeyValueFullInformation,
  494. KeyValuePartialInformation,
  495. KeyValueFullInformationAlign64,
  496. KeyValuePartialInformationAlign64);
  497. KEY_VALUE_INFORMATION_CLASS = _KEY_VALUE_INFORMATION_CLASS;
  498. TKeyValueInformationClass = KEY_VALUE_INFORMATION_CLASS;
  499. _KEY_VALUE_ENTRY = record
  500. ValueName: PUNICODE_STRING;
  501. DataLength: ULONG;
  502. DataOffset: ULONG;
  503. Type_: ULONG;
  504. end;
  505. KEY_VALUE_ENTRY = _KEY_VALUE_ENTRY;
  506. PKEY_VALUE_ENTRY = ^KEY_VALUE_ENTRY;
  507. TKeyValueEntry = KEY_VALUE_ENTRY;
  508. PKeyValueEntry = ^TKeyValueEntry;
  509. _DEVICE_POWER_STATE = (
  510. PowerDeviceUnspecified,
  511. PowerDeviceD0,
  512. PowerDeviceD1,
  513. PowerDeviceD2,
  514. PowerDeviceD3,
  515. PowerDeviceMaximum);
  516. DEVICE_POWER_STATE = _DEVICE_POWER_STATE;
  517. PDEVICE_POWER_STATE = ^DEVICE_POWER_STATE;
  518. TDevicePowerState = DEVICE_POWER_STATE;
  519. POWER_ACTION = (
  520. PowerActionNone,
  521. PowerActionReserved,
  522. PowerActionSleep,
  523. PowerActionHibernate,
  524. PowerActionShutdown,
  525. PowerActionShutdownReset,
  526. PowerActionShutdownOff,
  527. PowerActionWarmEject);
  528. PPOWER_ACTION = ^POWER_ACTION;
  529. TPowerAction = POWER_ACTION;
  530. _SYSTEM_POWER_STATE = (
  531. PowerSystemUnspecified,
  532. PowerSystemWorking,
  533. PowerSystemSleeping1,
  534. PowerSystemSleeping2,
  535. PowerSystemSleeping3,
  536. PowerSystemHibernate,
  537. PowerSystemShutdown,
  538. PowerSystemMaximum);
  539. SYSTEM_POWER_STATE = _SYSTEM_POWER_STATE;
  540. PSYSTEM_POWER_STATE = ^SYSTEM_POWER_STATE;
  541. TSystemPowerState = SYSTEM_POWER_STATE;
  542. POWER_INFORMATION_LEVEL = (
  543. SystemPowerPolicyAc,
  544. SystemPowerPolicyDc,
  545. VerifySystemPolicyAc,
  546. VerifySystemPolicyDc,
  547. SystemPowerCapabilities,
  548. SystemBatteryState,
  549. SystemPowerStateHandler,
  550. ProcessorStateHandler,
  551. SystemPowerPolicyCurrent,
  552. AdministratorPowerPolicy,
  553. SystemReserveHiberFile,
  554. ProcessorInformation,
  555. SystemPowerInformation);
  556. TPowerInformationLevel = POWER_INFORMATION_LEVEL;
  557. _RTL_RANGE = record
  558. // The start of the range
  559. Start: ULONGLONG; // Read only
  560. // The end of the range
  561. End_: ULONGLONG; // Read only
  562. // Data the user passed in when they created the range
  563. UserData: PVOID; // Read/Write
  564. // The owner of the range
  565. Owner: PVOID; // Read/Write
  566. // User defined flags the user specified when they created the range
  567. Attributes: UCHAR; // Read/Write
  568. // Flags (RTL_RANGE_*)
  569. Flags: UCHAR; // Read only
  570. end;
  571. RTL_RANGE = _RTL_RANGE;
  572. PRTL_RANGE = ^RTL_RANGE;
  573. TRtlRange = RTL_RANGE;
  574. PRtlRange = ^TRtlRange;
  575. const
  576. RTL_RANGE_SHARED = $01;
  577. RTL_RANGE_CONFLICT = $02;
  578. type
  579. _RTL_RANGE_LIST = record
  580. // The list of ranges
  581. ListHead: LIST_ENTRY;
  582. // These always come in useful
  583. Flags: ULONG; // use RANGE_LIST_FLAG_*
  584. // The number of entries in the list
  585. Count: ULONG;
  586. // Every time an add/delete operation is performed on the list this is
  587. // incremented. It is checked during iteration to ensure that the list
  588. // hasn't changed between GetFirst/GetNext or GetNext/GetNext calls
  589. Stamp: ULONG;
  590. end;
  591. RTL_RANGE_LIST = _RTL_RANGE_LIST;
  592. PRTL_RANGE_LIST = ^RTL_RANGE_LIST;
  593. TRtlRangeList = RTL_RANGE_LIST;
  594. PRtlRangeList = ^TRtlRangeList;
  595. _RANGE_LIST_ITERATOR = record
  596. RangeListHead: PLIST_ENTRY;
  597. MergedHead: PLIST_ENTRY;
  598. Current: PVOID;
  599. Stamp: ULONG;
  600. end;
  601. RTL_RANGE_LIST_ITERATOR = _RANGE_LIST_ITERATOR;
  602. PRTL_RANGE_LIST_ITERATOR = ^RTL_RANGE_LIST_ITERATOR;
  603. TRtlRangeListIterator = RTL_RANGE_LIST_ITERATOR;
  604. PRtlRangeListIterator = ^TRtlRangeListIterator;
  605. // End of NTDDK.H
  606. //==============================================================================
  607. // NT System Services
  608. //==============================================================================
  609. type
  610. _SYSTEM_INFORMATION_CLASS = (
  611. SystemBasicInformation,
  612. SystemProcessorInformation,
  613. SystemPerformanceInformation,
  614. SystemTimeOfDayInformation,
  615. SystemNotImplemented1,
  616. SystemProcessesAndThreadsInformation,
  617. SystemCallCounts,
  618. SystemConfigurationInformation,
  619. SystemProcessorTimes,
  620. SystemGlobalFlag,
  621. SystemNotImplemented2,
  622. SystemModuleInformation,
  623. SystemLockInformation,
  624. SystemNotImplemented3,
  625. SystemNotImplemented4,
  626. SystemNotImplemented5,
  627. SystemHandleInformation,
  628. SystemObjectInformation,
  629. SystemPagefileInformation,
  630. SystemInstructionEmulationCounts,
  631. SystemInvalidInfoClass1,
  632. SystemCacheInformation,
  633. SystemPoolTagInformation,
  634. SystemProcessorStatistics,
  635. SystemDpcInformation,
  636. SystemNotImplemented6,
  637. SystemLoadImage,
  638. SystemUnloadImage,
  639. SystemTimeAdjustment,
  640. SystemNotImplemented7,
  641. SystemNotImplemented8,
  642. SystemNotImplemented9,
  643. SystemCrashDumpInformation,
  644. SystemExceptionInformation,
  645. SystemCrashDumpStateInformation,
  646. SystemKernelDebuggerInformation,
  647. SystemContextSwitchInformation,
  648. SystemRegistryQuotaInformation,
  649. SystemLoadAndCallImage,
  650. SystemPrioritySeparation,
  651. SystemNotImplemented10,
  652. SystemNotImplemented11,
  653. SystemInvalidInfoClass2,
  654. SystemInvalidInfoClass3,
  655. SystemTimeZoneInformation,
  656. SystemLookasideInformation,
  657. SystemSetTimeSlipEvent,
  658. SystemCreateSession,
  659. SystemDeleteSession,
  660. SystemInvalidInfoClass4,
  661. SystemRangeStartInformation,
  662. SystemVerifierInformation,
  663. SystemAddVerifier,
  664. SystemSessionProcessesInformation);
  665. SYSTEM_INFORMATION_CLASS = _SYSTEM_INFORMATION_CLASS;
  666. TSystemInformationClass = SYSTEM_INFORMATION_CLASS;
  667. type
  668. _SYSTEM_BASIC_INFORMATION = record // Information Class 0
  669. Unknown: ULONG;
  670. MaximumIncrement: ULONG;
  671. PhysicalPageSize: ULONG;
  672. NumberOfPhysicalPages: ULONG;
  673. LowestPhysicalPage: ULONG;
  674. HighestPhysicalPage: ULONG;
  675. AllocationGranularity: ULONG;
  676. LowestUserAddress: ULONG;
  677. HighestUserAddress: ULONG;
  678. ActiveProcessors: ULONG;
  679. NumberProcessors: UCHAR;
  680. end;
  681. SYSTEM_BASIC_INFORMATION = _SYSTEM_BASIC_INFORMATION;
  682. PSYSTEM_BASIC_INFORMATION = ^SYSTEM_BASIC_INFORMATION;
  683. TSystemBasicInformation = SYSTEM_BASIC_INFORMATION;
  684. PSystemBasicInformation = ^TSystemBasicInformation;
  685. _SYSTEM_PROCESSOR_INFORMATION = record // Information Class 1
  686. ProcessorArchitecture: USHORT;
  687. ProcessorLevel: USHORT;
  688. ProcessorRevision: USHORT;
  689. Unknown: USHORT;
  690. FeatureBits: ULONG;
  691. end;
  692. SYSTEM_PROCESSOR_INFORMATION = _SYSTEM_PROCESSOR_INFORMATION;
  693. PSYSTEM_PROCESSOR_INFORMATION = ^SYSTEM_PROCESSOR_INFORMATION;
  694. TSystemProcessorInformation = SYSTEM_PROCESSOR_INFORMATION;
  695. PSystemProcessorInformation = ^TSystemProcessorInformation;
  696. _SYSTEM_PERFORMANCE_INFORMATION = record // Information Class 2
  697. IdleTime: LARGE_INTEGER;
  698. ReadTransferCount: LARGE_INTEGER;
  699. WriteTransferCount: LARGE_INTEGER;
  700. OtherTransferCount: LARGE_INTEGER;
  701. ReadOperationCount: ULONG;
  702. WriteOperationCount: ULONG;
  703. OtherOperationCount: ULONG;
  704. AvailablePages: ULONG;
  705. TotalCommittedPages: ULONG;
  706. TotalCommitLimit: ULONG;
  707. PeakCommitment: ULONG;
  708. PageFaults: ULONG;
  709. WriteCopyFaults: ULONG;
  710. TransistionFaults: ULONG;
  711. Reserved1: ULONG;
  712. DemandZeroFaults: ULONG;
  713. PagesRead: ULONG;
  714. PageReadIos: ULONG;
  715. Reserved2: array[0..1] of ULONG;
  716. PagefilePagesWritten: ULONG;
  717. PagefilePageWriteIos: ULONG;
  718. MappedFilePagesWritten: ULONG;
  719. MappedFilePageWriteIos: ULONG;
  720. PagedPoolUsage: ULONG;
  721. NonPagedPoolUsage: ULONG;
  722. PagedPoolAllocs: ULONG;
  723. PagedPoolFrees: ULONG;
  724. NonPagedPoolAllocs: ULONG;
  725. NonPagedPoolFrees: ULONG;
  726. TotalFreeSystemPtes: ULONG;
  727. SystemCodePage: ULONG;
  728. TotalSystemDriverPages: ULONG;
  729. TotalSystemCodePages: ULONG;
  730. SmallNonPagedLookasideListAllocateHits: ULONG;
  731. SmallPagedLookasideListAllocateHits: ULONG;
  732. Reserved3: ULONG;
  733. MmSystemCachePage: ULONG;
  734. PagedPoolPage: ULONG;
  735. SystemDriverPage: ULONG;
  736. FastReadNoWait: ULONG;
  737. FastReadWait: ULONG;
  738. FastReadResourceMiss: ULONG;
  739. FastReadNotPossible: ULONG;
  740. FastMdlReadNoWait: ULONG;
  741. FastMdlReadWait: ULONG;
  742. FastMdlReadResourceMiss: ULONG;
  743. FastMdlReadNotPossible: ULONG;
  744. MapDataNoWait: ULONG;
  745. MapDataWait: ULONG;
  746. MapDataNoWaitMiss: ULONG;
  747. MapDataWaitMiss: ULONG;
  748. PinMappedDataCount: ULONG;
  749. PinReadNoWait: ULONG;
  750. PinReadWait: ULONG;
  751. PinReadNoWaitMiss: ULONG;
  752. PinReadWaitMiss: ULONG;
  753. CopyReadNoWait: ULONG;
  754. CopyReadWait: ULONG;
  755. CopyReadNoWaitMiss: ULONG;
  756. CopyReadWaitMiss: ULONG;
  757. MdlReadNoWait: ULONG;
  758. MdlReadWait: ULONG;
  759. MdlReadNoWaitMiss: ULONG;
  760. MdlReadWaitMiss: ULONG;
  761. ReadAheadIos: ULONG;
  762. LazyWriteIos: ULONG;
  763. LazyWritePages: ULONG;
  764. DataFlushes: ULONG;
  765. DataPages: ULONG;
  766. ContextSwitches: ULONG;
  767. FirstLevelTbFills: ULONG;
  768. SecondLevelTbFills: ULONG;
  769. SystemCalls: ULONG;
  770. end;
  771. SYSTEM_PERFORMANCE_INFORMATION = _SYSTEM_PERFORMANCE_INFORMATION;
  772. PSYSTEM_PERFORMANCE_INFORMATION = ^SYSTEM_PERFORMANCE_INFORMATION;
  773. TSystemPerformanceInformation = SYSTEM_PERFORMANCE_INFORMATION;
  774. PSystemPerformanceInformation = ^TSystemPerformanceInformation;
  775. _SYSTEM_TIME_OF_DAY_INFORMATION = record // Information Class 3
  776. BootTime: LARGE_INTEGER;
  777. CurrentTime: LARGE_INTEGER;
  778. TimeZoneBias: LARGE_INTEGER;
  779. CurrentTimeZoneId: ULONG;
  780. end;
  781. SYSTEM_TIME_OF_DAY_INFORMATION = _SYSTEM_TIME_OF_DAY_INFORMATION;
  782. PSYSTEM_TIME_OF_DAY_INFORMATION = ^SYSTEM_TIME_OF_DAY_INFORMATION;
  783. TSystemTimeOfDayInformation = SYSTEM_TIME_OF_DAY_INFORMATION;
  784. PSystemTimeOfDayInformation = ^TSystemTimeOfDayInformation;
  785. _IO_COUNTERSEX = record
  786. ReadOperationCount: LARGE_INTEGER;
  787. WriteOperationCount: LARGE_INTEGER;
  788. OtherOperationCount: LARGE_INTEGER;
  789. ReadTransferCount: LARGE_INTEGER;
  790. WriteTransferCount: LARGE_INTEGER;
  791. OtherTransferCount: LARGE_INTEGER;
  792. end;
  793. IO_COUNTERSEX = _IO_COUNTERSEX;
  794. PIO_COUNTERSEX = ^IO_COUNTERSEX;
  795. TIoCountersEx = IO_COUNTERSEX;
  796. PIoCountersEx = ^TIoCountersEx;
  797. THREAD_STATE = (
  798. StateInitialized,
  799. StateReady,
  800. StateRunning,
  801. StateStandby,
  802. StateTerminated,
  803. StateWait,
  804. StateTransition,
  805. StateUnknown);
  806. TThreadState = THREAD_STATE;
  807. _SYSTEM_THREADS = record
  808. KernelTime: LARGE_INTEGER;
  809. UserTime: LARGE_INTEGER;
  810. CreateTime: LARGE_INTEGER;
  811. WaitTime: ULONG;
  812. StartAddress: PVOID;
  813. ClientId: CLIENT_ID;
  814. Priority: KPRIORITY;
  815. BasePriority: KPRIORITY;
  816. ContextSwitchCount: ULONG;
  817. State: THREAD_STATE;
  818. WaitReason: KWAIT_REASON;
  819. end;
  820. SYSTEM_THREADS = _SYSTEM_THREADS;
  821. PSYSTEM_THREADS = ^SYSTEM_THREADS;
  822. TSystemThreads = SYSTEM_THREADS;
  823. PSystemThreads = PSYSTEM_THREADS;
  824. _SYSTEM_PROCESSES = record // Information Class 5
  825. NextEntryDelta: ULONG;
  826. ThreadCount: ULONG;
  827. Reserved1: array[0..5] of ULONG;
  828. CreateTime: LARGE_INTEGER;
  829. UserTime: LARGE_INTEGER;
  830. KernelTime: LARGE_INTEGER;
  831. ProcessName: UNICODE_STRING;
  832. BasePriority: KPRIORITY;
  833. ProcessId: ULONG;
  834. InheritedFromProcessId: ULONG;
  835. HandleCount: ULONG;
  836. // next two were Reserved2: array [0..1] of ULONG; thanks to Nico Bendlin
  837. SessionId: ULONG;
  838. Reserved2: ULONG;
  839. VmCounters: VM_COUNTERS;
  840. PrivatePageCount: ULONG;
  841. IoCounters: IO_COUNTERSEX; // Windows 2000 only
  842. Threads: array[0..0] of SYSTEM_THREADS;
  843. end;
  844. SYSTEM_PROCESSES = _SYSTEM_PROCESSES;
  845. PSYSTEM_PROCESSES = ^SYSTEM_PROCESSES;
  846. TSystemProcesses = SYSTEM_PROCESSES;
  847. PSystemProcesses = PSYSTEM_PROCESSES;
  848. _SYSTEM_CALLS_INFORMATION = record // Information Class 6
  849. Size: ULONG;
  850. NumberOfDescriptorTables: ULONG;
  851. NumberOfRoutinesInTable: array[0..0] of ULONG;
  852. // ULONG CallCounts[];
  853. end;
  854. SYSTEM_CALLS_INFORMATION = _SYSTEM_CALLS_INFORMATION;
  855. PSYSTEM_CALLS_INFORMATION = ^SYSTEM_CALLS_INFORMATION;
  856. TSystemCallsInformation = SYSTEM_CALLS_INFORMATION;
  857. PSystemCallsInformation = ^TSystemCallsInformation;
  858. _SYSTEM_CONFIGURATION_INFORMATION = record // Information Class 7
  859. DiskCount: ULONG;
  860. FloppyCount: ULONG;
  861. CdRomCount: ULONG;
  862. TapeCount: ULONG;
  863. SerialCount: ULONG;
  864. ParallelCount: ULONG;
  865. end;
  866. SYSTEM_CONFIGURATION_INFORMATION = _SYSTEM_CONFIGURATION_INFORMATION;
  867. PSYSTEM_CONFIGURATION_INFORMATION = ^SYSTEM_CONFIGURATION_INFORMATION;
  868. TSystemConfigurationInformation = SYSTEM_CONFIGURATION_INFORMATION;
  869. PSystemConfigurationInformation = ^TSystemConfigurationInformation;
  870. _SYSTEM_PROCESSOR_TIMES = record // Information Class 8
  871. IdleTime: LARGE_INTEGER;
  872. KernelTime: LARGE_INTEGER;
  873. UserTime: LARGE_INTEGER;
  874. DpcTime: LARGE_INTEGER;
  875. InterruptTime: LARGE_INTEGER;
  876. InterruptCount: ULONG;
  877. end;
  878. SYSTEM_PROCESSOR_TIMES = _SYSTEM_PROCESSOR_TIMES;
  879. PSYSTEM_PROCESSOR_TIMES = ^SYSTEM_PROCESSOR_TIMES;
  880. TSystemProcessorTimes = SYSTEM_PROCESSOR_TIMES;
  881. PSystemProcessorTimes = ^TSystemProcessorTimes;
  882. _SYSTEM_GLOBAL_FLAG = record // Information Class 9
  883. GlobalFlag: ULONG;
  884. end;
  885. SYSTEM_GLOBAL_FLAG = _SYSTEM_GLOBAL_FLAG;
  886. PSYSTEM_GLOBAL_FLAG = ^SYSTEM_GLOBAL_FLAG;
  887. TSystemGlobalFlag = SYSTEM_GLOBAL_FLAG;
  888. PSystemGlobalFlag = ^TSystemGlobalFlag;
  889. _SYSTEM_MODULE_INFORMATION = record // Information Class 11
  890. Reserved: array[0..1] of ULONG;
  891. Base: PVOID;
  892. Size: ULONG;
  893. Flags: ULONG;
  894. Index: USHORT;
  895. Unknown: USHORT;
  896. LoadCount: USHORT;
  897. ModuleNameOffset: USHORT;
  898. ImageName: array[0..255] of CHAR;
  899. end;
  900. SYSTEM_MODULE_INFORMATION = _SYSTEM_MODULE_INFORMATION;
  901. PSYSTEM_MODULE_INFORMATION = ^SYSTEM_MODULE_INFORMATION;
  902. TSystemModuleInformation = SYSTEM_MODULE_INFORMATION;
  903. PSystemModuleInformation = PSYSTEM_MODULE_INFORMATION;
  904. _SYSTEM_LOCK_INFORMATION = record // Information Class 12
  905. Address: PVOID;
  906. Type_: USHORT;
  907. Reserved1: USHORT;
  908. ExclusiveOwnerThreadId: ULONG;
  909. ActiveCount: ULONG;
  910. ContentionCount: ULONG;
  911. Reserved2: array[0..1] of ULONG;
  912. NumberOfSharedWaiters: ULONG;
  913. NumberOfExclusiveWaiters: ULONG;
  914. end;
  915. SYSTEM_LOCK_INFORMATION = _SYSTEM_LOCK_INFORMATION;
  916. PSYSTEM_LOCK_INFORMATION = ^SYSTEM_LOCK_INFORMATION;
  917. TSystemLockInformation = SYSTEM_LOCK_INFORMATION;
  918. PSystemLockInformation = ^TSystemLockInformation;
  919. _SYSTEM_HANDLE_INFORMATION = record // Information Class 16
  920. ProcessId: ULONG;
  921. ObjectTypeNumber: UCHAR;
  922. Flags: UCHAR; // 0x01 = PROTECT_FROM_CLOSE, 0x02 = INHERIT
  923. Handle: USHORT;
  924. Object_: PVOID;
  925. GrantedAccess: ACCESS_MASK;
  926. end;
  927. SYSTEM_HANDLE_INFORMATION = _SYSTEM_HANDLE_INFORMATION;
  928. PSYSTEM_HANDLE_INFORMATION = ^SYSTEM_HANDLE_INFORMATION;
  929. TSystemHandleInformation = SYSTEM_HANDLE_INFORMATION;
  930. PSystemHandleInformation = ^TSystemHandleInformation;
  931. _SYSTEM_OBJECT_TYPE_INFORMATION = record // Information Class 17
  932. NextEntryOffset: ULONG;
  933. ObjectCount: ULONG;
  934. HandleCount: ULONG;
  935. TypeNumber: ULONG;
  936. InvalidAttributes: ULONG;
  937. GenericMapping: GENERIC_MAPPING;
  938. ValidAccessMask: ACCESS_MASK;
  939. PoolType: POOL_TYPE;
  940. Unknown: UCHAR;
  941. Name: UNICODE_STRING;
  942. end;
  943. SYSTEM_OBJECT_TYPE_INFORMATION = _SYSTEM_OBJECT_TYPE_INFORMATION;
  944. PSYSTEM_OBJECT_TYPE_INFORMATION = ^SYSTEM_OBJECT_TYPE_INFORMATION;
  945. TSystemObjectTypeInformation = SYSTEM_OBJECT_TYPE_INFORMATION;
  946. PSystemObjectTypeInformation = ^TSystemObjectTypeInformation;
  947. _SYSTEM_OBJECT_INFORMATION = record
  948. NextEntryOffset: ULONG;
  949. Object_: PVOID;
  950. CreatorProcessId: ULONG;
  951. Unknown: USHORT;
  952. Flags: USHORT;
  953. PointerCount: ULONG;
  954. HandleCount: ULONG;
  955. PagedPoolUsage: ULONG;
  956. NonPagedPoolUsage: ULONG;
  957. ExclusiveProcessId: ULONG;
  958. SecurityDescriptor: PSECURITY_DESCRIPTOR;
  959. Name: UNICODE_STRING;
  960. end;
  961. SYSTEM_OBJECT_INFORMATION = _SYSTEM_OBJECT_INFORMATION;
  962. PSYSTEM_OBJECT_INFORMATION = ^SYSTEM_OBJECT_INFORMATION;
  963. TSystemObjectInformation = SYSTEM_OBJECT_INFORMATION;
  964. PSystemObjectInformation = ^TSystemObjectInformation;
  965. _SYSTEM_PAGEFILE_INFORMATION = record // Information Class 18
  966. NextEntryOffset: ULONG;
  967. CurrentSize: ULONG;
  968. TotalUsed: ULONG;
  969. PeakUsed: ULONG;
  970. FileName: UNICODE_STRING;
  971. end;
  972. SYSTEM_PAGEFILE_INFORMATION = _SYSTEM_PAGEFILE_INFORMATION;
  973. PSYSTEM_PAGEFILE_INFORMATION = ^SYSTEM_PAGEFILE_INFORMATION;
  974. TSystemPageFileInformation = SYSTEM_PAGEFILE_INFORMATION;
  975. PSystemPageFileInformation = PSYSTEM_PAGEFILE_INFORMATION;
  976. _SYSTEM_INSTRUCTION_EMULATION_INFORMATION = record // Info Class 19
  977. GenericInvalidOpcode: ULONG;
  978. TwoByteOpcode: ULONG;
  979. ESprefix: ULONG;
  980. CSprefix: ULONG;
  981. SSprefix: ULONG;
  982. DSprefix: ULONG;
  983. FSPrefix: ULONG;
  984. GSprefix: ULONG;
  985. OPER32prefix: ULONG;
  986. ADDR32prefix: ULONG;
  987. INSB: ULONG;
  988. INSW: ULONG;
  989. OUTSB: ULONG;
  990. OUTSW: ULONG;
  991. PUSHFD: ULONG;
  992. POPFD: ULONG;
  993. INTnn: ULONG;
  994. INTO: ULONG;
  995. IRETD: ULONG;
  996. FloatingPointOpcode: ULONG;
  997. INBimm: ULONG;
  998. INWimm: ULONG;
  999. OUTBimm: ULONG;
  1000. OUTWimm: ULONG;
  1001. INB: ULONG;
  1002. INW: ULONG;
  1003. OUTB: ULONG;
  1004. OUTW: ULONG;
  1005. LOCKprefix: ULONG;
  1006. REPNEprefix: ULONG;
  1007. REPprefix: ULONG;
  1008. CLI: ULONG;
  1009. STI: ULONG;
  1010. HLT: ULONG;
  1011. end;
  1012. SYSTEM_INSTRUCTION_EMULATION_INFORMATION = _SYSTEM_INSTRUCTION_EMULATION_INFORMATION;
  1013. PSYSTEM_INSTRUCTION_EMULATION_INFORMATION = ^SYSTEM_INSTRUCTION_EMULATION_INFORMATION;
  1014. TSystemInstructionEmulationInformation = SYSTEM_INSTRUCTION_EMULATION_INFORMATION;
  1015. PSystemInstructionEmulationInformation = ^TSystemInstructionEmulationInformation;
  1016. _SYSTEM_CACHE_INFORMATION = record // Information Class 21
  1017. SystemCacheWsSize: ULONG;
  1018. SystemCacheWsPeakSize: ULONG;
  1019. SystemCacheWsFaults: ULONG;
  1020. SystemCacheWsMinimum: ULONG;
  1021. SystemCacheWsMaximum: ULONG;
  1022. TransitionSharedPages: ULONG;
  1023. TransitionSharedPagesPeak: ULONG;
  1024. Reserved: array[0..1] of ULONG;
  1025. end;
  1026. SYSTEM_CACHE_INFORMATION = _SYSTEM_CACHE_INFORMATION;
  1027. PSYSTEM_CACHE_INFORMATION = ^SYSTEM_CACHE_INFORMATION;
  1028. TSystemCacheInformation = SYSTEM_CACHE_INFORMATION;
  1029. PSystemCacheInformation = ^TSystemCacheInformation;
  1030. _SYSTEM_POOL_TAG_INFORMATION = record // Information Class 22
  1031. Tag: array[0..3] of CHAR;
  1032. PagedPoolAllocs: ULONG;
  1033. PagedPoolFrees: ULONG;
  1034. PagedPoolUsage: ULONG;
  1035. NonPagedPoolAllocs: ULONG;
  1036. NonPagedPoolFrees: ULONG;
  1037. NonPagedPoolUsage: ULONG;
  1038. end;
  1039. SYSTEM_POOL_TAG_INFORMATION = _SYSTEM_POOL_TAG_INFORMATION;
  1040. PSYSTEM_POOL_TAG_INFORMATION = ^SYSTEM_POOL_TAG_INFORMATION;
  1041. TSystemPoolTagInformation = SYSTEM_POOL_TAG_INFORMATION;
  1042. PSystemPoolTagInformation = ^TSystemPoolTagInformation;
  1043. _SYSTEM_PROCESSOR_STATISTICS = record // Information Class 23
  1044. ContextSwitches: ULONG;
  1045. DpcCount: ULONG;
  1046. DpcRequestRate: ULONG;
  1047. TimeIncrement: ULONG;
  1048. DpcBypassCount: ULONG;
  1049. ApcBypassCount: ULONG;
  1050. end;
  1051. SYSTEM_PROCESSOR_STATISTICS = _SYSTEM_PROCESSOR_STATISTICS;
  1052. PSYSTEM_PROCESSOR_STATISTICS = ^SYSTEM_PROCESSOR_STATISTICS;
  1053. TSystemProcessorStatistics = SYSTEM_PROCESSOR_STATISTICS;
  1054. PSystemProcessorStatistics = ^TSystemProcessorStatistics;
  1055. _SYSTEM_DPC_INFORMATION = record // Information Class 24
  1056. Reserved: ULONG;
  1057. MaximumDpcQueueDepth: ULONG;
  1058. MinimumDpcRate: ULONG;
  1059. AdjustDpcThreshold: ULONG;
  1060. IdealDpcRate: ULONG;
  1061. end;
  1062. SYSTEM_DPC_INFORMATION = _SYSTEM_DPC_INFORMATION;
  1063. PSYSTEM_DPC_INFORMATION = ^SYSTEM_DPC_INFORMATION;
  1064. TSystemDpcInformation = SYSTEM_DPC_INFORMATION;
  1065. PSystemDpcInformation = ^TSystemDpcInformation;
  1066. _SYSTEM_LOAD_IMAGE = record // Information Class 26
  1067. ModuleName: UNICODE_STRING;
  1068. ModuleBase: PVOID;
  1069. Unknown: PVOID;
  1070. EntryPoint: PVOID;
  1071. ExportDirectory: PVOID;
  1072. end;
  1073. SYSTEM_LOAD_IMAGE = _SYSTEM_LOAD_IMAGE;
  1074. PSYSTEM_LOAD_IMAGE = ^SYSTEM_LOAD_IMAGE;
  1075. TSystemLoadImage = SYSTEM_LOAD_IMAGE;
  1076. PSystemLoadImage = ^TSystemLoadImage;
  1077. _SYSTEM_UNLOAD_IMAGE = record // Information Class 27
  1078. ModuleBase: PVOID;
  1079. end;
  1080. SYSTEM_UNLOAD_IMAGE = _SYSTEM_UNLOAD_IMAGE;
  1081. PSYSTEM_UNLOAD_IMAGE = ^SYSTEM_UNLOAD_IMAGE;
  1082. TSystemUnloadImage = SYSTEM_UNLOAD_IMAGE;
  1083. PSystemUnloadImage = ^TSystemUnloadImage;
  1084. _SYSTEM_QUERY_TIME_ADJUSTMENT = record // Information Class 28
  1085. TimeAdjustment: ULONG;
  1086. MaximumIncrement: ULONG;
  1087. TimeSynchronization: ByteBool;
  1088. end;
  1089. SYSTEM_QUERY_TIME_ADJUSTMENT = _SYSTEM_QUERY_TIME_ADJUSTMENT;
  1090. PSYSTEM_QUERY_TIME_ADJUSTMENT = ^SYSTEM_QUERY_TIME_ADJUSTMENT;
  1091. TSystemQueryTimeAdjustment = SYSTEM_QUERY_TIME_ADJUSTMENT;
  1092. PSystemQueryTimeAdjustment = ^TSystemQueryTimeAdjustment;
  1093. _SYSTEM_SET_TIME_ADJUSTMENT = record // Information Class 28
  1094. TimeAdjustment: ULONG;
  1095. TimeSynchronization: ByteBool;
  1096. end;
  1097. SYSTEM_SET_TIME_ADJUSTMENT = _SYSTEM_SET_TIME_ADJUSTMENT;
  1098. PSYSTEM_SET_TIME_ADJUSTMENT = ^SYSTEM_SET_TIME_ADJUSTMENT;
  1099. TSystemSetTimeAdjustment = SYSTEM_SET_TIME_ADJUSTMENT;
  1100. PSystemSetTimeAdjustment = ^TSystemSetTimeAdjustment;
  1101. _SYSTEM_CRASH_DUMP_INFORMATION = record // Information Class 32
  1102. CrashDumpSectionHandle: HANDLE;
  1103. Unknown: HANDLE; // Windows 2000 only
  1104. end;
  1105. SYSTEM_CRASH_DUMP_INFORMATION = _SYSTEM_CRASH_DUMP_INFORMATION;
  1106. PSYSTEM_CRASH_DUMP_INFORMATION = ^SYSTEM_CRASH_DUMP_INFORMATION;
  1107. TSystemCrashDumpInformation = SYSTEM_CRASH_DUMP_INFORMATION;
  1108. PSystemCrashDumpInformation = ^TSystemCrashDumpInformation;
  1109. _SYSTEM_EXCEPTION_INFORMATION = record // Information Class 33
  1110. AlignmentFixupCount: ULONG;
  1111. ExceptionDispatchCount: ULONG;
  1112. FloatingEmulationCount: ULONG;
  1113. Reserved: ULONG;
  1114. end;
  1115. SYSTEM_EXCEPTION_INFORMATION = _SYSTEM_EXCEPTION_INFORMATION;
  1116. PSYSTEM_EXCEPTION_INFORMATION = ^SYSTEM_EXCEPTION_INFORMATION;
  1117. TSystemExceptionInformation = SYSTEM_EXCEPTION_INFORMATION;
  1118. PSystemExceptionInformation = ^TSystemExceptionInformation;
  1119. _SYSTEM_CRASH_STATE_INFORMATION = record // Information Class 34
  1120. ValidCrashDump: ULONG;
  1121. Unknown: ULONG; // Windows 2000 only
  1122. end;
  1123. SYSTEM_CRASH_STATE_INFORMATION = _SYSTEM_CRASH_STATE_INFORMATION;
  1124. PSYSTEM_CRASH_STATE_INFORMATION = ^SYSTEM_CRASH_STATE_INFORMATION;
  1125. TSystemCrashStateInformation = SYSTEM_CRASH_STATE_INFORMATION;
  1126. PSystemCrashStateInformation = ^TSystemCrashStateInformation;
  1127. _SYSTEM_KERNEL_DEBUGGER_INFORMATION = record // Information Class 35
  1128. DebuggerEnabled: ByteBool;
  1129. DebuggerNotPresent: ByteBool;
  1130. end;
  1131. SYSTEM_KERNEL_DEBUGGER_INFORMATION = _SYSTEM_KERNEL_DEBUGGER_INFORMATION;
  1132. PSYSTEM_KERNEL_DEBUGGER_INFORMATION = ^SYSTEM_KERNEL_DEBUGGER_INFORMATION;
  1133. TSystemKernelDebuggerInformation = SYSTEM_KERNEL_DEBUGGER_INFORMATION;
  1134. PSystemKernelDebuggerInformation = ^TSystemKernelDebuggerInformation;
  1135. _SYSTEM_CONTEXT_SWITCH_INFORMATION = record // Information Class 36
  1136. ContextSwitches: ULONG;
  1137. ContextSwitchCounters: array[0..10] of ULONG;
  1138. end;
  1139. SYSTEM_CONTEXT_SWITCH_INFORMATION = _SYSTEM_CONTEXT_SWITCH_INFORMATION;
  1140. PSYSTEM_CONTEXT_SWITCH_INFORMATION = ^SYSTEM_CONTEXT_SWITCH_INFORMATION;
  1141. TSystemContextSwitchInformation = SYSTEM_CONTEXT_SWITCH_INFORMATION;
  1142. PSystemContextSwitchInformation = ^TSystemContextSwitchInformation;
  1143. _SYSTEM_REGISTRY_QUOTA_INFORMATION = record // Information Class 37
  1144. RegistryQuota: ULONG;
  1145. RegistryQuotaInUse: ULONG;
  1146. PagedPoolSize: ULONG;
  1147. end;
  1148. SYSTEM_REGISTRY_QUOTA_INFORMATION = _SYSTEM_REGISTRY_QUOTA_INFORMATION;
  1149. PSYSTEM_REGISTRY_QUOTA_INFORMATION = ^SYSTEM_REGISTRY_QUOTA_INFORMATION;
  1150. TSystemRegistryQuotaInformation = SYSTEM_REGISTRY_QUOTA_INFORMATION;
  1151. PSystemRegistryQuotaInformation = ^TSystemRegistryQuotaInformation;
  1152. _SYSTEM_LOAD_AND_CALL_IMAGE = record // Information Class 38
  1153. ModuleName: UNICODE_STRING;
  1154. end;
  1155. SYSTEM_LOAD_AND_CALL_IMAGE = _SYSTEM_LOAD_AND_CALL_IMAGE;
  1156. PSYSTEM_LOAD_AND_CALL_IMAGE = ^SYSTEM_LOAD_AND_CALL_IMAGE;
  1157. TSystemLoadAndCallImage = SYSTEM_LOAD_AND_CALL_IMAGE;
  1158. PSystemLoadAndCallImage = ^TSystemLoadAndCallImage;
  1159. _SYSTEM_PRIORITY_SEPARATION = record // Information Class 39
  1160. PrioritySeparation: ULONG;
  1161. end;
  1162. SYSTEM_PRIORITY_SEPARATION = _SYSTEM_PRIORITY_SEPARATION;
  1163. PSYSTEM_PRIORITY_SEPARATION = ^SYSTEM_PRIORITY_SEPARATION;
  1164. TSystemPrioritySeparation = SYSTEM_PRIORITY_SEPARATION;
  1165. PSystemPrioritySeparation = ^TSystemPrioritySeparation;
  1166. _SYSTEM_TIME_ZONE_INFORMATION = record // Information Class 44
  1167. Bias: LONG;
  1168. StandardName: array[0..31] of WCHAR;
  1169. StandardDate: SYSTEMTIME;
  1170. StandardBias: LONG;
  1171. DaylightName: array[0..31] of WCHAR;
  1172. DaylightDate: SYSTEMTIME;
  1173. DaylightBias: LONG;
  1174. end;
  1175. SYSTEM_TIME_ZONE_INFORMATION = _SYSTEM_TIME_ZONE_INFORMATION;
  1176. PSYSTEM_TIME_ZONE_INFORMATION = ^SYSTEM_TIME_ZONE_INFORMATION;
  1177. TSystemTimeZoneInformation = SYSTEM_TIME_ZONE_INFORMATION;
  1178. PSystemTimeZoneInformation = ^TSystemTimeZoneInformation;
  1179. _SYSTEM_LOOKASIDE_INFORMATION = record // Information Class 45
  1180. Depth: USHORT;
  1181. MaximumDepth: USHORT;
  1182. TotalAllocates: ULONG;
  1183. AllocateMisses: ULONG;
  1184. TotalFrees: ULONG;
  1185. FreeMisses: ULONG;
  1186. Type_: POOL_TYPE;
  1187. Tag: ULONG;
  1188. Size: ULONG;
  1189. end;
  1190. SYSTEM_LOOKASIDE_INFORMATION = _SYSTEM_LOOKASIDE_INFORMATION;
  1191. PSYSTEM_LOOKASIDE_INFORMATION = ^SYSTEM_LOOKASIDE_INFORMATION;
  1192. TSystemLookAsideInformation = SYSTEM_LOOKASIDE_INFORMATION;
  1193. PSystemLookAsideInformation = ^TSystemLookAsideInformation;
  1194. _SYSTEM_SET_TIME_SLIP_EVENT = record // Information Class 46
  1195. TimeSlipEvent: HANDLE;
  1196. end;
  1197. SYSTEM_SET_TIME_SLIP_EVENT = _SYSTEM_SET_TIME_SLIP_EVENT;
  1198. PSYSTEM_SET_TIME_SLIP_EVENT = ^SYSTEM_SET_TIME_SLIP_EVENT;
  1199. TSystemSetTimeSlipEvent = SYSTEM_SET_TIME_SLIP_EVENT;
  1200. PSystemSetTimeSlipEvent = ^TSystemSetTimeSlipEvent;
  1201. _SYSTEM_CREATE_SESSION = record // Information Class 47
  1202. Session: ULONG;
  1203. end;
  1204. SYSTEM_CREATE_SESSION = _SYSTEM_CREATE_SESSION;
  1205. PSYSTEM_CREATE_SESSION = ^SYSTEM_CREATE_SESSION;
  1206. TSystemCreateSession = SYSTEM_CREATE_SESSION;
  1207. PSystemCreateSession = ^TSystemCreateSession;
  1208. _SYSTEM_DELETE_SESSION = record // Information Class 48
  1209. Session: ULONG;
  1210. end;
  1211. SYSTEM_DELETE_SESSION = _SYSTEM_DELETE_SESSION;
  1212. PSYSTEM_DELETE_SESSION = ^SYSTEM_DELETE_SESSION;
  1213. TSystemDeleteSession = SYSTEM_DELETE_SESSION;
  1214. PSystemDeleteSession = ^TSystemDeleteSession;
  1215. _SYSTEM_RANGE_START_INFORMATION = record // Information Class 50
  1216. SystemRangeStart: PVOID;
  1217. end;
  1218. SYSTEM_RANGE_START_INFORMATION = _SYSTEM_RANGE_START_INFORMATION;
  1219. PSYSTEM_RANGE_START_INFORMATION = ^SYSTEM_RANGE_START_INFORMATION;
  1220. TSystemRangeStartInformation = SYSTEM_RANGE_START_INFORMATION;
  1221. PSystemRangeStartInformation = ^TSystemRangeStartInformation;
  1222. _SYSTEM_POOL_BLOCK = record
  1223. Allocated: ByteBool;
  1224. Unknown: USHORT;
  1225. Size: ULONG;
  1226. Tag: array[0..3] of CHAR;
  1227. end;
  1228. SYSTEM_POOL_BLOCK = _SYSTEM_POOL_BLOCK;
  1229. PSYSTEM_POOL_BLOCK = ^SYSTEM_POOL_BLOCK;
  1230. TSystemPoolBlock = SYSTEM_POOL_BLOCK;
  1231. PSystemPoolBlock = ^TSystemPoolBlock;
  1232. _SYSTEM_POOL_BLOCKS_INFORMATION = record // Info Classes 14 and 15
  1233. PoolSize: ULONG;
  1234. PoolBase: PVOID;
  1235. Unknown: USHORT;
  1236. NumberOfBlocks: ULONG;
  1237. PoolBlocks: array[0..0] of SYSTEM_POOL_BLOCK;
  1238. end;
  1239. SYSTEM_POOL_BLOCKS_INFORMATION = _SYSTEM_POOL_BLOCKS_INFORMATION;
  1240. PSYSTEM_POOL_BLOCKS_INFORMATION = ^SYSTEM_POOL_BLOCKS_INFORMATION;
  1241. TSystemPoolBlocksInformation = SYSTEM_POOL_BLOCKS_INFORMATION;
  1242. PSystemPoolBlocksInformation = ^TSystemPoolBlocksInformation;
  1243. _SYSTEM_MEMORY_USAGE = record
  1244. Name: PVOID;
  1245. Valid: USHORT;
  1246. Standby: USHORT;
  1247. Modified: USHORT;
  1248. PageTables: USHORT;
  1249. end;
  1250. SYSTEM_MEMORY_USAGE = _SYSTEM_MEMORY_USAGE;
  1251. PSYSTEM_MEMORY_USAGE = ^SYSTEM_MEMORY_USAGE;
  1252. TSystemMemoryUsage = SYSTEM_MEMORY_USAGE;
  1253. PSystemMemoryUsage = ^TSystemMemoryUsage;
  1254. _SYSTEM_MEMORY_USAGE_INFORMATION = record // Info Classes 25 and 29
  1255. Reserved: ULONG;
  1256. EndOfData: PVOID;
  1257. MemoryUsage: array[0..0] of SYSTEM_MEMORY_USAGE;
  1258. end;
  1259. SYSTEM_MEMORY_USAGE_INFORMATION = _SYSTEM_MEMORY_USAGE_INFORMATION;
  1260. PSYSTEM_MEMORY_USAGE_INFORMATION = ^SYSTEM_MEMORY_USAGE_INFORMATION;
  1261. TSystemMemoryUsageInformation = SYSTEM_MEMORY_USAGE_INFORMATION;
  1262. PSystemMemoryUsageInformation = ^TSystemMemoryUsageInformation;
  1263. type
  1264. _SHUTDOWN_ACTION = (
  1265. ShutdownNoReboot,
  1266. ShutdownReboot,
  1267. ShutdownPowerOff);
  1268. SHUTDOWN_ACTION = _SHUTDOWN_ACTION;
  1269. TShutdownAction = SHUTDOWN_ACTION;
  1270. type
  1271. _DEBUG_CONTROL_CODE = (
  1272. DebugFiller0,
  1273. DebugGetTraceInformation,
  1274. DebugSetInternalBreakpoint,
  1275. DebugSetSpecialCall,
  1276. DebugClearSpecialCalls,
  1277. DebugQuerySpecialCalls,
  1278. DebugDbgBreakPoint);
  1279. DEBUG_CONTROL_CODE = _DEBUG_CONTROL_CODE;
  1280. TDebugControlCode = DEBUG_CONTROL_CODE;
  1281. type
  1282. _OBJECT_INFORMATION_CLASS = (
  1283. ObjectBasicInformation,
  1284. ObjectNameInformation,
  1285. ObjectTypeInformation,
  1286. ObjectAllTypesInformation,
  1287. ObjectHandleInformation);
  1288. OBJECT_INFORMATION_CLASS = _OBJECT_INFORMATION_CLASS;
  1289. TObjectInformationClass = OBJECT_INFORMATION_CLASS;
  1290. type
  1291. _OBJECT_BASIC_INFORMATION = record // Information Class 0
  1292. Attributes: ULONG;
  1293. GrantedAccess: ACCESS_MASK;
  1294. HandleCount: ULONG;
  1295. PointerCount: ULONG;
  1296. PagedPoolUsage: ULONG;
  1297. NonPagedPoolUsage: ULONG;
  1298. Reserved: array[0..2] of ULONG;
  1299. NameInformationLength: ULONG;
  1300. TypeInformationLength: ULONG;
  1301. SecurityDescriptorLength: ULONG;
  1302. CreateTime: LARGE_INTEGER;
  1303. end;
  1304. OBJECT_BASIC_INFORMATION = _OBJECT_BASIC_INFORMATION;
  1305. POBJECT_BASIC_INFORMATION = ^OBJECT_BASIC_INFORMATION;
  1306. TObjectBasicInformation = OBJECT_BASIC_INFORMATION;
  1307. PObjectBasicInformation = ^TObjectBasicInformation;
  1308. _OBJECT_TYPE_INFORMATION = record // Information Class 2
  1309. Name: UNICODE_STRING;
  1310. ObjectCount: ULONG;
  1311. HandleCount: ULONG;
  1312. Reserved1: array[0..3] of ULONG;
  1313. PeakObjectCount: ULONG;
  1314. PeakHandleCount: ULONG;
  1315. Reserved2: array[0..3] of ULONG;
  1316. InvalidAttributes: ULONG;
  1317. GenericMapping: GENERIC_MAPPING;
  1318. ValidAccess: ULONG;
  1319. Unknown: UCHAR;
  1320. MaintainHandleDatabase: ByteBool;
  1321. Reserved3: array[0..1] of UCHAR;
  1322. PoolType: POOL_TYPE;
  1323. PagedPoolUsage: ULONG;
  1324. NonPagedPoolUsage: ULONG;
  1325. end;
  1326. OBJECT_TYPE_INFORMATION = _OBJECT_TYPE_INFORMATION;
  1327. POBJECT_TYPE_INFORMATION = ^OBJECT_TYPE_INFORMATION;
  1328. TObjectTypeInformation = OBJECT_TYPE_INFORMATION;
  1329. PObjectTypeInformation = ^TObjectTypeInformation;
  1330. _OBJECT_ALL_TYPES_INFORMATION = record // Information Class 3
  1331. NumberOfTypes: ULONG;
  1332. TypeInformation: OBJECT_TYPE_INFORMATION;
  1333. end;
  1334. OBJECT_ALL_TYPES_INFORMATION = _OBJECT_ALL_TYPES_INFORMATION;
  1335. POBJECT_ALL_TYPES_INFORMATION = ^OBJECT_ALL_TYPES_INFORMATION;
  1336. TObjectAllTypesInformation = OBJECT_ALL_TYPES_INFORMATION;
  1337. PObjectAllTypesInformation = ^TObjectAllTypesInformation;
  1338. _OBJECT_HANDLE_ATTRIBUTE_INFORMATION = record // Information Class 4
  1339. Inherit: ByteBool;
  1340. ProtectFromClose: ByteBool;
  1341. end;
  1342. OBJECT_HANDLE_ATTRIBUTE_INFORMATION = _OBJECT_HANDLE_ATTRIBUTE_INFORMATION;
  1343. POBJECT_HANDLE_ATTRIBUTE_INFORMATION = ^OBJECT_HANDLE_ATTRIBUTE_INFORMATION;
  1344. TObjectHandleAttributeInformation = OBJECT_HANDLE_ATTRIBUTE_INFORMATION;
  1345. PObjectHandleAttributeInformation = ^TObjectHandleAttributeInformation;
  1346. type
  1347. _DIRECTORY_BASIC_INFORMATION = record
  1348. ObjectName: UNICODE_STRING;
  1349. ObjectTypeName: UNICODE_STRING;
  1350. end;
  1351. DIRECTORY_BASIC_INFORMATION = _DIRECTORY_BASIC_INFORMATION;
  1352. PDIRECTORY_BASIC_INFORMATION = ^DIRECTORY_BASIC_INFORMATION;
  1353. TDirectoryBasicInformation = DIRECTORY_BASIC_INFORMATION;
  1354. PDirectoryBasicInformation = ^TDirectoryBasicInformation;
  1355. type
  1356. _MEMORY_INFORMATION_CLASS = (
  1357. MemoryBasicInformation,
  1358. MemoryWorkingSetList,
  1359. MemorySectionName,
  1360. MemoryBasicVlmInformation);
  1361. MEMORY_INFORMATION_CLASS = _MEMORY_INFORMATION_CLASS;
  1362. TMemoryInformationClass = MEMORY_INFORMATION_CLASS;
  1363. PMemoryInformationClass = ^TMemoryInformationClass;
  1364. type
  1365. _MEMORY_BASIC_INFORMATION = record // Information Class 0
  1366. BaseAddress: PVOID;
  1367. AllocationBase: PVOID;
  1368. AllocationProtect: ULONG;
  1369. RegionSize: ULONG;
  1370. State: ULONG;
  1371. Protect: ULONG;
  1372. Type_: ULONG;
  1373. end;
  1374. MEMORY_BASIC_INFORMATION = _MEMORY_BASIC_INFORMATION;
  1375. PMEMORY_BASIC_INFORMATION = ^MEMORY_BASIC_INFORMATION;
  1376. TMemoryBasicInformation = MEMORY_BASIC_INFORMATION;
  1377. PMemoryBasicInformation = ^TMemoryBasicInformation;
  1378. _MEMORY_WORKING_SET_LIST = record // Information Class 1
  1379. NumberOfPages: ULONG;
  1380. WorkingSetList: array[0..0] of ULONG;
  1381. end;
  1382. MEMORY_WORKING_SET_LIST = _MEMORY_WORKING_SET_LIST;
  1383. PMEMORY_WORKING_SET_LIST = ^MEMORY_WORKING_SET_LIST;
  1384. TMemoryWorkingSetList = MEMORY_WORKING_SET_LIST;
  1385. PMemoryWorkingSetList = ^TMemoryWorkingSetList;
  1386. _MEMORY_SECTION_NAME = record // Information Class 2
  1387. SectionFileName: UNICODE_STRING;
  1388. end;
  1389. MEMORY_SECTION_NAME = _MEMORY_SECTION_NAME;
  1390. PMEMORY_SECTION_NAME = ^MEMORY_SECTION_NAME;
  1391. TMemorySectionName = MEMORY_SECTION_NAME;
  1392. PMemorySectionName = ^TMemorySectionName;
  1393. type
  1394. _SECTION_INFORMATION_CLASS = (
  1395. SectionBasicInformation,
  1396. SectionImageInformation);
  1397. SECTION_INFORMATION_CLASS = _SECTION_INFORMATION_CLASS;
  1398. TSectionInformationClass = SECTION_INFORMATION_CLASS;
  1399. type
  1400. _SECTION_BASIC_INFORMATION = record // Information Class 0
  1401. BaseAddress: PVOID;
  1402. Attributes: ULONG;
  1403. Size: LARGE_INTEGER;
  1404. end;
  1405. SECTION_BASIC_INFORMATION = _SECTION_BASIC_INFORMATION;
  1406. PSECTION_BASIC_INFORMATION = ^SECTION_BASIC_INFORMATION;
  1407. TSectionBasicInformation = SECTION_BASIC_INFORMATION;
  1408. PSectionBasicInformation = ^TSectionBasicInformation;
  1409. _SECTION_IMAGE_INFORMATION = record // Information Class 1
  1410. EntryPoint: PVOID;
  1411. Unknown1: ULONG;
  1412. StackReserve: ULONG;
  1413. StackCommit: ULONG;
  1414. Subsystem: ULONG;
  1415. MinorSubsystemVersion: USHORT;
  1416. MajorSubsystemVersion: USHORT;
  1417. Unknown2: ULONG;
  1418. Characteristics: ULONG;
  1419. ImageNumber: USHORT;
  1420. Executable: ByteBool;
  1421. Unknown3: UCHAR;
  1422. Unknown4: array[0..2] of ULONG;
  1423. end;
  1424. SECTION_IMAGE_INFORMATION = _SECTION_IMAGE_INFORMATION;
  1425. PSECTION_IMAGE_INFORMATION = ^SECTION_IMAGE_INFORMATION;
  1426. TSectionImageInformation = SECTION_IMAGE_INFORMATION;
  1427. PSectionImageInformation = TSectionImageInformation;
  1428. type
  1429. _USER_STACK = record
  1430. FixedStackBase: PVOID;
  1431. FixedStackLimit: PVOID;
  1432. ExpandableStackBase: PVOID;
  1433. ExpandableStackLimit: PVOID;
  1434. ExpandableStackBottom: PVOID;
  1435. end;
  1436. USER_STACK = _USER_STACK;
  1437. PUSER_STACK = ^USER_STACK;
  1438. TUserStack = USER_STACK;
  1439. PUserStack = ^TUserStack;
  1440. type
  1441. _THREAD_BASIC_INFORMATION = record // Information Class 0
  1442. ExitStatus: NTSTATUS;
  1443. TebBaseAddress: PNT_TIB;
  1444. ClientId: CLIENT_ID;
  1445. AffinityMask: KAFFINITY;
  1446. Priority: KPRIORITY;
  1447. BasePriority: KPRIORITY;
  1448. end;
  1449. THREAD_BASIC_INFORMATION = _THREAD_BASIC_INFORMATION;
  1450. PTHREAD_BASIC_INFORMATION = ^THREAD_BASIC_INFORMATION;
  1451. TThreadBasicInformation = THREAD_BASIC_INFORMATION;
  1452. PThreadBasicInformation = ^TThreadBasicInformation;
  1453. type
  1454. _PROCESS_PRIORITY_CLASS = record // Information Class 18
  1455. Foreground: ByteBool;
  1456. PriorityClass: UCHAR;
  1457. end;
  1458. PROCESS_PRIORITY_CLASS = _PROCESS_PRIORITY_CLASS;
  1459. PPROCESS_PRIORITY_CLASS = ^PROCESS_PRIORITY_CLASS;
  1460. TProcessPriorityClass = PROCESS_PRIORITY_CLASS;
  1461. PProcessPriorityClass = ^TProcessPriorityClass;
  1462. _RTL_PROCESS_INFORMATION = record
  1463. Size: ULONG;
  1464. hProcess: HANDLE;
  1465. hThread: HANDLE;
  1466. ClientId: CLIENT_ID;
  1467. ImageInfo: SECTION_IMAGE_INFORMATION;
  1468. end;
  1469. RTL_PROCESS_INFORMATION = _RTL_PROCESS_INFORMATION;
  1470. PRTL_PROCESS_INFORMATION = ^RTL_PROCESS_INFORMATION;
  1471. TRtlProcessInformation = RTL_PROCESS_INFORMATION;
  1472. PRtlProcessInformation = ^RTL_PROCESS_INFORMATION;
  1473. type
  1474. _DEBUG_BUFFER = record
  1475. SectionHandle: HANDLE;
  1476. SectionBase: PVOID;
  1477. RemoteSectionBase: PVOID;
  1478. SectionBaseDelta: ULONG;
  1479. EventPairHandle: HANDLE;
  1480. Unknown: array[0..1] of ULONG;
  1481. RemoteThreadHandle: HANDLE;
  1482. InfoClassMask: ULONG;
  1483. SizeOfInfo: ULONG;
  1484. AllocatedSize: ULONG;
  1485. SectionSize: ULONG;
  1486. ModuleInformation: PVOID;
  1487. BackTraceInformation: PVOID;
  1488. HeapInformation: PVOID;
  1489. LockInformation: PVOID;
  1490. Reserved: array[0..7] of PVOID;
  1491. end;
  1492. DEBUG_BUFFER = _DEBUG_BUFFER;
  1493. PDEBUG_BUFFER = ^DEBUG_BUFFER;
  1494. TDebugBuffer = DEBUG_BUFFER;
  1495. PDebugBuffer = ^TDebugBuffer;
  1496. const
  1497. PDI_MODULES = $01;
  1498. PDI_BACKTRACE = $02;
  1499. PDI_HEAPS = $04;
  1500. PDI_HEAP_TAGS = $08;
  1501. PDI_HEAP_BLOCKS = $10;
  1502. PDI_LOCKS = $20;
  1503. type
  1504. _DEBUG_MODULE_INFORMATION = record // c.f. SYSTEM_MODULE_INFORMATION
  1505. Reserved: array[0..1] of ULONG;
  1506. Base: ULONG;
  1507. Size: ULONG;
  1508. Flags: ULONG;
  1509. Index: USHORT;
  1510. Unknown: USHORT;
  1511. LoadCount: USHORT;
  1512. ModuleNameOffset: USHORT;
  1513. ImageName: array[0..255] of CHAR;
  1514. end;
  1515. DEBUG_MODULE_INFORMATION = _DEBUG_MODULE_INFORMATION;
  1516. PDEBUG_MODULE_INFORMATION = ^DEBUG_MODULE_INFORMATION;
  1517. TDebugModuleInformation = DEBUG_MODULE_INFORMATION;
  1518. PDebugModuleInformation = ^TDebugModuleInformation;
  1519. _DEBUG_HEAP_INFORMATION = record
  1520. Base: ULONG;
  1521. Flags: ULONG;
  1522. Granularity: USHORT;
  1523. Unknown: USHORT;
  1524. Allocated: ULONG;
  1525. Committed: ULONG;
  1526. TagCount: ULONG;
  1527. BlockCount: ULONG;
  1528. Reserved: array[0..6] of ULONG;
  1529. Tags: PVOID;
  1530. Blocks: PVOID;
  1531. end;
  1532. DEBUG_HEAP_INFORMATION = _DEBUG_HEAP_INFORMATION;
  1533. PDEBUG_HEAP_INFORMATION = ^DEBUG_HEAP_INFORMATION;
  1534. TDebugHeapInformation = DEBUG_HEAP_INFORMATION;
  1535. PDebugHeapInformation = ^TDebugHeapInformation;
  1536. _DEBUG_LOCK_INFORMATION = record // c.f. SYSTEM_LOCK_INFORMATION
  1537. Address: PVOID;
  1538. Type_: USHORT;
  1539. CreatorBackTraceIndex: USHORT;
  1540. OwnerThreadId: ULONG;
  1541. ActiveCount: ULONG;
  1542. ContentionCount: ULONG;
  1543. EntryCount: ULONG;
  1544. RecursionCount: ULONG;
  1545. NumberOfSharedWaiters: ULONG;
  1546. NumberOfExclusiveWaiters: ULONG;
  1547. end;
  1548. DEBUG_LOCK_INFORMATION = _DEBUG_LOCK_INFORMATION;
  1549. PDEBUG_LOCK_INFORMATION = ^DEBUG_LOCK_INFORMATION;
  1550. TDebugLockInformation = DEBUG_LOCK_INFORMATION;
  1551. PDebugLockInformation = ^TDebugLockInformation;
  1552. type
  1553. PTIMER_APC_ROUTINE = procedure(TimerContext: PVOID; TimerLowValue: ULONG; TimerHighValue: LONG); stdcall;
  1554. type
  1555. _TIMER_INFORMATION_CLASS = (TimerBasicInformation);
  1556. TIMER_INFORMATION_CLASS = _TIMER_INFORMATION_CLASS;
  1557. TTimerInformationClass = TIMER_INFORMATION_CLASS;
  1558. type
  1559. _TIMER_BASIC_INFORMATION = record
  1560. TimeRemaining: LARGE_INTEGER;
  1561. SignalState: ByteBool;
  1562. end;
  1563. TIMER_BASIC_INFORMATION = _TIMER_BASIC_INFORMATION;
  1564. PTIMER_BASIC_INFORMATION = ^TIMER_BASIC_INFORMATION;
  1565. TTimerBasicInformation = TIMER_BASIC_INFORMATION;
  1566. PTimerBasicInformation = ^TTimerBasicInformation;
  1567. type
  1568. _EVENT_INFORMATION_CLASS = (EventBasicInformation);
  1569. EVENT_INFORMATION_CLASS = _EVENT_INFORMATION_CLASS;
  1570. TEventInformationClass = EVENT_INFORMATION_CLASS;
  1571. type
  1572. _EVENT_BASIC_INFORMATION = record
  1573. EventType: EVENT_TYPE;
  1574. SignalState: LONG;
  1575. end;
  1576. EVENT_BASIC_INFORMATION = _EVENT_BASIC_INFORMATION;
  1577. PEVENT_BASIC_INFORMATION = ^EVENT_BASIC_INFORMATION;
  1578. TEventBasicInformation = EVENT_BASIC_INFORMATION;
  1579. PEventBasicInformation = ^TEventBasicInformation;
  1580. type
  1581. _SEMAPHORE_INFORMATION_CLASS = (SemaphoreBasicInformation);
  1582. SEMAPHORE_INFORMATION_CLASS = _SEMAPHORE_INFORMATION_CLASS;
  1583. TSemaphoreInformationClass = SEMAPHORE_INFORMATION_CLASS;
  1584. type
  1585. _SEMAPHORE_BASIC_INFORMATION = record
  1586. CurrentCount: LONG;
  1587. MaximumCount: LONG;
  1588. end;
  1589. SEMAPHORE_BASIC_INFORMATION = _SEMAPHORE_BASIC_INFORMATION;
  1590. PSEMAPHORE_BASIC_INFORMATION = ^SEMAPHORE_BASIC_INFORMATION;
  1591. TSemaphoreBasicInformation = SEMAPHORE_BASIC_INFORMATION;
  1592. type
  1593. _MUTANT_INFORMATION_CLASS = (MutantBasicInformation);
  1594. MUTANT_INFORMATION_CLASS = _MUTANT_INFORMATION_CLASS;
  1595. TMutantInformationClass = MUTANT_INFORMATION_CLASS;
  1596. type
  1597. _MUTANT_BASIC_INFORMATION = record
  1598. SignalState: LONG;
  1599. Owned: ByteBool;
  1600. Abandoned: ByteBool;
  1601. end;
  1602. MUTANT_BASIC_INFORMATION = _MUTANT_BASIC_INFORMATION;
  1603. PMUTANT_BASIC_INFORMATION = ^MUTANT_BASIC_INFORMATION;
  1604. TMutantBasicInformation = MUTANT_BASIC_INFORMATION;
  1605. PMutantBasicInformation = ^TMutantBasicInformation;
  1606. type
  1607. _IO_COMPLETION_INFORMATION_CLASS = (IoCompletionBasicInformation);
  1608. IO_COMPLETION_INFORMATION_CLASS = _IO_COMPLETION_INFORMATION_CLASS;
  1609. TIoCompletionInformationClass = IO_COMPLETION_INFORMATION_CLASS;
  1610. type
  1611. _IO_COMPLETION_BASIC_INFORMATION = record
  1612. SignalState: LONG;
  1613. end;
  1614. IO_COMPLETION_BASIC_INFORMATION = _IO_COMPLETION_BASIC_INFORMATION;
  1615. PIO_COMPLETION_BASIC_INFORMATION = ^IO_COMPLETION_BASIC_INFORMATION;
  1616. TIoCompletionBasicInformation = IO_COMPLETION_BASIC_INFORMATION;
  1617. PIoCompletionBasicInformation = ^TIoCompletionBasicInformation;
  1618. type
  1619. _PORT_MESSAGE = record
  1620. DataSize: USHORT;
  1621. MessageSize: USHORT;
  1622. MessageType: USHORT;
  1623. VirtualRangesOffset: USHORT;
  1624. ClientId: CLIENT_ID;
  1625. MessageId: ULONG;
  1626. SectionSize: ULONG;
  1627. // UCHAR Data[];
  1628. end;
  1629. PORT_MESSAGE = _PORT_MESSAGE;
  1630. PPORT_MESSAGE = ^PORT_MESSAGE;
  1631. TPortMessage = PORT_MESSAGE;
  1632. PPortMessage = ^TPortMessage;
  1633. _LPC_TYPE = (
  1634. LPC_NEW_MESSAGE, // A new message
  1635. LPC_REQUEST, // A request message
  1636. LPC_REPLY, // A reply to a request message
  1637. LPC_DATAGRAM, //
  1638. LPC_LOST_REPLY, //
  1639. LPC_PORT_CLOSED, // Sent when port is deleted
  1640. LPC_CLIENT_DIED, // Messages to thread termination ports
  1641. LPC_EXCEPTION, // Messages to thread exception port
  1642. LPC_DEBUG_EVENT, // Messages to thread debug port
  1643. LPC_ERROR_EVENT, // Used by ZwRaiseHardError
  1644. LPC_CONNECTION_REQUEST); // Used by ZwConnectPort
  1645. LPC_TYPE = _LPC_TYPE;
  1646. TLpcType = LPC_TYPE;
  1647. _PORT_SECTION_WRITE = record
  1648. Length: ULONG;
  1649. SectionHandle: HANDLE;
  1650. SectionOffset: ULONG;
  1651. ViewSize: ULONG;
  1652. ViewBase: PVOID;
  1653. TargetViewBase: PVOID;
  1654. end;
  1655. PORT_SECTION_WRITE = _PORT_SECTION_WRITE;
  1656. PPORT_SECTION_WRITE = ^PORT_SECTION_WRITE;
  1657. TPortSectionWrite = PORT_SECTION_WRITE;
  1658. PPortSectionWrite = ^TPortSectionWrite;
  1659. _PORT_SECTION_READ = record
  1660. Length: ULONG;
  1661. ViewSize: ULONG;
  1662. ViewBase: ULONG;
  1663. end;
  1664. PORT_SECTION_READ = _PORT_SECTION_READ;
  1665. PPORT_SECTION_READ = ^PORT_SECTION_READ;
  1666. TPortSectionRead = PORT_SECTION_READ;
  1667. PPortSectionRead = ^TPortSectionRead;
  1668. type
  1669. _PORT_INFORMATION_CLASS = (PortBasicInformation);
  1670. PORT_INFORMATION_CLASS = _PORT_INFORMATION_CLASS;
  1671. TPortInformationClass = PORT_INFORMATION_CLASS;
  1672. type
  1673. _PORT_BASIC_INFORMATION = record
  1674. end;
  1675. PORT_BASIC_INFORMATION = _PORT_BASIC_INFORMATION;
  1676. PPORT_BASIC_INFORMATION = ^PORT_BASIC_INFORMATION;
  1677. TPortBasicInformation = PORT_BASIC_INFORMATION;
  1678. PPortBasicInformation = ^TPortBasicInformation;
  1679. type
  1680. _FILE_GET_EA_INFORMATION = record
  1681. NextEntryOffset: ULONG;
  1682. EaNameLength: UCHAR;
  1683. EaName: array[0..0] of CHAR;
  1684. end;
  1685. FILE_GET_EA_INFORMATION = _FILE_GET_EA_INFORMATION;
  1686. PFILE_GET_EA_INFORMATION = ^FILE_GET_EA_INFORMATION;
  1687. TFileGetEaInformation = FILE_GET_EA_INFORMATION;
  1688. PFileGetEaInformation = ^TFileGetEaInformation;
  1689. type
  1690. _FILE_FS_VOLUME_INFORMATION = record
  1691. VolumeCreationTime: LARGE_INTEGER;
  1692. VolumeSerialNumber: ULONG;
  1693. VolumeLabelLength: ULONG;
  1694. Unknown: UCHAR;
  1695. VolumeLabel: array[0..0] of WCHAR;
  1696. end;
  1697. FILE_FS_VOLUME_INFORMATION = _FILE_FS_VOLUME_INFORMATION;
  1698. PFILE_FS_VOLUME_INFORMATION = ^FILE_FS_VOLUME_INFORMATION;
  1699. TFileFsVolumeInformation = FILE_FS_VOLUME_INFORMATION;
  1700. PFileFsVolumeInformation = ^TFileFsVolumeInformation;
  1701. _FILE_FS_LABEL_INFORMATION = record
  1702. VolumeLabelLength: ULONG;
  1703. VolumeLabel: WCHAR;
  1704. end;
  1705. FILE_FS_LABEL_INFORMATION = _FILE_FS_LABEL_INFORMATION;
  1706. PFILE_FS_LABEL_INFORMATION = ^FILE_FS_LABEL_INFORMATION;
  1707. TFileFsLabelInformation = FILE_FS_LABEL_INFORMATION;
  1708. PFileFsLabelInformation = ^TFileFsLabelInformation;
  1709. _FILE_FS_SIZE_INFORMATION = record
  1710. TotalAllocationUnits: LARGE_INTEGER;
  1711. AvailableAllocationUnits: LARGE_INTEGER;
  1712. SectorsPerAllocationUnit: ULONG;
  1713. BytesPerSector: ULONG;
  1714. end;
  1715. FILE_FS_SIZE_INFORMATION = _FILE_FS_SIZE_INFORMATION;
  1716. PFILE_FS_SIZE_INFORMATION = ^FILE_FS_SIZE_INFORMATION;
  1717. TFileFsSizeInformation = FILE_FS_SIZE_INFORMATION;
  1718. PFileFsSizeInformation = ^TFileFsSizeInformation;
  1719. _FILE_FS_ATTRIBUTE_INFORMATION = record
  1720. FileSystemFlags: ULONG;
  1721. MaximumComponentNameLength: ULONG;
  1722. FileSystemNameLength: ULONG;
  1723. FileSystemName: array[0..0] of WCHAR
  1724. end;
  1725. FILE_FS_ATTRIBUTE_INFORMATION = _FILE_FS_ATTRIBUTE_INFORMATION;
  1726. PFILE_FS_ATTRIBUTE_INFORMATION = ^FILE_FS_ATTRIBUTE_INFORMATION;
  1727. TFileFsAttributeInformation = FILE_FS_ATTRIBUTE_INFORMATION;
  1728. PFileFsAttributeInformation = ^TFileFsAttributeInformation;
  1729. _FILE_FS_CONTROL_INFORMATION = record
  1730. Reserved: array[0..2] of LARGE_INTEGER;
  1731. DefaultQuotaThreshold: LARGE_INTEGER;
  1732. DefaultQuotaLimit: LARGE_INTEGER;
  1733. QuotaFlags: ULONG;
  1734. end;
  1735. FILE_FS_CONTROL_INFORMATION = _FILE_FS_CONTROL_INFORMATION;
  1736. PFILE_FS_CONTROL_INFORMATION = ^FILE_FS_CONTROL_INFORMATION;
  1737. TFileFsControlInformation = FILE_FS_CONTROL_INFORMATION;
  1738. PFileFsControlInformation = ^TFileFsControlInformation;
  1739. _FILE_FS_FULL_SIZE_INFORMATION = record
  1740. TotalQuotaAllocationUnits: LARGE_INTEGER;
  1741. AvailableQuotaAllocationUnits: LARGE_INTEGER;
  1742. AvailableAllocationUnits: LARGE_INTEGER;
  1743. SectorsPerAllocationUnit: ULONG;
  1744. BytesPerSector: ULONG;
  1745. end;
  1746. FILE_FS_FULL_SIZE_INFORMATION = _FILE_FS_FULL_SIZE_INFORMATION;
  1747. PFILE_FS_FULL_SIZE_INFORMATION = ^FILE_FS_FULL_SIZE_INFORMATION;
  1748. TFileFsFullSizeInformation = FILE_FS_FULL_SIZE_INFORMATION;
  1749. PFileFsFullSizeInformation = ^TFileFsFullSizeInformation;
  1750. _FILE_FS_OBJECT_ID_INFORMATION = record
  1751. VolumeObjectId: UUID;
  1752. VolumeObjectIdExtendedInfo: array[0..11] of ULONG;
  1753. end;
  1754. FILE_FS_OBJECT_ID_INFORMATION = _FILE_FS_OBJECT_ID_INFORMATION;
  1755. PFILE_FS_OBJECT_ID_INFORMATION = ^FILE_FS_OBJECT_ID_INFORMATION;
  1756. TFileFsObjectIdInformation = FILE_FS_OBJECT_ID_INFORMATION;
  1757. PFileFsObjectIdInformation = ^TFileFsObjectIdInformation;
  1758. _FILE_USER_QUOTA_INFORMATION = record
  1759. NextEntryOffset: ULONG;
  1760. SidLength: ULONG;
  1761. ChangeTime: LARGE_INTEGER;
  1762. QuotaUsed: LARGE_INTEGER;
  1763. QuotaThreshold: LARGE_INTEGER;
  1764. QuotaLimit: LARGE_INTEGER;
  1765. Sid: array[0..0] of SID;
  1766. end;
  1767. FILE_USER_QUOTA_INFORMATION = _FILE_USER_QUOTA_INFORMATION;
  1768. PFILE_USER_QUOTA_INFORMATION = ^FILE_USER_QUOTA_INFORMATION;
  1769. TFileUserQuotaInformation = FILE_USER_QUOTA_INFORMATION;
  1770. PFileUserQuotaInformation = ^TFileUserQuotaInformation;
  1771. _FILE_QUOTA_LIST_INFORMATION = record
  1772. NextEntryOffset: ULONG;
  1773. SidLength: ULONG;
  1774. Sid: array[0..0] of SID;
  1775. end;
  1776. FILE_QUOTA_LIST_INFORMATION = _FILE_QUOTA_LIST_INFORMATION;
  1777. PFILE_QUOTA_LIST_INFORMATION = ^FILE_QUOTA_LIST_INFORMATION;
  1778. TFileQuotaListInformation = FILE_QUOTA_LIST_INFORMATION;
  1779. PFileQuotaListInformation = ^TFileQuotaListInformation;
  1780. type
  1781. _FILE_DIRECTORY_INFORMATION = record // Information Class 1
  1782. NextEntryOffset: ULONG;
  1783. Unknown: ULONG;
  1784. CreationTime: LARGE_INTEGER;
  1785. LastAccessTime: LARGE_INTEGER;
  1786. LastWriteTime: LARGE_INTEGER;
  1787. ChangeTime: LARGE_INTEGER;
  1788. EndOfFile: LARGE_INTEGER;
  1789. AllocationSize: LARGE_INTEGER;
  1790. FileAttributes: ULONG;
  1791. FileNameLength: ULONG;
  1792. FileName: array[0..0] of WCHAR
  1793. end;
  1794. FILE_DIRECTORY_INFORMATION = _FILE_DIRECTORY_INFORMATION;
  1795. PFILE_DIRECTORY_INFORMATION = ^FILE_DIRECTORY_INFORMATION;
  1796. TFileDirectoryInformation = FILE_DIRECTORY_INFORMATION;
  1797. PFileDirectoryInformation = ^TFileDirectoryInformation;
  1798. _FILE_FULL_DIRECTORY_INFORMATION = record // Information Class 2
  1799. NextEntryOffset: ULONG;
  1800. Unknown: ULONG;
  1801. CreationTime: LARGE_INTEGER;
  1802. LastAccessTime: LARGE_INTEGER;
  1803. LastWriteTime: LARGE_INTEGER;
  1804. ChangeTime: LARGE_INTEGER;
  1805. EndOfFile: LARGE_INTEGER;
  1806. AllocationSize: LARGE_INTEGER;
  1807. FileAttributes: ULONG;
  1808. FileNameLength: ULONG;
  1809. EaInformationLength: ULONG;
  1810. FileName: array[0..0] of WCHAR
  1811. end;
  1812. FILE_FULL_DIRECTORY_INFORMATION = _FILE_FULL_DIRECTORY_INFORMATION;
  1813. PFILE_FULL_DIRECTORY_INFORMATION = ^FILE_FULL_DIRECTORY_INFORMATION;
  1814. TFileFullDirectoryInformation = FILE_FULL_DIRECTORY_INFORMATION;
  1815. PFileFullDirectoryInformation = ^TFileFullDirectoryInformation;
  1816. _FILE_BOTH_DIRECTORY_INFORMATION = record // Information Class 3
  1817. NextEntryOffset: ULONG;
  1818. Unknown: ULONG;
  1819. CreationTime: LARGE_INTEGER;
  1820. LastAccessTime: LARGE_INTEGER;
  1821. LastWriteTime: LARGE_INTEGER;
  1822. ChangeTime: LARGE_INTEGER;
  1823. EndOfFile: LARGE_INTEGER;
  1824. AllocationSize: LARGE_INTEGER;
  1825. FileAttributes: ULONG;
  1826. FileNameLength: ULONG;
  1827. EaInformationLength: ULONG;
  1828. AlternateNameLength: UCHAR;
  1829. AlternateName: array[0..11] of WCHAR;
  1830. FileName: array[0..0] of WCHAR;
  1831. end;
  1832. FILE_BOTH_DIRECTORY_INFORMATION = _FILE_BOTH_DIRECTORY_INFORMATION;
  1833. PFILE_BOTH_DIRECTORY_INFORMATION = ^FILE_BOTH_DIRECTORY_INFORMATION;
  1834. TFileBothDirectoryInformation = FILE_BOTH_DIRECTORY_INFORMATION;
  1835. PFileBothDirectoryInformation = ^TFileBothDirectoryInformation;
  1836. _FILE_INTERNAL_INFORMATION = record // Information Class 6
  1837. FileId: LARGE_INTEGER;
  1838. end;
  1839. FILE_INTERNAL_INFORMATION = _FILE_INTERNAL_INFORMATION;
  1840. PFILE_INTERNAL_INFORMATION = ^FILE_INTERNAL_INFORMATION;
  1841. TFileInternalInformation = FILE_INTERNAL_INFORMATION;
  1842. PFileInternalInformation = ^TFileInternalInformation;
  1843. _FILE_EA_INFORMATION = record // Information Class 7
  1844. EaInformationLength: ULONG;
  1845. end;
  1846. FILE_EA_INFORMATION = _FILE_EA_INFORMATION;
  1847. PFILE_EA_INFORMATION = ^FILE_EA_INFORMATION;
  1848. TFileEaInformation = FILE_EA_INFORMATION;
  1849. PFileEaInformation = ^TFileEaInformation;
  1850. _FILE_ACCESS_INFORMATION = record // Information Class 8
  1851. GrantedAccess: ACCESS_MASK;
  1852. end;
  1853. FILE_ACCESS_INFORMATION = _FILE_ACCESS_INFORMATION;
  1854. PFILE_ACCESS_INFORMATION = ^FILE_ACCESS_INFORMATION;
  1855. TFileAccessInformation = FILE_ACCESS_INFORMATION;
  1856. PFileAccessInformation = ^TFileAccessInformation;
  1857. _FILE_NAME_INFORMATION = record // Information Classes 9 and 21
  1858. FileNameLength: ULONG;
  1859. FileName: array[0..0] of WCHAR;
  1860. end;
  1861. FILE_NAME_INFORMATION = _FILE_NAME_INFORMATION;
  1862. PFILE_NAME_INFORMATION = ^FILE_NAME_INFORMATION;
  1863. FILE_ALTERNATE_NAME_INFORMATION = _FILE_NAME_INFORMATION;
  1864. PFILE_ALTERNATE_NAME_INFORMATION = ^FILE_ALTERNATE_NAME_INFORMATION;
  1865. TFileNameInformation = FILE_NAME_INFORMATION;
  1866. PFileNameInformation = ^TFileNameInformation;
  1867. _FILE_LINK_RENAME_INFORMATION = record // Info Classes 10 and 11
  1868. ReplaceIfExists: ByteBool;
  1869. RootDirectory: HANDLE;
  1870. FileNameLength: ULONG;
  1871. FileName: array[0..0] of WCHAR;
  1872. end;
  1873. FILE_LINK_INFORMATION = _FILE_LINK_RENAME_INFORMATION;
  1874. PFILE_LINK_INFORMATION = ^FILE_LINK_INFORMATION;
  1875. FILE_RENAME_INFORMATION = _FILE_LINK_RENAME_INFORMATION;
  1876. PFILE_RENAME_INFORMATION = ^FILE_RENAME_INFORMATION;
  1877. TFileLinkInformation = FILE_LINK_INFORMATION;
  1878. PFileLinkInformation = ^TFileLinkInformation;
  1879. _FILE_NAMES_INFORMATION = record // Information Class 12
  1880. NextEntryOffset: ULONG;
  1881. Unknown: ULONG;
  1882. FileNameLength: ULONG;
  1883. FileName: array[0..0] of WCHAR;
  1884. end;
  1885. FILE_NAMES_INFORMATION = _FILE_NAMES_INFORMATION;
  1886. PFILE_NAMES_INFORMATION = ^FILE_NAMES_INFORMATION;
  1887. TFileNamesInformation = FILE_NAMES_INFORMATION;
  1888. PFileNamesInformation = ^TFileNamesInformation;
  1889. _FILE_MODE_INFORMATION = record // Information Class 16
  1890. Mode: ULONG;
  1891. end;
  1892. FILE_MODE_INFORMATION = _FILE_MODE_INFORMATION;
  1893. PFILE_MODE_INFORMATION = ^FILE_MODE_INFORMATION;
  1894. TFileModeInformation = FILE_MODE_INFORMATION;
  1895. PFileModeInformation = ^TFileModeInformation;
  1896. _FILE_ALL_INFORMATION = record // Information Class 18
  1897. BasicInformation: FILE_BASIC_INFORMATION;
  1898. StandardInformation: FILE_STANDARD_INFORMATION;
  1899. InternalInformation: FILE_INTERNAL_INFORMATION;
  1900. EaInformation: FILE_EA_INFORMATION;
  1901. AccessInformation: FILE_ACCESS_INFORMATION;
  1902. PositionInformation: FILE_POSITION_INFORMATION;
  1903. ModeInformation: FILE_MODE_INFORMATION;
  1904. AlignmentInformation: FILE_ALIGNMENT_INFORMATION;
  1905. NameInformation: FILE_NAME_INFORMATION;
  1906. end;
  1907. FILE_ALL_INFORMATION = _FILE_ALL_INFORMATION;
  1908. PFILE_ALL_INFORMATION = ^FILE_ALL_INFORMATION;
  1909. TFileAllInformation = FILE_ALL_INFORMATION;
  1910. PFileAllInformation = ^TFileAllInformation;
  1911. _FILE_ALLOCATION_INFORMATION = record // Information Class 19
  1912. AllocationSize: LARGE_INTEGER;
  1913. end;
  1914. FILE_ALLOCATION_INFORMATION = _FILE_ALLOCATION_INFORMATION;
  1915. PFILE_ALLOCATION_INFORMATION = ^FILE_ALLOCATION_INFORMATION;
  1916. TFileAllocationInformation = FILE_ALLOCATION_INFORMATION;
  1917. PFileAllocationInformation = ^TFileAllocationInformation;
  1918. _FILE_STREAM_INFORMATION = record // Information Class 22
  1919. NextEntryOffset: ULONG;
  1920. StreamNameLength: ULONG;
  1921. EndOfStream: LARGE_INTEGER;
  1922. AllocationSize: LARGE_INTEGER;
  1923. StreamName: array[0..0] of WCHAR;
  1924. end;
  1925. FILE_STREAM_INFORMATION = _FILE_STREAM_INFORMATION;
  1926. PFILE_STREAM_INFORMATION = ^FILE_STREAM_INFORMATION;
  1927. TFileStreamInformation = FILE_STREAM_INFORMATION;
  1928. PFileStreamInformation = ^TFileStreamInformation;
  1929. _FILE_PIPE_INFORMATION = record // Information Class 23
  1930. ReadModeMessage: ULONG;
  1931. WaitModeBlocking: ULONG;
  1932. end;
  1933. FILE_PIPE_INFORMATION = _FILE_PIPE_INFORMATION;
  1934. PFILE_PIPE_INFORMATION = ^FILE_PIPE_INFORMATION;
  1935. TFilePipeInformation = FILE_PIPE_INFORMATION;
  1936. PFilePipeInformation = ^TFilePipeInformation;
  1937. _FILE_PIPE_LOCAL_INFORMATION = record // Information Class 24
  1938. MessageType: ULONG;
  1939. Unknown1: ULONG;
  1940. MaxInstances: ULONG;
  1941. CurInstances: ULONG;
  1942. InBufferSize: ULONG;
  1943. Unknown2: ULONG;
  1944. OutBufferSize: ULONG;
  1945. Unknown3: array[0..1] of ULONG;
  1946. ServerEnd: ULONG;
  1947. end;
  1948. FILE_PIPE_LOCAL_INFORMATION = _FILE_PIPE_LOCAL_INFORMATION;
  1949. PFILE_PIPE_LOCAL_INFORMATION = ^FILE_PIPE_LOCAL_INFORMATION;
  1950. TFilePipeLocalInformation = FILE_PIPE_LOCAL_INFORMATION;
  1951. PFilePipeLocalInformation = ^TFilePipeLocalInformation;
  1952. _FILE_PIPE_REMOTE_INFORMATION = record // Information Class 25
  1953. CollectDataTimeout: LARGE_INTEGER;
  1954. MaxCollectionCount: ULONG;
  1955. end;
  1956. FILE_PIPE_REMOTE_INFORMATION = _FILE_PIPE_REMOTE_INFORMATION;
  1957. PFILE_PIPE_REMOTE_INFORMATION = ^FILE_PIPE_REMOTE_INFORMATION;
  1958. TFilePipeRemoteInformation = FILE_PIPE_REMOTE_INFORMATION;
  1959. PFilePipeRemoteInformation = ^TFilePipeRemoteInformation;
  1960. _FILE_MAILSLOT_QUERY_INFORMATION = record // Information Class 26
  1961. MaxMessageSize: ULONG;
  1962. Unknown: ULONG;
  1963. NextSize: ULONG;
  1964. MessageCount: ULONG;
  1965. ReadTimeout: LARGE_INTEGER;
  1966. end;
  1967. FILE_MAILSLOT_QUERY_INFORMATION = _FILE_MAILSLOT_QUERY_INFORMATION;
  1968. PFILE_MAILSLOT_QUERY_INFORMATION = ^FILE_MAILSLOT_QUERY_INFORMATION;
  1969. TFileMailslotQueryInformation = FILE_MAILSLOT_QUERY_INFORMATION;
  1970. PFileMailslotQueryInformation = ^TFileMailslotQueryInformation;
  1971. _FILE_MAILSLOT_SET_INFORMATION = record // Information Class 27
  1972. ReadTimeout: LARGE_INTEGER;
  1973. end;
  1974. FILE_MAILSLOT_SET_INFORMATION = _FILE_MAILSLOT_SET_INFORMATION;
  1975. PFILE_MAILSLOT_SET_INFORMATION = ^FILE_MAILSLOT_SET_INFORMATION;
  1976. TFileMailslotSetInformation = FILE_MAILSLOT_SET_INFORMATION;
  1977. PFileMailslotSetInformation = ^TFileMailslotSetInformation;
  1978. _FILE_COMPRESSION_INFORMATION = record // Information Class 28
  1979. CompressedSize: LARGE_INTEGER;
  1980. CompressionFormat: USHORT;
  1981. CompressionUnitShift: UCHAR;
  1982. Unknown: UCHAR;
  1983. ClusterSizeShift: UCHAR;
  1984. end;
  1985. FILE_COMPRESSION_INFORMATION = _FILE_COMPRESSION_INFORMATION;
  1986. PFILE_COMPRESSION_INFORMATION = ^FILE_COMPRESSION_INFORMATION;
  1987. TFileCompressionInformation = FILE_COMPRESSION_INFORMATION;
  1988. PFileCompressionInformation = ^TFileCompressionInformation;
  1989. _FILE_COMPLETION_INFORMATION = record // Information Class 30
  1990. IoCompletionHandle: HANDLE;
  1991. CompletionKey: ULONG;
  1992. end;
  1993. FILE_COMPLETION_INFORMATION = _FILE_COMPLETION_INFORMATION;
  1994. PFILE_COMPLETION_INFORMATION = ^FILE_COMPLETION_INFORMATION;
  1995. TFileCompletionInformation = FILE_COMPLETION_INFORMATION;
  1996. PFileCompletionInformation = ^TFileCompletionInformation;
  1997. type
  1998. PEXECUTION_STATE = ^EXECUTION_STATE;
  1999. PExecutionState = PEXECUTION_STATE;
  2000. type
  2001. PLANGID = ^LANGID;
  2002. type
  2003. _ATOM_INFORMATION_CLASS = (AtomBasicInformation, AtomListInformation);
  2004. ATOM_INFORMATION_CLASS = _ATOM_INFORMATION_CLASS;
  2005. TAtomInformationClass = ATOM_INFORMATION_CLASS;
  2006. type
  2007. _ATOM_BASIC_INFORMATION = record
  2008. ReferenceCount: USHORT;
  2009. Pinned: USHORT;
  2010. NameLength: USHORT;
  2011. Name: array[0..0] of WCHAR;
  2012. end;
  2013. ATOM_BASIC_INFORMATION = _ATOM_BASIC_INFORMATION;
  2014. PATOM_BASIC_INFORMATION = ^ATOM_BASIC_INFORMATION;
  2015. TAtomBasicInformation = ATOM_BASIC_INFORMATION;
  2016. PAtomBasicInformation = ^TAtomBasicInformation;
  2017. _ATOM_LIST_INFORMATION = record
  2018. NumberOfAtoms: ULONG;
  2019. Atoms: array[0..0] of ATOM;
  2020. end;
  2021. ATOM_LIST_INFORMATION = _ATOM_LIST_INFORMATION;
  2022. PATOM_LIST_INFORMATION = ^ATOM_LIST_INFORMATION;
  2023. TAtomListInformation = ATOM_LIST_INFORMATION;
  2024. PAtomListInformation = ^TAtomListInformation;
  2025. //==============================================================================
  2026. // NTFS on disk structure structures
  2027. //==============================================================================
  2028. type
  2029. _NTFS_RECORD_HEADER = record
  2030. Type_: ULONG;
  2031. UsaOffset: USHORT;
  2032. UsaCount: USHORT;
  2033. Usn: USN;
  2034. end;
  2035. NTFS_RECORD_HEADER = _NTFS_RECORD_HEADER;
  2036. PNTFS_RECORD_HEADER = ^NTFS_RECORD_HEADER;
  2037. TNtfsRecordHeader = NTFS_RECORD_HEADER;
  2038. PNtfsRecordHeader = ^TNtfsRecordHeader;
  2039. _FILE_RECORD_HEADER = record
  2040. Ntfs: NTFS_RECORD_HEADER;
  2041. SequenceNumber: USHORT;
  2042. LinkCount: USHORT;
  2043. AttributesOffset: USHORT;
  2044. Flags: USHORT; // 0x0001 = InUse, 0x0002 = Directory
  2045. BytesInUse: ULONG;
  2046. BytesAllocated: ULONG;
  2047. BaseFileRecord: ULONGLONG;
  2048. NextAttributeNumber: USHORT;
  2049. end;
  2050. FILE_RECORD_HEADER = _FILE_RECORD_HEADER;
  2051. PFILE_RECORD_HEADER = ^FILE_RECORD_HEADER;
  2052. TFileRecordHeader = FILE_RECORD_HEADER;
  2053. PFileRecordHeader = ^TFileRecordHeader;
  2054. const
  2055. AttributeStandardInformation = $10;
  2056. AttributeAttributeList = $20;
  2057. AttributeFileName = $30;
  2058. AttributeObjectId = $40;
  2059. AttributeSecurityDescriptor = $50;
  2060. AttributeVolumeName = $60;
  2061. AttributeVolumeInformation = $70;
  2062. AttributeData = $80;
  2063. AttributeIndexRoot = $90;
  2064. AttributeIndexAllocation = $A0;
  2065. AttributeBitmap = $B0;
  2066. AttributeReparsePoint = $C0;
  2067. AttributeEAInformation = $D0;
  2068. AttributeEA = $E0;
  2069. AttributePropertySet = $F0;
  2070. AttributeLoggedUtilityStream = $100;
  2071. type
  2072. ATTRIBUTE_TYPE = AttributeStandardInformation..AttributeLoggedUtilityStream;
  2073. PATTRIBUTE_TYPE = ^ATTRIBUTE_TYPE;
  2074. TAttributeType = ATTRIBUTE_TYPE;
  2075. _ATTRIBUTE = record
  2076. AttributeType: ATTRIBUTE_TYPE;
  2077. Length: ULONG;
  2078. Nonresident: ByteBool;
  2079. NameLength: UCHAR;
  2080. NameOffset: USHORT;
  2081. Flags: USHORT; // 0x0001 = Compressed
  2082. AttributeNumber: USHORT;
  2083. end;
  2084. ATTRIBUTE = _ATTRIBUTE;
  2085. PATTRIBUTE = ^ATTRIBUTE;
  2086. TAttribute = ATTRIBUTE;
  2087. _RESIDENT_ATTRIBUTE = record
  2088. Attribute: ATTRIBUTE;
  2089. ValueLength: ULONG;
  2090. ValueOffset: USHORT;
  2091. Flags: USHORT; // 0x0001 = Indexed
  2092. end;
  2093. RESIDENT_ATTRIBUTE = _RESIDENT_ATTRIBUTE;
  2094. PRESIDENT_ATTRIBUTE = ^RESIDENT_ATTRIBUTE;
  2095. TResidentAttribute = RESIDENT_ATTRIBUTE;
  2096. PResidentAttribute = ^TResidentAttribute;
  2097. _NONRESIDENT_ATTRIBUTE = record
  2098. Attribute: ATTRIBUTE;
  2099. LowVcn: ULONGLONG;
  2100. HighVcn: ULONGLONG;
  2101. RunArrayOffset: USHORT;
  2102. CompressionUnit: UCHAR;
  2103. AlignmentOrReserved: array[0..4] of UCHAR;
  2104. AllocatedSize: ULONGLONG;
  2105. DataSize: ULONGLONG;
  2106. InitializedSize: ULONGLONG;
  2107. CompressedSize: ULONGLONG; // Only when compressed
  2108. end;
  2109. NONRESIDENT_ATTRIBUTE = _NONRESIDENT_ATTRIBUTE;
  2110. PNONRESIDENT_ATTRIBUTE = ^NONRESIDENT_ATTRIBUTE;
  2111. TNonResidentAttribute = NONRESIDENT_ATTRIBUTE;
  2112. PNonResidentAttribute = ^TNonResidentAttribute;
  2113. _STANDARD_INFORMATION = record
  2114. CreationTime: ULONGLONG;
  2115. ChangeTime: ULONGLONG;
  2116. LastWriteTime: ULONGLONG;
  2117. LastAccessTime: ULONGLONG;
  2118. FileAttributes: ULONG;
  2119. AlignmentOrReservedOrUnknown: array[0..2] of ULONG;
  2120. QuotaId: ULONG; // NTFS 3.0 only
  2121. SecurityId: ULONG; // NTFS 3.0 only
  2122. QuotaCharge: ULONGLONG; // NTFS 3.0 only
  2123. Usn: USN; // NTFS 3.0 only
  2124. end;
  2125. STANDARD_INFORMATION = _STANDARD_INFORMATION;
  2126. PSTANDARD_INFORMATION = ^STANDARD_INFORMATION;
  2127. TStandardInformation = STANDARD_INFORMATION;
  2128. PStandardInformation = ^TStandardInformation;
  2129. _ATTRIBUTE_LIST = record
  2130. AttributeType: ATTRIBUTE_TYPE;
  2131. Length: USHORT;
  2132. NameLength: UCHAR;
  2133. NameOffset: UCHAR;
  2134. LowVcn: ULONGLONG;
  2135. FileReferenceNumber: ULONGLONG;
  2136. AttributeNumber: USHORT;
  2137. AlignmentOrReserved: array[0..2] of USHORT;
  2138. end;
  2139. ATTRIBUTE_LIST = _ATTRIBUTE_LIST;
  2140. PATTRIBUTE_LIST = ^ATTRIBUTE_LIST;
  2141. TAttributeList = ATTRIBUTE_LIST;
  2142. PAttributeList = ^TAttributeList;
  2143. _FILENAME_ATTRIBUTE = record
  2144. DirectoryFileReferenceNumber: ULONGLONG;
  2145. CreationTime: ULONGLONG; // Saved when filename last changed
  2146. ChangeTime: ULONGLONG; // ditto
  2147. LastWriteTime: ULONGLONG; // ditto
  2148. LastAccessTime: ULONGLONG; // ditto
  2149. AllocatedSize: ULONGLONG; // ditto
  2150. DataSize: ULONGLONG; // ditto
  2151. FileAttributes: ULONG; // ditto
  2152. AlignmentOrReserved: ULONG;
  2153. NameLength: UCHAR;
  2154. NameType: UCHAR; // 0x01 = Long, 0x02 = Short
  2155. Name: array[0..0] of UCHAR;
  2156. end;
  2157. FILENAME_ATTRIBUTE = _FILENAME_ATTRIBUTE;
  2158. PFILENAME_ATTRIBUTE = ^FILENAME_ATTRIBUTE;
  2159. TFilenameAttribute = FILENAME_ATTRIBUTE;
  2160. PFilenameAttribute = ^TFilenameAttribute;
  2161. _OBJECTID_ATTRIBUTE = record
  2162. ObjectId: GUID;
  2163. case Integer of
  2164. 0: (
  2165. BirthVolumeId: GUID;
  2166. BirthObjectId: GUID;
  2167. DomainId: GUID);
  2168. 1: (
  2169. ExtendedInfo: array[0..47] of UCHAR
  2170. );
  2171. end;
  2172. OBJECTID_ATTRIBUTE = _OBJECTID_ATTRIBUTE;
  2173. POBJECTID_ATTRIBUTE = ^OBJECTID_ATTRIBUTE;
  2174. TObjectIdAttribute = OBJECTID_ATTRIBUTE;
  2175. PObjectIdAttribute = ^TObjectIdAttribute;
  2176. _VOLUME_INFORMATION = record
  2177. Unknown: array[0..1] of ULONG;
  2178. MajorVersion: UCHAR;
  2179. MinorVersion: UCHAR;
  2180. Flags: USHORT;
  2181. end;
  2182. VOLUME_INFORMATION = _VOLUME_INFORMATION;
  2183. PVOLUME_INFORMATION = ^VOLUME_INFORMATION;
  2184. TVolumeInformation = VOLUME_INFORMATION;
  2185. PVolumeInformation = ^TVolumeInformation;
  2186. _DIRECTORY_INDEX = record
  2187. EntriesOffset: ULONG;
  2188. IndexBlockLength: ULONG;
  2189. AllocatedSize: ULONG;
  2190. Flags: ULONG; // 0x00 = Small directory, 0x01 = Large directory
  2191. end;
  2192. DIRECTORY_INDEX = _DIRECTORY_INDEX;
  2193. PDIRECTORY_INDEX = ^DIRECTORY_INDEX;
  2194. TDirectoryIndex = DIRECTORY_INDEX;
  2195. PDirectoryIndex = ^TDirectoryIndex;
  2196. _DIRECTORY_ENTRY = record
  2197. FileReferenceNumber: ULONGLONG;
  2198. Length: USHORT;
  2199. AttributeLength: USHORT;
  2200. Flags: ULONG; // 0x01 = Has trailing VCN, 0x02 = Last entry
  2201. // FILENAME_ATTRIBUTE Name;
  2202. // ULONGLONG Vcn; // VCN in IndexAllocation of earlier entries
  2203. end;
  2204. DIRECTORY_ENTRY = _DIRECTORY_ENTRY;
  2205. PDIRECTORY_ENTRY = ^DIRECTORY_ENTRY;
  2206. TDirectoryEntry = DIRECTORY_ENTRY;
  2207. PDirectoryEntry = ^TDirectoryEntry;
  2208. _INDEX_ROOT = record
  2209. Type_: ATTRIBUTE_TYPE;
  2210. CollationRule: ULONG;
  2211. BytesPerIndexBlock: ULONG;
  2212. ClustersPerIndexBlock: ULONG;
  2213. DirectoryIndex: DIRECTORY_INDEX;
  2214. end;
  2215. INDEX_ROOT = _INDEX_ROOT;
  2216. PINDEX_ROOT = ^INDEX_ROOT;
  2217. TIndexRoot = INDEX_ROOT;
  2218. PIndexRoot = ^TIndexRoot;
  2219. _INDEX_BLOCK_HEADER = record
  2220. Ntfs: NTFS_RECORD_HEADER;
  2221. IndexBlockVcn: ULONGLONG;
  2222. DirectoryIndex: DIRECTORY_INDEX;
  2223. end;
  2224. INDEX_BLOCK_HEADER = _INDEX_BLOCK_HEADER;
  2225. PINDEX_BLOCK_HEADER = ^INDEX_BLOCK_HEADER;
  2226. TIndexBlockHeader = _INDEX_BLOCK_HEADER;
  2227. PIndexBlockHeader = ^TIndexBlockHeader;
  2228. _REPARSE_POINT = record
  2229. ReparseTag: ULONG;
  2230. ReparseDataLength: USHORT;
  2231. Reserved: USHORT;
  2232. ReparseData: array[0..0] of UCHAR;
  2233. end;
  2234. REPARSE_POINT = _REPARSE_POINT;
  2235. PREPARSE_POINT = ^REPARSE_POINT;
  2236. TReparsePoint = REPARSE_POINT;
  2237. PReparsePoint = ^TReparsePoint;
  2238. _EA_INFORMATION = record
  2239. EaLength: ULONG;
  2240. EaQueryLength: ULONG;
  2241. end;
  2242. EA_INFORMATION = _EA_INFORMATION;
  2243. PEA_INFORMATION = ^EA_INFORMATION;
  2244. TEaInformation = EA_INFORMATION;
  2245. PEaInformation = ^TEaInformation;
  2246. _EA_ATTRIBUTE = record
  2247. NextEntryOffset: ULONG;
  2248. Flags: UCHAR;
  2249. EaNameLength: UCHAR;
  2250. EaValueLength: USHORT;
  2251. EaName: array[0..0] of CHAR;
  2252. // UCHAR EaData[];
  2253. end;
  2254. EA_ATTRIBUTE = _EA_ATTRIBUTE;
  2255. PEA_ATTRIBUTE = ^EA_ATTRIBUTE;
  2256. TEaAttribute = EA_ATTRIBUTE;
  2257. PEaAttribute = ^TEaAttribute;
  2258. _ATTRIBUTE_DEFINITION = record
  2259. AttributeName: array[0..63] of WCHAR;
  2260. AttributeNumber: ULONG;
  2261. Unknown: array[0..1] of ULONG;
  2262. Flags: ULONG;
  2263. MinimumSize: ULONGLONG;
  2264. MaximumSize: ULONGLONG;
  2265. end;
  2266. ATTRIBUTE_DEFINITION = _ATTRIBUTE_DEFINITION;
  2267. PATTRIBUTE_DEFINITION = ^ATTRIBUTE_DEFINITION;
  2268. TAttributeDefinition = ATTRIBUTE_DEFINITION;
  2269. PAttributeDefinition = ^TAttributeDefinition;
  2270. _BOOT_BLOCK = record
  2271. Jump: array[0..2] of UCHAR;
  2272. Format: array[0..7] of UCHAR;
  2273. BytesPerSector: USHORT;
  2274. SectorsPerCluster: UCHAR;
  2275. BootSectors: USHORT;
  2276. Mbz1: UCHAR;
  2277. Mbz2: USHORT;
  2278. Reserved1: USHORT;
  2279. MediaType: UCHAR;
  2280. Mbz3: USHORT;
  2281. SectorsPerTrack: USHORT;
  2282. NumberOfHeads: USHORT;
  2283. PartitionOffset: ULONG;
  2284. Reserved2: array[0..1] of ULONG;
  2285. TotalSectors: ULONGLONG;
  2286. MftStartLcn: ULONGLONG;
  2287. Mft2StartLcn: ULONGLONG;
  2288. ClustersPerFileRecord: ULONG;
  2289. ClustersPerIndexBlock: ULONG;
  2290. VolumeSerialNumber: ULONGLONG;
  2291. Code: array[0..$1AD] of UCHAR;
  2292. BootSignature: USHORT;
  2293. end;
  2294. BOOT_BLOCK = _BOOT_BLOCK;
  2295. PBOOT_BLOCK = ^BOOT_BLOCK;
  2296. TBootBlock = BOOT_BLOCK;
  2297. PBootBlock = ^TBootBlock;
  2298. const
  2299. DBG_STATUS_CONTROL_C = 1;
  2300. DBG_STATUS_SYSRQ = 2;
  2301. DBG_STATUS_BUGCHECK_FIRST = 3;
  2302. DBG_STATUS_BUGCHECK_SECOND = 4;
  2303. DBG_STATUS_FATAL = 5;
  2304. DBG_STATUS_DEBUG_CONTROL = 6;
  2305. //function DbgPrint(Format: PCH; ...): ULONG; cdecl;
  2306. //function DbgPrintReturnControlC(Format: PCH; ...): ULONG; cdecl;
  2307. //==============================================================================
  2308. // Runtime Library
  2309. //==============================================================================
  2310. const
  2311. RTL_RANGE_LIST_ADD_IF_CONFLICT = $00000001;
  2312. RTL_RANGE_LIST_ADD_SHARED = $00000002;
  2313. const
  2314. RTL_RANGE_LIST_SHARED_OK = $00000001;
  2315. RTL_RANGE_LIST_NULL_CONFLICT_OK = $00000002;
  2316. type
  2317. PRTL_CONFLICT_RANGE_CALLBACK = function(Context: PVOID; Range: PRTL_RANGE): ByteBool; stdcall;
  2318. type
  2319. _OSVERSIONINFOW = record
  2320. dwOSVersionInfoSize: ULONG;
  2321. dwMajorVersion: ULONG;
  2322. dwMinorVersion: ULONG;
  2323. dwBuildNumber: ULONG;
  2324. dwPlatformId: ULONG;
  2325. szCSDVersion: array[0..127] of WCHAR; // Maintenance string for PSS usage
  2326. end;
  2327. OSVERSIONINFOW = _OSVERSIONINFOW;
  2328. POSVERSIONINFOW = ^OSVERSIONINFOW;
  2329. LPOSVERSIONINFOW = ^OSVERSIONINFOW;
  2330. RTL_OSVERSIONINFOW = OSVERSIONINFOW;
  2331. PRTL_OSVERSIONINFOW = ^OSVERSIONINFOW;
  2332. TOsVersionInfoW = OSVERSIONINFOW;
  2333. //POsVersionInfoW = ^TOsVersionInfoW;
  2334. OSVERSIONINFO = OSVERSIONINFOW;
  2335. POSVERSIONINFO = POSVERSIONINFOW;
  2336. LPOSVERSIONINFO = LPOSVERSIONINFOW;
  2337. const
  2338. VER_PLATFORM_WIN32s = 0;
  2339. VER_PLATFORM_WIN32_WINDOWS = 1;
  2340. VER_PLATFORM_WIN32_NT = 2;
  2341. type
  2342. _RTL_BITMAP = record
  2343. SizeOfBitMap: ULONG; // Number of bits in bit map
  2344. Buffer: PULONG; // Pointer to the bit map itself
  2345. end;
  2346. RTL_BITMAP = _RTL_BITMAP;
  2347. PRTL_BITMAP = ^RTL_BITMAP;
  2348. TRtlBitmap = RTL_BITMAP;
  2349. PRtlBitmap = ^TRtlBitmap;
  2350. const
  2351. RTL_REGISTRY_ABSOLUTE = 0; // Path is a full path
  2352. RTL_REGISTRY_SERVICES = 1; // \Registry\Machine\System\CurrentControlSet\Services
  2353. RTL_REGISTRY_CONTROL = 2; // \Registry\Machine\System\CurrentControlSet\Control
  2354. RTL_REGISTRY_WINDOWS_NT = 3; // \Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion
  2355. RTL_REGISTRY_DEVICEMAP = 4; // \Registry\Machine\Hardware\DeviceMap
  2356. RTL_REGISTRY_USER = 5; // \Registry\User\CurrentUser
  2357. RTL_REGISTRY_MAXIMUM = 6;
  2358. RTL_REGISTRY_HANDLE = $40000000; // Low order bits are registry handle
  2359. RTL_REGISTRY_OPTIONAL = $80000000; // Indicates the key node is optional
  2360. type
  2361. _TIME_FIELDS = record
  2362. Year: CSHORT; // range [1601...]
  2363. Month: CSHORT; // range [1..12]
  2364. Day: CSHORT; // range [1..31]
  2365. Hour: CSHORT; // range [0..23]
  2366. Minute: CSHORT; // range [0..59]
  2367. Second: CSHORT; // range [0..59]
  2368. Milliseconds: CSHORT; // range [0..999]
  2369. Weekday: CSHORT; // range [0..6] == [Sunday..Saturday]
  2370. end;
  2371. TIME_FIELDS = _TIME_FIELDS;
  2372. PTIME_FIELDS = ^TIME_FIELDS;
  2373. TTimeFields = TIME_FIELDS;
  2374. PTimeFields = ^TTimeFields;
  2375. type
  2376. _OSVERSIONINFOEXW = record
  2377. dwOSVersionInfoSize: ULONG;
  2378. dwMajorVersion: ULONG;
  2379. dwMinorVersion: ULONG;
  2380. dwBuildNumber: ULONG;
  2381. dwPlatformId: ULONG;
  2382. szCSDVersion: array[0..127] of WCHAR; // Maintenance string for PSS usage
  2383. wServicePackMajor: USHORT;
  2384. wServicePackMinor: USHORT;
  2385. wSuiteMask: USHORT;
  2386. wProductType: UCHAR;
  2387. wReserved: UCHAR;
  2388. end;
  2389. OSVERSIONINFOEXW = _OSVERSIONINFOEXW;
  2390. POSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
  2391. LPOSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
  2392. RTL_OSVERSIONINFOEXW = OSVERSIONINFOEXW;
  2393. PRTL_OSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
  2394. TOsVersionInfoExW = OSVERSIONINFOEXW;
  2395. //POsVersionInfoExW = ^TOsVersionInfoExW;
  2396. OSVERSIONINFOEX = OSVERSIONINFOEXW;
  2397. POSVERSIONINFOEX = POSVERSIONINFOEXW;
  2398. LPOSVERSIONINFOEX = LPOSVERSIONINFOEXW;
  2399. //
  2400. // RtlVerifyVersionInfo() conditions
  2401. //
  2402. const
  2403. VER_EQUAL = 1;
  2404. VER_GREATER = 2;
  2405. VER_GREATER_EQUAL = 3;
  2406. VER_LESS = 4;
  2407. VER_LESS_EQUAL = 5;
  2408. VER_AND = 6;
  2409. VER_OR = 7;
  2410. VER_CONDITION_MASK = 7;
  2411. VER_NUM_BITS_PER_CONDITION_MASK = 3;
  2412. //
  2413. // RtlVerifyVersionInfo() type mask bits
  2414. //
  2415. VER_MINORVERSION = $0000001;
  2416. VER_MAJORVERSION = $0000002;
  2417. VER_BUILDNUMBER = $0000004;
  2418. VER_PLATFORMID = $0000008;
  2419. VER_SERVICEPACKMINOR = $0000010;
  2420. VER_SERVICEPACKMAJOR = $0000020;
  2421. VER_SUITENAME = $0000040;
  2422. VER_PRODUCT_TYPE = $0000080;
  2423. //
  2424. // RtlVerifyVersionInfo() os product type values
  2425. //
  2426. VER_NT_WORKSTATION = $0000001;
  2427. VER_NT_DOMAIN_CONTROLLER = $0000002;
  2428. VER_NT_SERVER = $0000003;
  2429. //
  2430. // Related constant(s) for RtlDetermineDosPathNameType_U()
  2431. //
  2432. INVALID_PATH = 0;
  2433. UNC_PATH = 1;
  2434. ABSOLUTE_DRIVE_PATH = 2;
  2435. RELATIVE_DRIVE_PATH = 3;
  2436. ABSOLUTE_PATH = 4;
  2437. RELATIVE_PATH = 5;
  2438. DEVICE_PATH = 6;
  2439. UNC_DOT_PATH = 7;
  2440. type
  2441. PRTL_QUERY_REGISTRY_ROUTINE = function(ValueName: PWSTR; ValueType: ULONG;
  2442. ValueData: PVOID; ValueLength: ULONG; Context, EntryContext: PVOID): NTSTATUS; stdcall;
  2443. _RTL_QUERY_REGISTRY_TABLE = record
  2444. QueryRoutine: PRTL_QUERY_REGISTRY_ROUTINE;
  2445. Flags: ULONG;
  2446. Name: PWSTR;
  2447. EntryContext: PVOID;
  2448. DefaultType: ULONG;
  2449. DefaultData: PVOID;
  2450. DefaultLength: ULONG;
  2451. end;
  2452. RTL_QUERY_REGISTRY_TABLE = _RTL_QUERY_REGISTRY_TABLE;
  2453. PRTL_QUERY_REGISTRY_TABLE = ^RTL_QUERY_REGISTRY_TABLE;
  2454. TRtlQueryRegistryTable = RTL_QUERY_REGISTRY_TABLE;
  2455. PRtlQueryRegistryTable = ^TRtlQueryRegistryTable;
  2456. REFGUID = ^GUID;
  2457. TRefGuid = REFGUID;
  2458. const
  2459. // Should be defined, but isn't
  2460. HEAP_ZERO_MEMORY = $00000008;
  2461. type
  2462. // =================================================================
  2463. // PROCESS ENVIRONMENT BLOCK (PEB)
  2464. // =================================================================
  2465. // Verified in XP using WinDbg
  2466. _LDR_DATA_TABLE_ENTRY = record // not packed!
  2467. case Integer of
  2468. (* *)0: (
  2469. (*000*)InLoadOrderLinks: LIST_ENTRY
  2470. );
  2471. (* *)1: (
  2472. (*000*)InMemoryOrderLinks: LIST_ENTRY
  2473. );
  2474. (* *)2: (
  2475. (*000*)InInitializationOrderLinks: LIST_ENTRY;
  2476. (*008*)DllBase: PVOID;
  2477. (*00c*)EntryPoint: PVOID;
  2478. (*010*)SizeOfImage: ULONG;
  2479. (*014*)FullDllName: UNICODE_STRING;
  2480. (*01c*)BaseDllName: UNICODE_STRING;
  2481. (*024*)Flags: ULONG;
  2482. (*028*)LoadCount: USHORT;
  2483. (*02a*)TlsIndex: USHORT;
  2484. (*02c*)HashLinks: LIST_ENTRY;
  2485. (*034*)SectionPointer: PVOID;
  2486. (*038*)CheckSum: ULONG;
  2487. (*03C*)TimeDateStamp: ULONG;
  2488. (*040*)LoadedImports: PVOID;
  2489. (*044*)EntryPointActivationContext: PVOID; // PACTIVATION_CONTEXT
  2490. (*048*)PatchInformation: PVOID;
  2491. )
  2492. end;
  2493. LDR_DATA_TABLE_ENTRY = _LDR_DATA_TABLE_ENTRY;
  2494. PLDR_DATA_TABLE_ENTRY = ^_LDR_DATA_TABLE_ENTRY;
  2495. PPLDR_DATA_TABLE_ENTRY = ^PLDR_DATA_TABLE_ENTRY;
  2496. TLdrDataTableEntry = _LDR_DATA_TABLE_ENTRY;
  2497. PLdrDataTableEntry = ^_LDR_DATA_TABLE_ENTRY;
  2498. // Verified in XP using WinDbg
  2499. _PEB_LDR_DATA = record // not packed!
  2500. (*000*)Length: ULONG;
  2501. (*004*)Initialized: BOOLEAN;
  2502. (*008*)SsHandle: PVOID;
  2503. (*00c*)InLoadOrderModuleList: LIST_ENTRY;
  2504. (*014*)InMemoryOrderModuleList: LIST_ENTRY;
  2505. (*01c*)InInitializationOrderModuleList: LIST_ENTRY;
  2506. (*024*)EntryInProgress: PVOID;
  2507. end;
  2508. PEB_LDR_DATA = _PEB_LDR_DATA;
  2509. PPEB_LDR_DATA = ^_PEB_LDR_DATA;
  2510. PPPEB_LDR_DATA = ^PPEB_LDR_DATA;
  2511. TPebLdrData = _PEB_LDR_DATA;
  2512. PPebLdrData = ^_PEB_LDR_DATA;
  2513. // Verified in XP using WinDbg
  2514. _RTL_DRIVE_LETTER_CURDIR = record // not packed!
  2515. (*000*)Flags: USHORT;
  2516. (*002*)Length: USHORT;
  2517. (*004*)TimeStamp: ULONG;
  2518. (*008*)DosPath: _STRING;
  2519. end;
  2520. RTL_DRIVE_LETTER_CURDIR = _RTL_DRIVE_LETTER_CURDIR;
  2521. PRTL_DRIVE_LETTER_CURDIR = ^_RTL_DRIVE_LETTER_CURDIR;
  2522. PPRTL_DRIVE_LETTER_CURDIR = ^PRTL_DRIVE_LETTER_CURDIR;
  2523. TRtlDriveLetterCurdir = _RTL_DRIVE_LETTER_CURDIR;
  2524. PRtlDriveLetterCurdir = ^_RTL_DRIVE_LETTER_CURDIR;
  2525. _CURDIR = record // not packed!
  2526. (*000*)DosPath: UNICODE_STRING;
  2527. (*008*)Handle: HANDLE;
  2528. end;
  2529. CURDIR = _CURDIR;
  2530. PCURDIR = ^_CURDIR;
  2531. PPCURDIR = ^PCURDIR;
  2532. TCurdir = _CURDIR;
  2533. // PCurdir = ^_CURDIR; // <--- Pascal is case-insensitive
  2534. // Verified in XP using WinDbg
  2535. _RTL_USER_PROCESS_PARAMETERS = record // not packed!
  2536. (*000*)MaximumLength: ULONG;
  2537. (*004*)Length: ULONG;
  2538. (*008*)Flags: ULONG; // Bit 0: all pointers normalized
  2539. (*00c*)DebugFlags: ULONG;
  2540. (*010*)ConsoleHandle: HANDLE;
  2541. (*014*)ConsoleFlags: ULONG;
  2542. (*018*)StandardInput: HANDLE;
  2543. (*01c*)StandardOutput: HANDLE;
  2544. (*020*)StandardError: HANDLE;
  2545. (*024*)CurrentDirectory: CURDIR;
  2546. (*030*)DllPath: UNICODE_STRING;
  2547. (*038*)ImagePathName: UNICODE_STRING;
  2548. (*040*)CommandLine: UNICODE_STRING;
  2549. (*048*)Environment: PVOID;
  2550. (*04c*)StartingX: ULONG;
  2551. (*050*)StartingY: ULONG;
  2552. (*054*)CountX: ULONG;
  2553. (*058*)CountY: ULONG;
  2554. (*05c*)CountCharsX: ULONG;
  2555. (*060*)CountCharsY: ULONG;
  2556. (*064*)FillAttribute: ULONG;
  2557. (*068*)WindowFlags: ULONG;
  2558. (*06c*)ShowWindowFlags: ULONG;
  2559. (*070*)WindowTitle: UNICODE_STRING;
  2560. (*078*)DesktopInfo: UNICODE_STRING;
  2561. (*080*)ShellInfo: UNICODE_STRING;
  2562. (*088*)RuntimeData: UNICODE_STRING;
  2563. (*090*)CurrentDirectories: array[0..31] of RTL_DRIVE_LETTER_CURDIR;
  2564. end;
  2565. RTL_USER_PROCESS_PARAMETERS = _RTL_USER_PROCESS_PARAMETERS;
  2566. PRTL_USER_PROCESS_PARAMETERS = ^_RTL_USER_PROCESS_PARAMETERS;
  2567. PPRTL_USER_PROCESS_PARAMETERS = ^PRTL_USER_PROCESS_PARAMETERS;
  2568. TRtlUserProcessParameters = _RTL_USER_PROCESS_PARAMETERS;
  2569. PRtlUserProcessParameters = ^_RTL_USER_PROCESS_PARAMETERS;
  2570. TProcessParameters = _RTL_USER_PROCESS_PARAMETERS;
  2571. PProcessParameters = ^_RTL_USER_PROCESS_PARAMETERS;
  2572. _SYSTEM_STRINGS = record // not packed!
  2573. (*000*)SystemRoot: UNICODE_STRING; // %SystemRoot%
  2574. (*008*)System32Root: UNICODE_STRING; // %SystemRoot%\System32
  2575. (*010*)BaseNamedObjects: UNICODE_STRING; // \BaseNamedObjects
  2576. end;
  2577. SYSTEM_STRINGS = _SYSTEM_STRINGS;
  2578. PSYSTEM_STRINGS = ^_SYSTEM_STRINGS;
  2579. PPSYSTEM_STRINGS = ^PSYSTEM_STRINGS;
  2580. TSystemStrings = _SYSTEM_STRINGS;
  2581. PSystemStrings = ^_SYSTEM_STRINGS;
  2582. // Verified in XP using WinDbg
  2583. _TEXT_INFO = record // not packed!
  2584. (*000*)Reserved: PVOID;
  2585. (*004*)SystemStrings: PSYSTEM_STRINGS;
  2586. end;
  2587. TEXT_INFO = _TEXT_INFO;
  2588. PTEXT_INFO = ^_TEXT_INFO;
  2589. PPTEXT_INFO = ^PTEXT_INFO;
  2590. TTextInfo = _TEXT_INFO;
  2591. PTextInfo = ^_TEXT_INFO;
  2592. // Verified in XP using WinDbg
  2593. PPEB_FREE_BLOCK = ^_PEB_FREE_BLOCK;
  2594. _PEB_FREE_BLOCK = record // not packed!
  2595. (*000*)Next: PPEB_FREE_BLOCK;
  2596. (*004*)Size: ULONG;
  2597. end;
  2598. PEB_FREE_BLOCK = _PEB_FREE_BLOCK;
  2599. PPPEB_FREE_BLOCK = ^PPEB_FREE_BLOCK;
  2600. TPebFreeBlock = _PEB_FREE_BLOCK;
  2601. PPebFreeBlock = ^_PEB_FREE_BLOCK;
  2602. // Verified in W2K, WXP and W2K3 using WinDbg
  2603. _PEB_W2K = packed record // packed!
  2604. (*000*)InheritedAddressSpace: BOOLEAN;
  2605. (*001*)ReadImageFileExecOptions: BOOLEAN;
  2606. (*002*)BeingDebugged: BOOLEAN;
  2607. (*003*)SpareBool: BOOLEAN;
  2608. (*004*)Mutant: PVOID;
  2609. (*008*)ImageBaseAddress: PVOID;
  2610. (*00c*)Ldr: PPEB_LDR_DATA;
  2611. (*010*)ProcessParameters: PRTL_USER_PROCESS_PARAMETERS;
  2612. (*014*)SubSystemData: PVOID;
  2613. (*018*)ProcessHeap: PVOID;
  2614. (*01c*)FastPebLock: PRTL_CRITICAL_SECTION;
  2615. (*020*)FastPebLockRoutine: PVOID; // RtlEnterCriticalSection
  2616. (*024*)FastPebUnlockRoutine: PVOID; // RtlLeaveCriticalSection
  2617. (*028*)EnvironmentUpdateCount: ULONG;
  2618. (*02c*)KernelCallbackTable: PPVOID; // List of callback functions
  2619. (*030*)SystemReserved: array[0..0] of ULONG;
  2620. (*034*)d034: ULONG;
  2621. (*038*)FreeList: PPEB_FREE_BLOCK;
  2622. (*03c*)TlsExpansionCounter: ULONG;
  2623. (*040*)TlsBitmap: PVOID; // ntdll!TlsBitMap of type PRTL_BITMAP
  2624. (*044*)TlsBitmapBits: array[0..1] of ULONG; // 64 bits
  2625. (*04c*)ReadOnlySharedMemoryBase: PVOID;
  2626. (*050*)ReadOnlySharedMemoryHeap: PVOID;
  2627. (*054*)ReadOnlyStaticServerData: PTEXT_INFO;
  2628. (*058*)AnsiCodePageData: PVOID;
  2629. (*05c*)OemCodePageData: PVOID;
  2630. (*060*)UnicodeCaseTableData: PVOID;
  2631. (*064*)NumberOfProcessors: ULONG;
  2632. (*068*)NtGlobalFlag: ULONG;
  2633. (*06C*)Unknown01: ULONG; // Padding or something
  2634. (*070*)CriticalSectionTimeout: LARGE_INTEGER;
  2635. (*078*)HeapSegmentReserve: ULONG;
  2636. (*07c*)HeapSegmentCommit: ULONG;
  2637. (*080*)HeapDeCommitTotalFreeThreshold: ULONG;
  2638. (*084*)HeapDeCommitFreeBlockThreshold: ULONG;
  2639. (*088*)NumberOfHeaps: ULONG;
  2640. (*08c*)MaximumNumberOfHeaps: ULONG;
  2641. (*090*)ProcessHeaps: PPVOID;
  2642. (*094*)GdiSharedHandleTable: PPVOID;
  2643. (*098*)ProcessStarterHelper: PVOID;
  2644. (*09c*)GdiDCAttributeList: ULONG;
  2645. (*0a0*)LoaderLock: PCRITICAL_SECTION;
  2646. (*0a4*)OSMajorVersion: ULONG;
  2647. (*0a8*)OSMinorVersion: ULONG;
  2648. (*0ac*)OSBuildNumber: USHORT;
  2649. (*0ae*)OSCSDVersion: USHORT;
  2650. (*0b0*)OSPlatformId: ULONG;
  2651. (*0b4*)ImageSubsystem: ULONG;
  2652. (*0b8*)ImageSubsystemMajorVersion: ULONG;
  2653. (*0bc*)ImageSubsystemMinorVersion: ULONG;
  2654. (*0c0*)ImageProcessAffinityMask: ULONG;
  2655. (*0c4*)GdiHandleBuffer: array[0..33] of HANDLE;
  2656. (*14c*)PostProcessInitRoutine: PVOID;
  2657. (*150*)TlsExpansionBitmap: PVOID;
  2658. (*154*)TlsExpansionBitmapBits: array[0..31] of ULONG;
  2659. (*1d4*)SessionId: ULONG;
  2660. // Windows 2000
  2661. (*1d8*)AppCompatInfo: PVOID;
  2662. (*1dc*)CSDVersion: UNICODE_STRING;
  2663. end;
  2664. // Verified in W2K, WXP and W2K3 using WinDbg
  2665. _PEB_WXP = packed record // packed!
  2666. (*000*)InheritedAddressSpace: BOOLEAN;
  2667. (*001*)ReadImageFileExecOptions: BOOLEAN;
  2668. (*002*)BeingDebugged: BOOLEAN;
  2669. (*003*)SpareBool: BOOLEAN;
  2670. (*004*)Mutant: PVOID;
  2671. (*008*)ImageBaseAddress: PVOID;
  2672. (*00c*)Ldr: PPEB_LDR_DATA;
  2673. (*010*)ProcessParameters: PRTL_USER_PROCESS_PARAMETERS;
  2674. (*014*)SubSystemData: PVOID;
  2675. (*018*)ProcessHeap: PVOID;
  2676. (*01c*)FastPebLock: PRTL_CRITICAL_SECTION;
  2677. (*020*)FastPebLockRoutine: PVOID; // RtlEnterCriticalSection
  2678. (*024*)FastPebUnlockRoutine: PVOID; // RtlLeaveCriticalSection
  2679. (*028*)EnvironmentUpdateCount: ULONG;
  2680. (*02c*)KernelCallbackTable: PPVOID; // List of callback functions
  2681. (*030*)SystemReserved: array[0..0] of ULONG;
  2682. (*034*)AtlThunkSListPtr32: PVOID; // (Windows XP)
  2683. (*038*)FreeList: PPEB_FREE_BLOCK;
  2684. (*03c*)TlsExpansionCounter: ULONG;
  2685. (*040*)TlsBitmap: PVOID; // ntdll!TlsBitMap of type PRTL_BITMAP
  2686. (*044*)TlsBitmapBits: array[0..1] of ULONG; // 64 bits
  2687. (*04c*)ReadOnlySharedMemoryBase: PVOID;
  2688. (*050*)ReadOnlySharedMemoryHeap: PVOID;
  2689. (*054*)ReadOnlyStaticServerData: PTEXT_INFO;
  2690. (*058*)AnsiCodePageData: PVOID;
  2691. (*05c*)OemCodePageData: PVOID;
  2692. (*060*)UnicodeCaseTableData: PVOID;
  2693. (*064*)NumberOfProcessors: ULONG;
  2694. (*068*)NtGlobalFlag: ULONG;
  2695. (*06C*)Unknown01: ULONG; // Padding or something
  2696. (*070*)CriticalSectionTimeout: LARGE_INTEGER;
  2697. (*078*)HeapSegmentReserve: ULONG;
  2698. (*07c*)HeapSegmentCommit: ULONG;
  2699. (*080*)HeapDeCommitTotalFreeThreshold: ULONG;
  2700. (*084*)HeapDeCommitFreeBlockThreshold: ULONG;
  2701. (*088*)NumberOfHeaps: ULONG;
  2702. (*08c*)MaximumNumberOfHeaps: ULONG;
  2703. (*090*)ProcessHeaps: PPVOID;
  2704. (*094*)GdiSharedHandleTable: PPVOID;
  2705. (*098*)ProcessStarterHelper: PVOID;
  2706. (*09c*)GdiDCAttributeList: ULONG;
  2707. (*0a0*)LoaderLock: PCRITICAL_SECTION;
  2708. (*0a4*)OSMajorVersion: ULONG;
  2709. (*0a8*)OSMinorVersion: ULONG;
  2710. (*0ac*)OSBuildNumber: USHORT;
  2711. (*0ae*)OSCSDVersion: USHORT;
  2712. (*0b0*)OSPlatformId: ULONG;
  2713. (*0b4*)ImageSubsystem: ULONG;
  2714. (*0b8*)ImageSubsystemMajorVersion: ULONG;
  2715. (*0bc*)ImageSubsystemMinorVersion: ULONG;
  2716. (*0c0*)ImageProcessAffinityMask: ULONG;
  2717. (*0c4*)GdiHandleBuffer: array[0..33] of HANDLE;
  2718. (*14c*)PostProcessInitRoutine: PVOID;
  2719. (*150*)TlsExpansionBitmap: PVOID;
  2720. (*154*)TlsExpansionBitmapBits: array[0..31] of ULONG;
  2721. (*1d4*)SessionId: ULONG;
  2722. // Windows XP
  2723. (*1d8*)AppCompatFlags: ULARGE_INTEGER;
  2724. (*1e0*)AppCompatFlagsUser: ULARGE_INTEGER;
  2725. (*1e8*)pShimData: PVOID;
  2726. (*1ec*)AppCompatInfo: PVOID;
  2727. (*1f0*)CSDVersion: UNICODE_STRING;
  2728. (*1f8*)ActivationContextData: PVOID; // PACTIVATION_CONTEXT_DATA
  2729. (*1fc*)ProcessAssemblyStorageMap: PVOID; // PASSEMBLY_STORAGE_MAP
  2730. (*200*)SystemDefaultActivationContextData: PVOID; // PACTIVATION_CONTEXT_DATA
  2731. (*204*)SystemAssemblyStorageMap: PVOID; // PASSEMBLY_STORAGE_MAP
  2732. (*208*)MinimumStackCommit: ULONG;
  2733. end;
  2734. // Verified in W2K, WXP and W2K3 using WinDbg
  2735. _PEB_2K3 = packed record // packed!
  2736. (*000*)InheritedAddressSpace: BOOLEAN;
  2737. (*001*)ReadImageFileExecOptions: BOOLEAN;
  2738. (*002*)BeingDebugged: BOOLEAN;
  2739. (*003*)SpareBool: BOOLEAN;
  2740. (*004*)Mutant: PVOID;
  2741. (*008*)ImageBaseAddress: PVOID;
  2742. (*00c*)Ldr: PPEB_LDR_DATA;
  2743. (*010*)ProcessParameters: PRTL_USER_PROCESS_PARAMETERS;
  2744. (*014*)SubSystemData: PVOID;
  2745. (*018*)ProcessHeap: PVOID;
  2746. (*01c*)FastPebLock: PRTL_CRITICAL_SECTION;
  2747. (*020*)FastPebLockRoutine: PVOID; // RtlEnterCriticalSection
  2748. (*024*)FastPebUnlockRoutine: PVOID; // RtlLeaveCriticalSection
  2749. (*028*)EnvironmentUpdateCount: ULONG;
  2750. (*02c*)KernelCallbackTable: PPVOID; // List of callback functions
  2751. (*030*)SystemReserved: array[0..0] of ULONG;
  2752. (*034*)ExecuteOptions: ULONG; // 2 Bits used (Windows 2003)
  2753. (*038*)FreeList: PPEB_FREE_BLOCK;
  2754. (*03c*)TlsExpansionCounter: ULONG;
  2755. (*040*)TlsBitmap: PVOID; // ntdll!TlsBitMap of type PRTL_BITMAP
  2756. (*044*)TlsBitmapBits: array[0..1] of ULONG; // 64 bits
  2757. (*04c*)ReadOnlySharedMemoryBase: PVOID;
  2758. (*050*)ReadOnlySharedMemoryHeap: PVOID;
  2759. (*054*)ReadOnlyStaticServerData: PTEXT_INFO;
  2760. (*058*)AnsiCodePageData: PVOID;
  2761. (*05c*)OemCodePageData: PVOID;
  2762. (*060*)UnicodeCaseTableData: PVOID;
  2763. (*064*)NumberOfProcessors: ULONG;
  2764. (*068*)NtGlobalFlag: ULONG;
  2765. (*06C*)Unknown01: ULONG; // Padding or something
  2766. (*070*)CriticalSectionTimeout: LARGE_INTEGER;
  2767. (*078*)HeapSegmentReserve: ULONG;
  2768. (*07c*)HeapSegmentCommit: ULONG;
  2769. (*080*)HeapDeCommitTotalFreeThreshold: ULONG;
  2770. (*084*)HeapDeCommitFreeBlockThreshold: ULONG;
  2771. (*088*)NumberOfHeaps: ULONG;
  2772. (*08c*)MaximumNumberOfHeaps: ULONG;
  2773. (*090*)ProcessHeaps: PPVOID;
  2774. (*094*)GdiSharedHandleTable: PPVOID;
  2775. (*098*)ProcessStarterHelper: PVOID;
  2776. (*09c*)GdiDCAttributeList: ULONG;
  2777. (*0a0*)LoaderLock: PCRITICAL_SECTION;
  2778. (*0a4*)OSMajorVersion: ULONG;
  2779. (*0a8*)OSMinorVersion: ULONG;
  2780. (*0ac*)OSBuildNumber: USHORT;
  2781. (*0ae*)OSCSDVersion: USHORT;
  2782. (*0b0*)OSPlatformId: ULONG;
  2783. (*0b4*)ImageSubsystem: ULONG;
  2784. (*0b8*)ImageSubsystemMajorVersion: ULONG;
  2785. (*0bc*)ImageSubsystemMinorVersion: ULONG;
  2786. (*0c0*)ImageProcessAffinityMask: ULONG;
  2787. (*0c4*)GdiHandleBuffer: array[0..33] of HANDLE;
  2788. (*14c*)PostProcessInitRoutine: PVOID;
  2789. (*150*)TlsExpansionBitmap: PVOID;
  2790. (*154*)TlsExpansionBitmapBits: array[0..31] of ULONG;
  2791. (*1d4*)SessionId: ULONG;
  2792. // Windows XP
  2793. (*1d8*)AppCompatFlags: ULARGE_INTEGER;
  2794. (*1e0*)AppCompatFlagsUser: ULARGE_INTEGER;
  2795. (*1e8*)pShimData: PVOID;
  2796. (*1ec*)AppCompatInfo: PVOID;
  2797. (*1f0*)CSDVersion: UNICODE_STRING;
  2798. (*1f8*)ActivationContextData: PVOID; // PACTIVATION_CONTEXT_DATA
  2799. (*1fc*)ProcessAssemblyStorageMap: PVOID; // PASSEMBLY_STORAGE_MAP
  2800. (*200*)SystemDefaultActivationContextData: PVOID; // PACTIVATION_CONTEXT_DATA
  2801. (*204*)SystemAssemblyStorageMap: PVOID; // PASSEMBLY_STORAGE_MAP
  2802. (*208*)MinimumStackCommit: ULONG;
  2803. // New members in Windows 2003
  2804. (*20c*)FlsCallback: PPVOID;
  2805. (*210*)FlsListHead: LIST_ENTRY;
  2806. (*218*)FlsBitmap: PVOID;
  2807. (*21c*)FlsBitmapBits: array[0..3] of ULONG;
  2808. (*22c*)FlsHighIndex: ULONG;
  2809. end;
  2810. {$IFDEF WINNT4}
  2811. _PEB = _PEB_W2K; // Exact layout for NT4 unknown
  2812. {$ENDIF}
  2813. {$IFDEF WIN2000}
  2814. _PEB = _PEB_W2K;
  2815. {$ENDIF}
  2816. {$IFDEF WINXP}
  2817. _PEB = _PEB_WXP;
  2818. {$ENDIF}
  2819. {$IFDEF WIN2003}
  2820. _PEB = _PEB_2K3;
  2821. {$ENDIF}
  2822. PEB = _PEB;
  2823. PPEB = ^_PEB;
  2824. PPPEB = ^PPEB;
  2825. // =================================================================
  2826. // THREAD ENVIRONMENT BLOCK (TEB)
  2827. // =================================================================
  2828. PNT_TIB = ^_NT_TIB;
  2829. _NT_TIB = record
  2830. ExceptionList: Pointer; // ^_EXCEPTION_REGISTRATION_RECORD
  2831. StackBase,
  2832. StackLimit,
  2833. SubSystemTib: Pointer;
  2834. case Integer of
  2835. 0: (
  2836. FiberData: Pointer
  2837. );
  2838. 1: (
  2839. Version: ULONG;
  2840. ArbitraryUserPointer: Pointer;
  2841. Self: PNT_TIB;
  2842. )
  2843. end;
  2844. NT_TIB = _NT_TIB;
  2845. PPNT_TIB = ^PNT_TIB;
  2846. tagACTCTX = record // not packed!
  2847. (*000*)cbSize: ULONG;
  2848. (*004*)dwFlags: DWORD;
  2849. (*008*)lpSource: LPCWSTR;
  2850. (*00C*)wProcessorArchitecture: USHORT;
  2851. (*00E*)wLangId: LANGID;
  2852. (*010*)lpAssemblyDirectory: LPCTSTR;
  2853. (*014*)lpResourceName: LPCTSTR;
  2854. (*018*)lpApplicationName: LPCTSTR;
  2855. (*01C*)hModule: HMODULE;
  2856. end;
  2857. ACTCTX = tagACTCTX;
  2858. PACTCTX = ^tagACTCTX;
  2859. ACTIVATION_CONTEXT = tagACTCTX;
  2860. PACTIVATION_CONTEXT = ^tagACTCTX;
  2861. PPACTIVATION_CONTEXT = ^PACTIVATION_CONTEXT;
  2862. PRTL_ACTIVATION_CONTEXT_STACK_FRAME = ^_RTL_ACTIVATION_CONTEXT_STACK_FRAME;
  2863. _RTL_ACTIVATION_CONTEXT_STACK_FRAME = record // not packed!
  2864. (*000*)Previous: PRTL_ACTIVATION_CONTEXT_STACK_FRAME;
  2865. (*004*)ActivationContext: PACTIVATION_CONTEXT;
  2866. (*008*)Flags: ULONG;
  2867. end;
  2868. RTL_ACTIVATION_CONTEXT_STACK_FRAME = _RTL_ACTIVATION_CONTEXT_STACK_FRAME;
  2869. PPRTL_ACTIVATION_CONTEXT_STACK_FRAME = ^PRTL_ACTIVATION_CONTEXT_STACK_FRAME;
  2870. // Verified in XP using WinDbg
  2871. _ACTIVATION_CONTEXT_STACK = record // not packed!
  2872. (*000*)Flags: ULONG;
  2873. (*004*)NextCookieSequenceNumber: ULONG;
  2874. (*008*)ActiveFrame: PRTL_ACTIVATION_CONTEXT_STACK_FRAME;
  2875. (*00c*)FrameListCache: LIST_ENTRY;
  2876. end;
  2877. ACTIVATION_CONTEXT_STACK = _ACTIVATION_CONTEXT_STACK;
  2878. PACTIVATION_CONTEXT_STACK = ^_ACTIVATION_CONTEXT_STACK;
  2879. PPACTIVATION_CONTEXT_STACK = ^PACTIVATION_CONTEXT_STACK;
  2880. // Verified in XP using WinDbg
  2881. _GDI_TEB_BATCH = record // not packed!
  2882. (*000*)Offset: ULONG;
  2883. (*004*)HDC: HANDLE;
  2884. (*008*)Buffer: array[0..309] of ULONG;
  2885. end;
  2886. GDI_TEB_BATCH = _GDI_TEB_BATCH;
  2887. PGDI_TEB_BATCH = ^_GDI_TEB_BATCH;
  2888. PPGDI_TEB_BATCH = ^PGDI_TEB_BATCH;
  2889. // Verified in XP using WinDbg
  2890. _Wx86ThreadState = packed record // packed!
  2891. (*000*)CallBx86Eip: PULONG;
  2892. (*004*)DeallocationCpu: PVOID;
  2893. (*008*)UseKnownWx86Dll: BOOLEAN;
  2894. (*009*)OleStubInvoked: CHAR;
  2895. end;
  2896. Wx86ThreadState = _Wx86ThreadState;
  2897. PWx86ThreadState = ^_Wx86ThreadState;
  2898. PPWx86ThreadState = ^PWx86ThreadState;
  2899. // Verified in XP using WinDbg
  2900. _TEB_ACTIVE_FRAME_CONTEXT = record // not packed!
  2901. (*000*)Flags: ULONG;
  2902. (*004*)FrameName: PCHAR;
  2903. end;
  2904. TEB_ACTIVE_FRAME_CONTEXT = _TEB_ACTIVE_FRAME_CONTEXT;
  2905. PTEB_ACTIVE_FRAME_CONTEXT = ^_TEB_ACTIVE_FRAME_CONTEXT;
  2906. PPTEB_ACTIVE_FRAME_CONTEXT = ^PTEB_ACTIVE_FRAME_CONTEXT;
  2907. // Verified in XP using WinDbg
  2908. PTEB_ACTIVE_FRAME = ^_TEB_ACTIVE_FRAME;
  2909. _TEB_ACTIVE_FRAME = record // not packed!
  2910. (*000*)Flags: ULONG;
  2911. (*004*)Previous: PTEB_ACTIVE_FRAME;
  2912. (*008*)Context: PTEB_ACTIVE_FRAME_CONTEXT;
  2913. end;
  2914. TEB_ACTIVE_FRAME = _TEB_ACTIVE_FRAME;
  2915. PPTEB_ACTIVE_FRAME = ^PTEB_ACTIVE_FRAME;
  2916. // Verified in W2K, WXP and W2K3 using WinDbg
  2917. _TEB = record // not packed!
  2918. (*000*)NtTib: NT_TIB;
  2919. (*01c*)EnvironmentPointer: PVOID;
  2920. (*020*)ClientId: CLIENT_ID;
  2921. (*028*)ActiveRpcHandle: PVOID;
  2922. (*02c*)ThreadLocalStoragePointer: PVOID;
  2923. (*030*)Peb: PPEB;
  2924. (*034*)LastErrorValue: ULONG;
  2925. (*038*)CountOfOwnedCriticalSections: ULONG;
  2926. (*03c*)CsrClientThread: PVOID;
  2927. (*040*)Win32ThreadInfo: PVOID;
  2928. (*044*)User32Reserved: array[0..25] of ULONG;
  2929. (*0ac*)UserReserved: array[0..4] of ULONG;
  2930. (*0c0*)WOW32Reserved: PVOID;
  2931. (*0c4*)CurrentLocale: LCID;
  2932. (*0c8*)FpSoftwareStatusRegister: ULONG;
  2933. (*0cc*)SystemReserved1: array[0..53] of PVOID;
  2934. (*1a4*)ExceptionCode: LONG;
  2935. (*1a8*)ActivationContextStack: ACTIVATION_CONTEXT_STACK;
  2936. (*1bc*)SpareBytes1: array[0..23] of UCHAR;
  2937. (*1d4*)GdiTebBatch: GDI_TEB_BATCH;
  2938. (*6b4*)RealClientId: CLIENT_ID;
  2939. (*6bc*)GdiCachedProcessHandle: PVOID;
  2940. (*6c0*)GdiClientPID: ULONG;
  2941. (*6c4*)GdiClientTID: ULONG;
  2942. (*6c8*)GdiThreadLocalInfo: PVOID;
  2943. (*6cc*)Win32ClientInfo: array[0..61] of ULONG;
  2944. (*7c4*)glDispatchTable: array[0..232] of PVOID;
  2945. (*b68*)glReserved1: array[0..28] of ULONG;
  2946. (*bdc*)glReserved2: PVOID;
  2947. (*be0*)glSectionInfo: PVOID;
  2948. (*be4*)glSection: PVOID;
  2949. (*be8*)glTable: PVOID;
  2950. (*bec*)glCurrentRC: PVOID;
  2951. (*bf0*)glContext: PVOID;
  2952. (*bf4*)LastStatusValue: ULONG;
  2953. (*bf8*)StaticUnicodeString: UNICODE_STRING;
  2954. (*c00*)StaticUnicodeBuffer: array[0..MAX_PATH] of WCHAR;
  2955. (*e0a*)Padding: USHORT;
  2956. (*e0c*)DeallocationStack: PVOID;
  2957. (*e10*)TlsSlots: array[0..63] of PVOID;
  2958. (*f10*)TlsLinks: LIST_ENTRY;
  2959. (*f18*)Vdm: PVOID;
  2960. (*f1c*)ReservedForNtRpc: PVOID;
  2961. (*f20*)DbgSsReserved: array[0..1] of PVOID;
  2962. case Integer of
  2963. (* *)0: (
  2964. (*f28*)HardErrorMode: ULONG // (Windows 2003)
  2965. );
  2966. (* *)1: (
  2967. (*f28*)HardErrorsAreDisabled: ULONG; // (Windows XP)
  2968. (*f2c*)Instrumentation: array[0..15] of PVOID;
  2969. (*f6c*)WinSockData: PVOID;
  2970. (*f70*)GdiBatchCount: ULONG;
  2971. (*f74*)InDbgPrint: BOOLEAN;
  2972. (*f75*)FreeStackOnTermination: BOOLEAN;
  2973. (*f76*)HasFiberData: BOOLEAN;
  2974. (*f77*)IdealProcessor: BOOLEAN;
  2975. (*f78*)Spare3: ULONG;
  2976. (*f7c*)ReservedForPerf: PVOID;
  2977. (*f80*)ReservedForOle: PVOID;
  2978. (*f84*)WaitingOnLoaderLock: PVOID;
  2979. (*f88*)Wx86Thread: Wx86ThreadState;
  2980. (*f94*)TlsExpansionSlots: PPVOID;
  2981. (*f98*)ImpersonationLocale: LCID;
  2982. (*f9c*)IsImpersonating: ULONG;
  2983. (*fa0*)NlsCache: PVOID;
  2984. (*fa4*)pShimData: PVOID;
  2985. (*fa8*)HeapVirtualAffinity: ULONG;
  2986. (*fac*)CurrentTransactionHandle: PVOID;
  2987. (*fb0*)ActiveFrame: PTEB_ACTIVE_FRAME;
  2988. case Integer of
  2989. 0: (
  2990. (*fb4*)SafeThunkCall: BOOLEAN; // Before Windows 2003
  2991. (*fb5*)BooleanSpare: array[0..2] of BOOLEAN // Before Windows 2003
  2992. );
  2993. 1: (
  2994. (*fb4*)FlsData: PVOID; // Starting with Windows 2003
  2995. )
  2996. )
  2997. end;
  2998. TEB = _TEB;
  2999. PTEB = ^_TEB;
  3000. PPTEB = ^PTEB;
  3001. type
  3002. _OBJECT_NAME_INFORMATION = record
  3003. Name: UNICODE_STRING;
  3004. end;
  3005. OBJECT_NAME_INFORMATION = _OBJECT_NAME_INFORMATION;
  3006. POBJECT_NAME_INFORMATION = ^OBJECT_NAME_INFORMATION;
  3007. TObjectNameInformation = OBJECT_NAME_INFORMATION;
  3008. PObjectNameInformation = ^OBJECT_NAME_INFORMATION;
  3009. const
  3010. NtCurrentProcess = HANDLE(-1);
  3011. NtCurrentThread = HANDLE(-2);
  3012. // Object Manager specific stuff
  3013. OBJ_NAME_PATH_SEPARATOR = '\';
  3014. // Object Manager Object Type Specific Access Rights.
  3015. OBJECT_TYPE_CREATE = $0001;
  3016. OBJECT_TYPE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or $1;
  3017. // Object Manager Directory Specific Access Rights.
  3018. DIRECTORY_QUERY = $0001;
  3019. DIRECTORY_TRAVERSE = $0002;
  3020. DIRECTORY_CREATE_OBJECT = $0004;
  3021. DIRECTORY_CREATE_SUBDIRECTORY = $0008;
  3022. DIRECTORY_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or $F;
  3023. // Object Manager Symbolic Link Specific Access Rights.
  3024. SYMBOLIC_LINK_QUERY = $0001;
  3025. SYMBOLIC_LINK_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or $1;
  3026. DUPLICATE_CLOSE_SOURCE = $00000001;
  3027. DUPLICATE_SAME_ACCESS = $00000002;
  3028. DUPLICATE_SAME_ATTRIBUTES = $00000004;
  3029. //
  3030. // Define the access check value for any access
  3031. //
  3032. //
  3033. // The FILE_READ_ACCESS and FILE_WRITE_ACCESS constants are also defined in
  3034. // ntioapi.h as FILE_READ_DATA and FILE_WRITE_DATA. The values for these
  3035. // constants *MUST* always be in sync.
  3036. //
  3037. //
  3038. // FILE_SPECIAL_ACCESS is checked by the NT I/O system the same as FILE_ANY_ACCESS.
  3039. // The file systems, however, may add additional access checks for I/O and FS controls
  3040. // that use this value.
  3041. //
  3042. FILE_ANY_ACCESS = 0;
  3043. FILE_SPECIAL_ACCESS = FILE_ANY_ACCESS;
  3044. FILE_READ_ACCESS = $0001; // file & pipe
  3045. FILE_WRITE_ACCESS = $0002; // file & pipe
  3046. //
  3047. // Define share access rights to files and directories
  3048. //
  3049. FILE_SHARE_READ = $00000001; // JwaWindows.pas
  3050. FILE_SHARE_WRITE = $00000002; // JwaWindows.pas
  3051. FILE_SHARE_DELETE = $00000004; // JwaWindows.pas
  3052. FILE_SHARE_VALID_FLAGS = $00000007;
  3053. //
  3054. // Define the file attributes values
  3055. //
  3056. // Note: = $00000008 is reserved for use for the old DOS VOLID (volume ID)
  3057. // and is therefore not considered valid in NT.
  3058. //
  3059. // Note: = $00000010 is reserved for use for the old DOS SUBDIRECTORY flag
  3060. // and is therefore not considered valid in NT. This flag has
  3061. // been disassociated with file attributes since the other flags are
  3062. // protected with READ_ and WRITE_ATTRIBUTES access to the file.
  3063. //
  3064. // Note: Note also that the order of these flags is set to allow both the
  3065. // FAT and the Pinball File Systems to directly set the attributes
  3066. // flags in attributes words without having to pick each flag out
  3067. // individually. The order of these flags should not be changed!
  3068. //
  3069. FILE_ATTRIBUTE_READONLY = $00000001; // JwaWindows.pas
  3070. FILE_ATTRIBUTE_HIDDEN = $00000002; // JwaWindows.pas
  3071. FILE_ATTRIBUTE_SYSTEM = $00000004; // JwaWindows.pas
  3072. //OLD DOS VOLID = $00000008
  3073. FILE_ATTRIBUTE_DIRECTORY = $00000010; // JwaWindows.pas
  3074. FILE_ATTRIBUTE_ARCHIVE = $00000020; // JwaWindows.pas
  3075. FILE_ATTRIBUTE_DEVICE = $00000040; // JwaWindows.pas
  3076. FILE_ATTRIBUTE_NORMAL = $00000080; // JwaWindows.pas
  3077. FILE_ATTRIBUTE_TEMPORARY = $00000100; // JwaWindows.pas
  3078. FILE_ATTRIBUTE_SPARSE_FILE = $00000200; // JwaWindows.pas
  3079. FILE_ATTRIBUTE_REPARSE_POINT = $00000400; // JwaWindows.pas
  3080. FILE_ATTRIBUTE_COMPRESSED = $00000800; // JwaWindows.pas
  3081. FILE_ATTRIBUTE_OFFLINE = $00001000; // JwaWindows.pas
  3082. FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = $00002000; // JwaWindows.pas
  3083. FILE_ATTRIBUTE_ENCRYPTED = $00004000; // JwaWindows.pas
  3084. //
  3085. // This definition is old and will disappear shortly
  3086. //
  3087. FILE_ATTRIBUTE_VALID_FLAGS = $00007FB7;
  3088. FILE_ATTRIBUTE_VALID_SET_FLAGS = $000031A7;
  3089. //
  3090. // Define the create disposition values
  3091. //
  3092. FILE_SUPERSEDE = $00000000;
  3093. FILE_OPEN = $00000001;
  3094. FILE_CREATE = $00000002;
  3095. FILE_OPEN_IF = $00000003;
  3096. FILE_OVERWRITE = $00000004;
  3097. FILE_OVERWRITE_IF = $00000005;
  3098. FILE_MAXIMUM_DISPOSITION = $00000005;
  3099. //
  3100. // Define the create/open option flags
  3101. //
  3102. FILE_DIRECTORY_FILE = $00000001;
  3103. FILE_WRITE_THROUGH = $00000002;
  3104. FILE_SEQUENTIAL_ONLY = $00000004;
  3105. FILE_NO_INTERMEDIATE_BUFFERING = $00000008;
  3106. FILE_SYNCHRONOUS_IO_ALERT = $00000010;
  3107. FILE_SYNCHRONOUS_IO_NONALERT = $00000020;
  3108. FILE_NON_DIRECTORY_FILE = $00000040;
  3109. FILE_CREATE_TREE_CONNECTION = $00000080;
  3110. FILE_COMPLETE_IF_OPLOCKED = $00000100;
  3111. FILE_NO_EA_KNOWLEDGE = $00000200;
  3112. FILE_OPEN_FOR_RECOVERY = $00000400;
  3113. FILE_RANDOM_ACCESS = $00000800;
  3114. FILE_DELETE_ON_CLOSE = $00001000;
  3115. FILE_OPEN_BY_FILE_ID = $00002000;
  3116. FILE_OPEN_FOR_BACKUP_INTENT = $00004000;
  3117. FILE_NO_COMPRESSION = $00008000;
  3118. FILE_RESERVE_OPFILTER = $00100000;
  3119. FILE_OPEN_REPARSE_POINT = $00200000;
  3120. FILE_OPEN_NO_RECALL = $00400000;
  3121. FILE_OPEN_FOR_FREE_SPACE_QUERY = $00800000;
  3122. FILE_COPY_STRUCTURED_STORAGE = $00000041;
  3123. FILE_STRUCTURED_STORAGE = $00000441;
  3124. FILE_VALID_OPTION_FLAGS = $00FFFFFF;
  3125. FILE_VALID_PIPE_OPTION_FLAGS = $00000032;
  3126. FILE_VALID_MAILSLOT_OPTION_FLAGS = $00000032;
  3127. FILE_VALID_SET_FLAGS = $00000036;
  3128. //
  3129. // Define the I/O status information return values for NtCreateFile/NtOpenFile
  3130. //
  3131. FILE_SUPERSEDED = $00000000;
  3132. FILE_OPENED = $00000001;
  3133. FILE_CREATED = $00000002;
  3134. FILE_OVERWRITTEN = $00000003;
  3135. FILE_EXISTS = $00000004;
  3136. FILE_DOES_NOT_EXIST = $00000005;
  3137. //
  3138. // Define special ByteOffset parameters for read and write operations
  3139. //
  3140. FILE_WRITE_TO_END_OF_FILE = $FFFFFFFF;
  3141. FILE_USE_FILE_POINTER_POSITION = $FFFFFFFE;
  3142. //
  3143. // Define alignment requirement values
  3144. //
  3145. FILE_BYTE_ALIGNMENT = $00000000;
  3146. FILE_WORD_ALIGNMENT = $00000001;
  3147. FILE_LONG_ALIGNMENT = $00000003;
  3148. FILE_QUAD_ALIGNMENT = $00000007;
  3149. FILE_OCTA_ALIGNMENT = $0000000F;
  3150. FILE_32_BYTE_ALIGNMENT = $0000001F;
  3151. FILE_64_BYTE_ALIGNMENT = $0000003F;
  3152. FILE_128_BYTE_ALIGNMENT = $0000007F;
  3153. FILE_256_BYTE_ALIGNMENT = $000000FF;
  3154. FILE_512_BYTE_ALIGNMENT = $000001FF;
  3155. //
  3156. // Define the maximum length of a filename string
  3157. //
  3158. MAXIMUM_FILENAME_LENGTH = 256;
  3159. //
  3160. // Define the various device characteristics flags
  3161. //
  3162. FILE_REMOVABLE_MEDIA = $00000001;
  3163. FILE_READ_ONLY_DEVICE = $00000002;
  3164. FILE_FLOPPY_DISKETTE = $00000004;
  3165. FILE_WRITE_ONCE_MEDIA = $00000008;
  3166. FILE_REMOTE_DEVICE = $00000010;
  3167. FILE_DEVICE_IS_MOUNTED = $00000020;
  3168. FILE_VIRTUAL_VOLUME = $00000040;
  3169. FILE_AUTOGENERATED_DEVICE_NAME = $00000080;
  3170. FILE_DEVICE_SECURE_OPEN = $00000100;
  3171. //
  3172. // Define kernel debugger print prototypes and macros.
  3173. //
  3174. // N.B. The following function cannot be directly imported because there are
  3175. // a few places in the source tree where this function is redefined.
  3176. //
  3177. //procedure DbgBreakPoint(); stdcall;
  3178. //procedure DbgUserBreakPoint(); stdcall;
  3179. //procedure DbgBreakPointWithStatus(Status: ULONG); stdcall;
  3180. //// BEGIN: Reverse function forwarders and custom functions
  3181. //// Using Kernel32 function with same functionality for macros and "future version" functions
  3182. (* Compatibility: All *)
  3183. procedure RtlCopyMemory(
  3184. Destination: PVOID;
  3185. Source: PVOID;
  3186. Length: SIZE_T
  3187. ); stdcall; // Own replacement function
  3188. (* XREF: see GetLastError()! *)
  3189. (* Compatibility: All *)
  3190. // This functions was introduced with Windows XP. The Kernel32 version
  3191. // is a function forwarder for this function.
  3192. function RtlGetLastWin32Error(): DWORD; external 'kernel32.dll' name 'GetLastError'; // imported as kernel32!GetLastError
  3193. (* XREF: see SetLastError()! *)
  3194. (* Compatibility: All *)
  3195. // This functions was introduced with Windows XP. The Kernel32 version
  3196. // is a function forwarder for this function.
  3197. procedure RtlSetLastWin32Error(dwErrCode: DWORD); external 'kernel32.dll' name 'SetLastError'; // imported as kernel32!SetLastError
  3198. // Own function to retrieve the process's heap handle
  3199. (* XREF: see GetProcessHeap()! *)
  3200. (* Compatibility: All *)
  3201. function NtpGetProcessHeap(): HANDLE;
  3202. // Own function to retrieve the thread environment block (TEB) pointer
  3203. (* Compatibility: All *)
  3204. function NtpCurrentTeb(): PTEB;
  3205. // Own function to retrieve the process environment block (PEB) pointer
  3206. (* Compatibility: All *)
  3207. function RtlpGetCurrentPeb(): PPEB;
  3208. // No FASTCALL directive exists in Delphi so we write our own versions ...
  3209. // Own function to swap bytes in 16bit values
  3210. function RtlUshortByteSwap(Source: USHORT): USHORT;
  3211. // Own function to swap bytes in 32bit values
  3212. function RtlUlongByteSwap(Source: ULONG): ULONG;
  3213. // Own function to swap bytes in 64bit values
  3214. function RtlUlonglongByteSwap(Source: ULONGLONG): ULONGLONG;
  3215. // Resembles the RtlValidateUnicodeString() function available from Windows XP
  3216. // on exactly as it is on this OS version, except for the calling convention.
  3217. function RtlpValidateUnicodeString(dwMustBeNull: DWORD; UnicodeString: PUNICODE_STRING): NTSTATUS;
  3218. // Resembles the RtlValidateUnicodeString() function available from Windows XP
  3219. // on, but does not require the first parameter which anyway must be zero.
  3220. function RtlpValidateUnicodeString2(UnicodeString: PUNICODE_STRING): NTSTATUS;
  3221. //// END : Reverse function forwarders and custom functions
  3222. //// BEGIN: Function prototypes
  3223. // Compatibility: WXP, 2K3
  3224. function CsrGetProcessId(): DWORD; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3225. // Compatibility: WXP, 2K3
  3226. function DbgQueryDebugFilterState(
  3227. ComponentId : ULONG;
  3228. Level : ULONG
  3229. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3230. // Compatibility: WXP, 2K3
  3231. function DbgSetDebugFilterState(
  3232. ComponentId : ULONG;
  3233. Level : ULONG;
  3234. State : BOOLEAN
  3235. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3236. // Unknown return value, maybe NTSTATUS?
  3237. // Compatibility: NT4, W2K, WXP, 2K3
  3238. function KiRaiseUserExceptionDispatcher(): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3239. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3240. function LdrAccessResource(
  3241. hModule : HANDLE;
  3242. ResourceDataEntry : PIMAGE_RESOURCE_DATA_ENTRY;
  3243. Address : PPVOID;
  3244. dwSize : PULONG
  3245. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3246. // Compatibility: W2K, WXP, 2K3
  3247. function LdrAlternateResourcesEnabled(): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3248. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3249. function LdrDisableThreadCalloutsForDll(
  3250. hModule : HANDLE
  3251. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3252. // This function is very similar to GetModuleHandle() from Kernel32.dll.
  3253. // Refer to the PSDK for additional information. Usually the same flags
  3254. // apply.
  3255. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3256. function LdrGetDllHandle(
  3257. pwPath : PWORD;
  3258. pReserved : PVOID;
  3259. pusPath : PUNICODE_STRING;
  3260. var phModule : HANDLE
  3261. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3262. // This function is very similar to GetProcAddress() from Kernel32.dll.
  3263. // Refer to the PSDK for additional information. Usually the same flags
  3264. // apply.
  3265. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3266. function LdrGetProcedureAddress(
  3267. hModule : HANDLE;
  3268. dwOrdinal : ULONG;
  3269. psName : PSTRING;
  3270. var pProcedure : PVOID
  3271. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3272. // This function is very similar to LoadLibrary() from Kernel32.dll. Refer
  3273. // to the PSDK for additional information. Usually the same flags apply.
  3274. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3275. function LdrLoadDll(
  3276. pwPath : PWORD;
  3277. pdwFlags : PDWORD;
  3278. pusPath : PUNICODE_STRING;
  3279. var phModule : HANDLE
  3280. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3281. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3282. function LdrQueryImageFileExecutionOptions(
  3283. pusImagePath : PUNICODE_STRING;
  3284. pwOptionName : PWORD;
  3285. dwRequestedType : DWORD;
  3286. pData : PVOID;
  3287. dwSize : DWORD;
  3288. pdwSize : PDWORD
  3289. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3290. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3291. function LdrQueryProcessModuleInformation(
  3292. psmi : PSYSTEM_MODULE_INFORMATION;
  3293. dwSize : DWORD;
  3294. pdwSize : PDWORD
  3295. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3296. // This function is very similar to TerminateProcess() from Kernel32.dll.
  3297. // Refer to the PSDK for additional information. Usually the same flags
  3298. // apply.
  3299. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3300. procedure LdrShutdownProcess(); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3301. // This function is very similar to TerminateThread() from Kernel32.dll.
  3302. // Refer to the PSDK for additional information. Usually the same flags
  3303. // apply.
  3304. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3305. procedure LdrShutdownThread(); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3306. // This function is very similar to FreeLibrary() from Kernel32.dll. Refer
  3307. // to the PSDK for additional information. Usually the same flags apply.
  3308. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3309. function LdrUnloadDll(
  3310. hModule : HANDLE
  3311. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3312. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3313. function NtAcceptConnectPort(
  3314. PortHandle : PHANDLE;
  3315. PortIdentifier : ULONG;
  3316. Message : PPORT_MESSAGE;
  3317. Accept : BOOLEAN;
  3318. WriteSection : PPORT_SECTION_WRITE;
  3319. ReadSection : PPORT_SECTION_READ
  3320. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3321. function ZwAcceptConnectPort(PortHandle: PHANDLE; PortIdentifier: ULONG; Message: PPORT_MESSAGE; Accept: BOOLEAN; WriteSection: PPORT_SECTION_WRITE; ReadSection: PPORT_SECTION_READ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;
  3322. {$ENDIF}
  3323. // This function is very similar to AccessCheck() from Advapi32.dll. Refer
  3324. // to the PSDK for additional information. Usually the same flags apply.
  3325. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3326. function NtAccessCheck(
  3327. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  3328. TokenHandle : HANDLE;
  3329. DesiredAccess : ACCESS_MASK;
  3330. GenericMapping : PGENERIC_MAPPING;
  3331. PrivilegeSet : PPRIVILEGE_SET;
  3332. PrivilegeSetLength : PULONG;
  3333. GrantedAccess : PACCESS_MASK;
  3334. AccessStatus : PBOOLEAN
  3335. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3336. function ZwAccessCheck(SecurityDescriptor: PSECURITY_DESCRIPTOR; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG; GrantedAccess: PACCESS_MASK;
  3337. AccessStatus: PBOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3338. // This function is very similar to AccessCheckAndAuditAlarm() from
  3339. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  3340. // same flags apply.
  3341. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3342. function NtAccessCheckAndAuditAlarm(
  3343. SubsystemName : PUNICODE_STRING;
  3344. HandleId : PVOID;
  3345. ObjectTypeName : PUNICODE_STRING;
  3346. ObjectName : PUNICODE_STRING;
  3347. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  3348. DesiredAccess : ACCESS_MASK;
  3349. GenericMapping : PGENERIC_MAPPING;
  3350. ObjectCreation : BOOLEAN;
  3351. GrantedAccess : PACCESS_MASK;
  3352. AccessStatus : PBOOLEAN;
  3353. GenerateOnClose : PBOOLEAN
  3354. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3355. function ZwAccessCheckAndAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; DesiredAccess: ACCESS_MASK;
  3356. GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOLEAN; GrantedAccess: PACCESS_MASK; AccessStatus: PBOOLEAN; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3357. // This function is very similar to AccessCheckByType() from Advapi32.dll.
  3358. // Refer to the PSDK for additional information. Usually the same flags
  3359. // apply.
  3360. // Compatibility: W2K, WXP, 2K3
  3361. function NtAccessCheckByType(
  3362. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  3363. PrincipalSelfSid : PSID;
  3364. TokenHandle : HANDLE;
  3365. DesiredAccess : ACCESS_MASK;
  3366. ObjectTypeList : POBJECT_TYPE_LIST;
  3367. ObjectTypeListLength : ULONG;
  3368. GenericMapping : PGENERIC_MAPPING;
  3369. PrivilegeSet : PPRIVILEGE_SET;
  3370. PrivilegeSetLength : PULONG;
  3371. GrantedAccess : PACCESS_MASK;
  3372. AccessStatus : PULONG
  3373. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3374. function ZwAccessCheckByType(SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG;
  3375. GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG; GrantedAccess: PACCESS_MASK; AccessStatus: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3376. // This function is very similar to AccessCheckByTypeAndAuditAlarm() from
  3377. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  3378. // same flags apply.
  3379. // Compatibility: W2K, WXP, 2K3
  3380. function NtAccessCheckByTypeAndAuditAlarm(
  3381. SubsystemName : PUNICODE_STRING;
  3382. HandleId : PVOID;
  3383. ObjectTypeName : PUNICODE_STRING;
  3384. ObjectName : PUNICODE_STRING;
  3385. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  3386. PrincipalSelfSid : PSID;
  3387. DesiredAccess : ACCESS_MASK;
  3388. AuditType : AUDIT_EVENT_TYPE;
  3389. Flags : ULONG;
  3390. ObjectTypeList : POBJECT_TYPE_LIST;
  3391. ObjectTypeListLength : ULONG;
  3392. GenericMapping : PGENERIC_MAPPING;
  3393. ObjectCreation : BOOLEAN;
  3394. GrantedAccess : PACCESS_MASK;
  3395. AccessStatus : PULONG;
  3396. GenerateOnClose : PBOOLEAN
  3397. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3398. function ZwAccessCheckByTypeAndAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
  3399. DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOLEAN; GrantedAccess: PACCESS_MASK;
  3400. AccessStatus: PULONG; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3401. // This function is very similar to AccessCheckByTypeResultList() from
  3402. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  3403. // same flags apply.
  3404. // Compatibility: W2K, WXP, 2K3
  3405. function NtAccessCheckByTypeResultList(
  3406. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  3407. PrincipalSelfSid : PSID;
  3408. TokenHandle : HANDLE;
  3409. DesiredAccess : ACCESS_MASK;
  3410. ObjectTypeList : POBJECT_TYPE_LIST;
  3411. ObjectTypeListLength : ULONG;
  3412. GenericMapping : PGENERIC_MAPPING;
  3413. PrivilegeSet : PPRIVILEGE_SET;
  3414. PrivilegeSetLength : PULONG;
  3415. GrantedAccessList : PACCESS_MASK;
  3416. AccessStatusList : PULONG
  3417. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3418. function ZwAccessCheckByTypeResultList(SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG;
  3419. GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG; GrantedAccessList: PACCESS_MASK; AccessStatusList: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3420. // This function is very similar to
  3421. // AccessCheckByTypeResultListAndAuditAlarm() from Advapi32.dll. Refer to
  3422. // the PSDK for additional information. Usually the same flags apply.
  3423. // Compatibility: W2K, WXP, 2K3
  3424. function NtAccessCheckByTypeResultListAndAuditAlarm(
  3425. SubsystemName : PUNICODE_STRING;
  3426. HandleId : PVOID;
  3427. ObjectTypeName : PUNICODE_STRING;
  3428. ObjectName : PUNICODE_STRING;
  3429. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  3430. PrincipalSelfSid : PSID;
  3431. DesiredAccess : ACCESS_MASK;
  3432. AuditType : AUDIT_EVENT_TYPE;
  3433. Flags : ULONG;
  3434. ObjectTypeList : POBJECT_TYPE_LIST;
  3435. ObjectTypeListLength : ULONG;
  3436. GenericMapping : PGENERIC_MAPPING;
  3437. ObjectCreation : BOOLEAN;
  3438. GrantedAccessList : PACCESS_MASK;
  3439. AccessStatusList : PULONG;
  3440. GenerateOnClose : PULONG
  3441. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3442. function ZwAccessCheckByTypeResultListAndAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
  3443. DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOLEAN; GrantedAccessList: PACCESS_MASK;
  3444. AccessStatusList: PULONG; GenerateOnClose: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3445. // This function is very similar to
  3446. // AccessCheckByTypeResultListAndAuditAlarmByHandle() from Advapi32.dll.
  3447. // Refer to the PSDK for additional information. Usually the same flags
  3448. // apply.
  3449. // Compatibility: W2K, WXP, 2K3
  3450. function NtAccessCheckByTypeResultListAndAuditAlarmByHandle(
  3451. SubsystemName : PUNICODE_STRING;
  3452. HandleId : PVOID;
  3453. TokenHandle : HANDLE;
  3454. ObjectTypeName : PUNICODE_STRING;
  3455. ObjectName : PUNICODE_STRING;
  3456. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  3457. PrincipalSelfSid : PSID;
  3458. DesiredAccess : ACCESS_MASK;
  3459. AuditType : AUDIT_EVENT_TYPE;
  3460. Flags : ULONG;
  3461. ObjectTypeList : POBJECT_TYPE_LIST;
  3462. ObjectTypeListLength : ULONG;
  3463. GenericMapping : PGENERIC_MAPPING;
  3464. ObjectCreation : BOOLEAN;
  3465. GrantedAccessList : PACCESS_MASK;
  3466. AccessStatusList : PULONG;
  3467. GenerateOnClose : PULONG
  3468. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3469. function ZwAccessCheckByTypeResultListAndAuditAlarmByHandle(SubsystemName: PUNICODE_STRING; HandleId: PVOID; TokenHandle: HANDLE; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR;
  3470. PrincipalSelfSid: PSID; DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOLEAN;
  3471. GrantedAccessList: PACCESS_MASK; AccessStatusList: PULONG; GenerateOnClose: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3472. // Compatibility: NT4, W2K, WXP, 2K3
  3473. function NtAddAtom(
  3474. Str : PWSTR;
  3475. StringLength : ULONG;
  3476. Atom : PUSHORT
  3477. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3478. function ZwAddAtom(Str: PWSTR; StringLength: ULONG; Atom: PUSHORT): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3479. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3480. function NtAdjustGroupsToken(
  3481. TokenHandle : HANDLE;
  3482. ResetToDefault : BOOLEAN;
  3483. NewState : PTOKEN_GROUPS;
  3484. BufferLength : ULONG;
  3485. PreviousState : PTOKEN_GROUPS;
  3486. ReturnLength : PULONG
  3487. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3488. function ZwAdjustGroupsToken(TokenHandle: HANDLE; ResetToDefault: BOOLEAN; NewState: PTOKEN_GROUPS; BufferLength: ULONG; PreviousState: PTOKEN_GROUPS; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3489. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3490. function NtAdjustPrivilegesToken(
  3491. TokenHandle : HANDLE;
  3492. DisableAllPrivileges : BOOLEAN;
  3493. NewState : PTOKEN_PRIVILEGES;
  3494. BufferLength : ULONG;
  3495. PreviousState : PTOKEN_PRIVILEGES;
  3496. ReturnLength : PULONG
  3497. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3498. function ZwAdjustPrivilegesToken(TokenHandle: HANDLE; DisableAllPrivileges: BOOLEAN; NewState: PTOKEN_PRIVILEGES; BufferLength: ULONG; PreviousState: PTOKEN_PRIVILEGES; ReturnLength: PULONG): NTSTATUS; stdcall;
  3499. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3500. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3501. function NtAlertResumeThread(
  3502. ThreadHandle : HANDLE;
  3503. PreviousSuspendCount : PULONG
  3504. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3505. function ZwAlertResumeThread(ThreadHandle: HANDLE; PreviousSuspendCount: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3506. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3507. function NtAlertThread(
  3508. ThreadHandle : HANDLE
  3509. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3510. function ZwAlertThread(ThreadHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3511. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3512. function NtAllocateLocallyUniqueId(
  3513. Luid : PLUID
  3514. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3515. function ZwAllocateLocallyUniqueId(Luid: PLUID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3516. // Compatibility: W2K, WXP, 2K3
  3517. function NtAllocateUserPhysicalPages(
  3518. ProcessHandle : HANDLE;
  3519. NumberOfPages : PULONG;
  3520. PageFrameNumbers : PULONG
  3521. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3522. function ZwAllocateUserPhysicalPages(ProcessHandle: HANDLE; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3523. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3524. function NtAllocateUuids(
  3525. UuidLastTimeAllocated : PLARGE_INTEGER;
  3526. UuidDeltaTime : PULONG;
  3527. UuidSequenceNumber : PULONG;
  3528. UuidSeed : PUCHAR
  3529. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3530. function ZwAllocateUuids(UuidLastTimeAllocated: PLARGE_INTEGER; UuidDeltaTime: PULONG; UuidSequenceNumber: PULONG; UuidSeed: PUCHAR): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3531. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3532. function NtAllocateVirtualMemory(
  3533. ProcessHandle : HANDLE;
  3534. BaseAddress : PPVOID;
  3535. ZeroBits : ULONG;
  3536. AllocationSize : PULONG;
  3537. AllocationType : ULONG;
  3538. Protect : ULONG
  3539. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3540. function ZwAllocateVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; ZeroBits: ULONG; AllocationSize: PULONG; AllocationType: ULONG; Protect: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3541. // Compatibility: W2K, WXP, 2K3
  3542. function NtAreMappedFilesTheSame(
  3543. Address1 : PVOID;
  3544. Address2 : PVOID
  3545. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3546. function ZwAreMappedFilesTheSame(Address1: PVOID; Address2: PVOID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3547. // Compatibility: W2K, WXP, 2K3
  3548. function NtAssignProcessToJobObject(
  3549. JobHandle : HANDLE;
  3550. ProcessHandle : HANDLE
  3551. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3552. function ZwAssignProcessToJobObject(JobHandle: HANDLE; ProcessHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3553. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3554. function NtCallbackReturn(
  3555. Result_ : PVOID;
  3556. ResultLength : ULONG;
  3557. Status : NTSTATUS
  3558. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3559. function ZwCallbackReturn(Result_: PVOID; ResultLength: ULONG; Status: NTSTATUS): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3560. // Compatibility: W2K, WXP, 2K3
  3561. function NtCancelDeviceWakeupRequest(
  3562. DeviceHandle : HANDLE
  3563. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3564. function ZwCancelDeviceWakeupRequest(DeviceHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3565. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3566. function NtCancelIoFile(
  3567. FileHandle : HANDLE;
  3568. IoStatusBlock : PIO_STATUS_BLOCK
  3569. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3570. function ZwCancelIoFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3571. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3572. function NtCancelTimer(
  3573. TimerHandle : HANDLE;
  3574. PreviousState : PBOOLEAN
  3575. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3576. function ZwCancelTimer(TimerHandle: HANDLE; PreviousState: PBOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3577. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3578. function NtClearEvent(
  3579. EventHandle : HANDLE
  3580. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3581. function ZwClearEvent(EventHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3582. // This function is very similar to CloseHandle() from Kernel32.dll. Refer
  3583. // to the PSDK for additional information. Usually the same flags apply.
  3584. // Documented in the DDK as ZwClose().
  3585. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3586. function NtClose(
  3587. Handle : HANDLE
  3588. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3589. function ZwClose(Handle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3590. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3591. function NtCloseObjectAuditAlarm(
  3592. SubsystemName : PUNICODE_STRING;
  3593. HandleId : PVOID;
  3594. GenerateOnClose : BOOLEAN
  3595. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3596. function ZwCloseObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; GenerateOnClose: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3597. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3598. function NtCompleteConnectPort(
  3599. PortHandle : HANDLE
  3600. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3601. function ZwCompleteConnectPort(PortHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3602. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3603. function NtConnectPort(
  3604. PortHandle : PHANDLE;
  3605. PortName : PUNICODE_STRING;
  3606. SecurityQos : PSECURITY_QUALITY_OF_SERVICE;
  3607. WriteSection : PPORT_SECTION_WRITE;
  3608. ReadSection : PPORT_SECTION_READ;
  3609. MaxMessageSize : PULONG;
  3610. ConnectData : PVOID;
  3611. ConnectDataLength : PULONG
  3612. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3613. function ZwConnectPort(PortHandle: PHANDLE; PortName: PUNICODE_STRING; SecurityQos: PSECURITY_QUALITY_OF_SERVICE; WriteSection: PPORT_SECTION_WRITE; ReadSection: PPORT_SECTION_READ; MaxMessageSize: PULONG; ConnectData: PVOID;
  3614. ConnectDataLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3615. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3616. function NtContinue(
  3617. Context : PCONTEXT;
  3618. TestAlert : BOOLEAN
  3619. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3620. function ZwContinue(Context: PCONTEXT; TestAlert: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3621. // Returns STATUS_NOT_IMPLEMENTED. Only MS knows the intention behind this.
  3622. //
  3623. // !!!DO NOT USE!!!
  3624. // Compatibility: NT4, W2K
  3625. function NtCreateChannel(
  3626. ChannelHandle : PHANDLE;
  3627. ObjectAttributes : POBJECT_ATTRIBUTES
  3628. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3629. function ZwCreateChannel(ChannelHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3630. // Documented in the DDK as ZwCreateDirectoryObject().
  3631. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3632. function NtCreateDirectoryObject(
  3633. DirectoryHandle : PHANDLE;
  3634. DesiredAccess : ACCESS_MASK;
  3635. ObjectAttributes : POBJECT_ATTRIBUTES
  3636. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3637. function ZwCreateDirectoryObject(DirectoryHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3638. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3639. function NtCreateEvent(
  3640. EventHandle : PHANDLE;
  3641. DesiredAccess : ACCESS_MASK;
  3642. ObjectAttributes : POBJECT_ATTRIBUTES;
  3643. EventType : EVENT_TYPE;
  3644. InitialState : BOOLEAN
  3645. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3646. function ZwCreateEvent(EventHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; EventType: EVENT_TYPE; InitialState: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3647. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3648. function NtCreateEventPair(
  3649. EventPairHandle : PHANDLE;
  3650. DesiredAccess : ACCESS_MASK;
  3651. ObjectAttributes : POBJECT_ATTRIBUTES
  3652. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3653. function ZwCreateEventPair(EventPairHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3654. // Documented in the DDK as ZwCreateFile().
  3655. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3656. function NtCreateFile(
  3657. FileHandle : PHANDLE;
  3658. DesiredAccess : ACCESS_MASK;
  3659. ObjectAttributes : POBJECT_ATTRIBUTES;
  3660. IoStatusBlock : PIO_STATUS_BLOCK;
  3661. AllocationSize : PLARGE_INTEGER;
  3662. FileAttributes : ULONG;
  3663. ShareAccess : ULONG;
  3664. CreateDisposition : ULONG;
  3665. CreateOptions : ULONG;
  3666. EaBuffer : PVOID;
  3667. EaLength : ULONG
  3668. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3669. function ZwCreateFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; AllocationSize: PLARGE_INTEGER; FileAttributes: ULONG; ShareAccess: ULONG;
  3670. CreateDisposition: ULONG; CreateOptions: ULONG; EaBuffer: PVOID; EaLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3671. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3672. function NtCreateIoCompletion(
  3673. IoCompletionHandle : PHANDLE;
  3674. DesiredAccess : ACCESS_MASK;
  3675. ObjectAttributes : POBJECT_ATTRIBUTES;
  3676. NumberOfConcurrentThreads : ULONG
  3677. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3678. function ZwCreateIoCompletion(IoCompletionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; NumberOfConcurrentThreads: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3679. // Compatibility: W2K, WXP, 2K3
  3680. function NtCreateJobObject(
  3681. JobHandle : PHANDLE;
  3682. DesiredAccess : ACCESS_MASK;
  3683. ObjectAttributes : POBJECT_ATTRIBUTES
  3684. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3685. function ZwCreateJobObject(JobHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3686. // Documented in the DDK as ZwCreateKey().
  3687. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3688. function NtCreateKey(
  3689. KeyHandle : PHANDLE;
  3690. DesiredAccess : ACCESS_MASK;
  3691. ObjectAttributes : POBJECT_ATTRIBUTES;
  3692. TitleIndex : ULONG;
  3693. Class_ : PUNICODE_STRING;
  3694. CreateOptions : ULONG;
  3695. Disposition : PULONG
  3696. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3697. function ZwCreateKey(KeyHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TitleIndex: ULONG; Class_: PUNICODE_STRING; CreateOptions: ULONG; Disposition: PULONG): NTSTATUS; stdcall;
  3698. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3699. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3700. function NtCreateMailslotFile(
  3701. FileHandle : PHANDLE;
  3702. DesiredAccess : ACCESS_MASK;
  3703. ObjectAttributes : POBJECT_ATTRIBUTES;
  3704. IoStatusBlock : PIO_STATUS_BLOCK;
  3705. CreateOptions : ULONG;
  3706. Unknown : ULONG;
  3707. MaxMessageSize : ULONG;
  3708. ReadTimeout : PLARGE_INTEGER
  3709. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3710. function ZwCreateMailslotFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; CreateOptions: ULONG; Unknown: ULONG; MaxMessageSize: ULONG;
  3711. ReadTimeout: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3712. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3713. function NtCreateMutant(
  3714. MutantHandle : PHANDLE;
  3715. DesiredAccess : ACCESS_MASK;
  3716. ObjectAttributes : POBJECT_ATTRIBUTES;
  3717. InitialOwner : BOOLEAN
  3718. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3719. function ZwCreateMutant(MutantHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InitialOwner: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3720. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3721. function NtCreateNamedPipeFile(
  3722. FileHandle : PHANDLE;
  3723. DesiredAccess : ACCESS_MASK;
  3724. ObjectAttributes : POBJECT_ATTRIBUTES;
  3725. IoStatusBlock : PIO_STATUS_BLOCK;
  3726. ShareAccess : ULONG;
  3727. CreateDisposition : ULONG;
  3728. CreateOptions : ULONG;
  3729. TypeMessage : BOOLEAN;
  3730. ReadmodeMessage : BOOLEAN;
  3731. Nonblocking : BOOLEAN;
  3732. MaxInstances : ULONG;
  3733. InBufferSize : ULONG;
  3734. OutBufferSize : ULONG;
  3735. DefaultTimeout : PLARGE_INTEGER
  3736. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3737. function ZwCreateNamedPipeFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; ShareAccess: ULONG; CreateDisposition: ULONG; CreateOptions: ULONG;
  3738. TypeMessage: BOOLEAN; ReadmodeMessage: BOOLEAN; Nonblocking: BOOLEAN; MaxInstances: ULONG; InBufferSize: ULONG; OutBufferSize: ULONG; DefaultTimeout: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3739. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3740. function NtCreatePagingFile(
  3741. FileName : PUNICODE_STRING;
  3742. InitialSize : PULARGE_INTEGER;
  3743. MaximumSize : PULARGE_INTEGER;
  3744. Reserved : ULONG
  3745. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3746. function ZwCreatePagingFile(FileName: PUNICODE_STRING; InitialSize: PULARGE_INTEGER; MaximumSize: PULARGE_INTEGER; Reserved: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3747. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3748. function NtCreatePort(
  3749. PortHandle : PHANDLE;
  3750. ObjectAttributes : POBJECT_ATTRIBUTES;
  3751. MaxDataSize : ULONG;
  3752. MaxMessageSize : ULONG;
  3753. Reserved : ULONG
  3754. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3755. function ZwCreatePort(PortHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES; MaxDataSize: ULONG; MaxMessageSize: ULONG; Reserved: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3756. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3757. function NtCreateProcess(
  3758. ProcessHandle : PHANDLE;
  3759. DesiredAccess : ACCESS_MASK;
  3760. ObjectAttributes : POBJECT_ATTRIBUTES;
  3761. InheritFromProcessHandle : HANDLE;
  3762. InheritHandles : BOOLEAN;
  3763. SectionHandle : HANDLE;
  3764. DebugPort : HANDLE;
  3765. ExceptionPort : HANDLE
  3766. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3767. function ZwCreateProcess(ProcessHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InheritFromProcessHandle: HANDLE; InheritHandles: BOOLEAN; SectionHandle: HANDLE; DebugPort: HANDLE;
  3768. ExceptionPort: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3769. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3770. function NtCreateProfile(
  3771. ProfileHandle : PHANDLE;
  3772. ProcessHandle : HANDLE;
  3773. Base : PVOID;
  3774. Size : ULONG;
  3775. BucketShift : ULONG;
  3776. Buffer : PULONG;
  3777. BufferLength : ULONG;
  3778. Source : KPROFILE_SOURCE;
  3779. ProcessorMask : ULONG
  3780. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3781. function ZwCreateProfile(ProfileHandle: PHANDLE; ProcessHandle: HANDLE; Base: PVOID; Size: ULONG; BucketShift: ULONG; Buffer: PULONG; BufferLength: ULONG; Source: KPROFILE_SOURCE; ProcessorMask: ULONG): NTSTATUS; stdcall;
  3782. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3783. // Documented in the DDK as ZwCreateSection().
  3784. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3785. function NtCreateSection(
  3786. SectionHandle : PHANDLE;
  3787. DesiredAccess : ACCESS_MASK;
  3788. ObjectAttributes : POBJECT_ATTRIBUTES;
  3789. SectionSize : PLARGE_INTEGER;
  3790. Protect : ULONG;
  3791. Attributes : ULONG;
  3792. FileHandle : HANDLE
  3793. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3794. function ZwCreateSection(SectionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; SectionSize: PLARGE_INTEGER; Protect: ULONG; Attributes: ULONG; FileHandle: HANDLE): NTSTATUS; stdcall;
  3795. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3796. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3797. function NtCreateSemaphore(
  3798. SemaphoreHandle : PHANDLE;
  3799. DesiredAccess : ACCESS_MASK;
  3800. ObjectAttributes : POBJECT_ATTRIBUTES;
  3801. InitialCount : LONG;
  3802. MaximumCount : LONG
  3803. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3804. function ZwCreateSemaphore(SemaphoreHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InitialCount: LONG; MaximumCount: LONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3805. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3806. function NtCreateSymbolicLinkObject(
  3807. SymbolicLinkHandle : PHANDLE;
  3808. DesiredAccess : ACCESS_MASK;
  3809. ObjectAttributes : POBJECT_ATTRIBUTES;
  3810. TargetName : PUNICODE_STRING
  3811. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3812. function ZwCreateSymbolicLinkObject(SymbolicLinkHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TargetName: PUNICODE_STRING): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3813. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3814. function NtCreateThread(
  3815. ThreadHandle : PHANDLE;
  3816. DesiredAccess : ACCESS_MASK;
  3817. ObjectAttributes : POBJECT_ATTRIBUTES;
  3818. ProcessHandle : HANDLE;
  3819. ClientId : PCLIENT_ID;
  3820. ThreadContext : PCONTEXT;
  3821. UserStack : PUSER_STACK;
  3822. CreateSuspended : BOOLEAN
  3823. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3824. function ZwCreateThread(ThreadHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ProcessHandle: HANDLE; ClientId: PCLIENT_ID; ThreadContext: PCONTEXT; UserStack: PUSER_STACK;
  3825. CreateSuspended: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3826. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3827. function NtCreateTimer(
  3828. TimerHandle : PHANDLE;
  3829. DesiredAccess : ACCESS_MASK;
  3830. ObjectAttributes : POBJECT_ATTRIBUTES;
  3831. TimerType : TIMER_TYPE
  3832. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3833. function ZwCreateTimer(TimerHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TimerType: TIMER_TYPE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3834. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3835. function NtCreateToken(
  3836. TokenHandle : PHANDLE;
  3837. DesiredAccess : ACCESS_MASK;
  3838. ObjectAttributes : POBJECT_ATTRIBUTES;
  3839. Type_ : TOKEN_TYPE;
  3840. AuthenticationId : PLUID;
  3841. ExpirationTime : PLARGE_INTEGER;
  3842. User : PTOKEN_USER;
  3843. Groups : PTOKEN_GROUPS;
  3844. Privileges : PTOKEN_PRIVILEGES;
  3845. Owner : PTOKEN_OWNER;
  3846. PrimaryGroup : PTOKEN_PRIMARY_GROUP;
  3847. DefaultDacl : PTOKEN_DEFAULT_DACL;
  3848. Source : PTOKEN_SOURCE
  3849. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3850. function ZwCreateToken(TokenHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; Type_: TOKEN_TYPE; AuthenticationId: PLUID; ExpirationTime: PLARGE_INTEGER; User: PTOKEN_USER; Groups: PTOKEN_GROUPS;
  3851. Privileges: PTOKEN_PRIVILEGES; Owner: PTOKEN_OWNER; PrimaryGroup: PTOKEN_PRIMARY_GROUP; DefaultDacl: PTOKEN_DEFAULT_DACL; Source: PTOKEN_SOURCE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3852. // Compatibility: W2K, WXP, 2K3
  3853. function NtCreateWaitablePort(
  3854. PortHandle : PHANDLE;
  3855. ObjectAttributes : POBJECT_ATTRIBUTES;
  3856. MaxDataSize : ULONG;
  3857. MaxMessageSize : ULONG;
  3858. Reserved : ULONG
  3859. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3860. function ZwCreateWaitablePort(PortHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES; MaxDataSize: ULONG; MaxMessageSize: ULONG; Reserved: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3861. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3862. function NtCurrentTeb(): PTEB; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3863. function ZwCurrentTeb(): PTEB; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3864. // Compatibility: WXP, 2K3
  3865. function NtDebugActiveProcess(
  3866. hProcess : HANDLE;
  3867. hDebugObject : HANDLE
  3868. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3869. function ZwDebugActiveProcess(hProcess: HANDLE; hDebugObject: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3870. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3871. function NtDelayExecution(
  3872. Alertable : BOOLEAN;
  3873. Interval : PLARGE_INTEGER
  3874. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3875. function ZwDelayExecution(Alertable: BOOLEAN; Interval: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3876. // Compatibility: NT4, W2K, WXP, 2K3
  3877. function NtDeleteAtom(
  3878. Atom : USHORT
  3879. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3880. function ZwDeleteAtom(Atom: USHORT): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3881. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3882. function NtDeleteFile(
  3883. ObjectAttributes : POBJECT_ATTRIBUTES
  3884. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3885. function ZwDeleteFile(ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3886. // Documented in the DDK as ZwDeleteKey().
  3887. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3888. function NtDeleteKey(
  3889. KeyHandle : HANDLE
  3890. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3891. function ZwDeleteKey(KeyHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3892. // Compatibility: NT4, W2K, WXP, 2K3
  3893. function NtDeleteObjectAuditAlarm(
  3894. SubsystemName : PUNICODE_STRING;
  3895. HandleId : PVOID;
  3896. GenerateOnClose : BOOLEAN
  3897. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3898. function ZwDeleteObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; GenerateOnClose: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3899. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3900. function NtDeleteValueKey(
  3901. KeyHandle : HANDLE;
  3902. ValueName : PUNICODE_STRING
  3903. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3904. function ZwDeleteValueKey(KeyHandle: HANDLE; ValueName: PUNICODE_STRING): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3905. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3906. function NtDeviceIoControlFile(
  3907. FileHandle : HANDLE;
  3908. Event : HANDLE;
  3909. ApcRoutine : PIO_APC_ROUTINE;
  3910. ApcContext : PVOID;
  3911. IoStatusBlock : PIO_STATUS_BLOCK;
  3912. IoControlCode : ULONG;
  3913. InputBuffer : PVOID;
  3914. InputBufferLength : ULONG;
  3915. OutputBuffer : PVOID;
  3916. OutputBufferLength : ULONG
  3917. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3918. function ZwDeviceIoControlFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; IoControlCode: ULONG; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID;
  3919. OutputBufferLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3920. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3921. function NtDisplayString(
  3922. Str : PUNICODE_STRING
  3923. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3924. function ZwDisplayString(Str: PUNICODE_STRING): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3925. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3926. function NtDuplicateObject(
  3927. SourceProcessHandle : HANDLE;
  3928. SourceHandle : HANDLE;
  3929. TargetProcessHandle : HANDLE;
  3930. TargetHandle : PHANDLE;
  3931. DesiredAccess : ACCESS_MASK;
  3932. Attributes : ULONG;
  3933. Options : ULONG
  3934. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3935. function ZwDuplicateObject(SourceProcessHandle: HANDLE; SourceHandle: HANDLE; TargetProcessHandle: HANDLE; TargetHandle: PHANDLE; DesiredAccess: ACCESS_MASK; Attributes: ULONG; Options: ULONG): NTSTATUS; stdcall;
  3936. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3937. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3938. function NtDuplicateToken(
  3939. ExistingTokenHandle : HANDLE;
  3940. DesiredAccess : ACCESS_MASK;
  3941. ObjectAttributes : POBJECT_ATTRIBUTES;
  3942. EffectiveOnly : BOOLEAN;
  3943. TokenType : TOKEN_TYPE;
  3944. NewTokenHandle : PHANDLE
  3945. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3946. function ZwDuplicateToken(ExistingTokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; EffectiveOnly: BOOLEAN; TokenType: TOKEN_TYPE; NewTokenHandle: PHANDLE): NTSTATUS; stdcall;
  3947. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3948. // Documented in the DDK as ZwEnumerateKey().
  3949. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3950. function NtEnumerateKey(
  3951. KeyHandle : HANDLE;
  3952. Index : ULONG;
  3953. KeyInformationClass : KEY_INFORMATION_CLASS;
  3954. KeyInformation : PVOID;
  3955. KeyInformationLength : ULONG;
  3956. ResultLength : PULONG
  3957. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3958. function ZwEnumerateKey(KeyHandle: HANDLE; Index: ULONG; KeyInformationClass: KEY_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3959. // Documented in the DDK as ZwEnumerateValueKey().
  3960. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3961. function NtEnumerateValueKey(
  3962. KeyHandle : HANDLE;
  3963. Index : ULONG;
  3964. KeyValueInformationClass : KEY_VALUE_INFORMATION_CLASS;
  3965. KeyValueInformation : PVOID;
  3966. KeyValueInformationLength : ULONG;
  3967. ResultLength : PULONG
  3968. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3969. function ZwEnumerateValueKey(KeyHandle: HANDLE; Index: ULONG; KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS; KeyValueInformation: PVOID; KeyValueInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  3970. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3971. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3972. function NtExtendSection(
  3973. SectionHandle : HANDLE;
  3974. SectionSize : PLARGE_INTEGER
  3975. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3976. function ZwExtendSection(SectionHandle: HANDLE; SectionSize: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3977. // Compatibility: W2K, WXP, 2K3
  3978. function NtFilterToken(
  3979. ExistingTokenHandle : HANDLE;
  3980. Flags : ULONG;
  3981. SidsToDisable : PTOKEN_GROUPS;
  3982. PrivilegesToDelete : PTOKEN_PRIVILEGES;
  3983. SidsToRestricted : PTOKEN_GROUPS;
  3984. NewTokenHandle : PHANDLE
  3985. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3986. function ZwFilterToken(ExistingTokenHandle: HANDLE; Flags: ULONG; SidsToDisable: PTOKEN_GROUPS; PrivilegesToDelete: PTOKEN_PRIVILEGES; SidsToRestricted: PTOKEN_GROUPS; NewTokenHandle: PHANDLE): NTSTATUS; stdcall;
  3987. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3988. // Compatibility: NT4, W2K, WXP, 2K3
  3989. function NtFindAtom(
  3990. Str : PWSTR;
  3991. StringLength : ULONG;
  3992. Atom : PUSHORT
  3993. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3994. function ZwFindAtom(Str: PWSTR; StringLength: ULONG; Atom: PUSHORT): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  3995. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  3996. function NtFlushBuffersFile(
  3997. FileHandle : HANDLE;
  3998. IoStatusBlock : PIO_STATUS_BLOCK
  3999. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4000. function ZwFlushBuffersFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4001. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4002. function NtFlushInstructionCache(
  4003. ProcessHandle : HANDLE;
  4004. BaseAddress : PVOID;
  4005. FlushSize : ULONG
  4006. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4007. function ZwFlushInstructionCache(ProcessHandle: HANDLE; BaseAddress: PVOID; FlushSize: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4008. // Documented in the DDK as ZwFlushKey().
  4009. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4010. function NtFlushKey(
  4011. KeyHandle : HANDLE
  4012. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4013. function ZwFlushKey(KeyHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4014. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4015. function NtFlushVirtualMemory(
  4016. ProcessHandle : HANDLE;
  4017. BaseAddress : PPVOID;
  4018. FlushSize : PULONG;
  4019. IoStatusBlock : PIO_STATUS_BLOCK
  4020. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4021. function ZwFlushVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; FlushSize: PULONG; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4022. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4023. function NtFlushWriteBuffer(): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4024. function ZwFlushWriteBuffer(): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4025. // Compatibility: W2K, WXP, 2K3
  4026. function NtFreeUserPhysicalPages(
  4027. ProcessHandle : HANDLE;
  4028. NumberOfPages : PULONG;
  4029. PageFrameNumbers : PULONG
  4030. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4031. function ZwFreeUserPhysicalPages(ProcessHandle: HANDLE; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4032. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4033. function NtFreeVirtualMemory(
  4034. ProcessHandle : HANDLE;
  4035. BaseAddress : PPVOID;
  4036. FreeSize : PULONG;
  4037. FreeType : ULONG
  4038. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4039. function ZwFreeVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; FreeSize: PULONG; FreeType: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4040. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4041. function NtFsControlFile(
  4042. FileHandle : HANDLE;
  4043. Event : HANDLE;
  4044. ApcRoutine : PIO_APC_ROUTINE;
  4045. ApcContext : PVOID;
  4046. IoStatusBlock : PIO_STATUS_BLOCK;
  4047. FsControlCode : ULONG;
  4048. InputBuffer : PVOID;
  4049. InputBufferLength : ULONG;
  4050. OutputBuffer : PVOID;
  4051. OutputBufferLength : ULONG
  4052. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4053. function ZwFsControlFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; FsControlCode: ULONG; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID;
  4054. OutputBufferLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4055. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4056. function NtGetContextThread(
  4057. ThreadHandle : HANDLE;
  4058. Context : PCONTEXT
  4059. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4060. function ZwGetContextThread(ThreadHandle: HANDLE; Context: PCONTEXT): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4061. // Compatibility: 2K3
  4062. function NtGetCurrentProcessorNumber(): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4063. function ZwGetCurrentProcessorNumber(): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4064. // Compatibility: W2K, WXP, 2K3
  4065. function NtGetDevicePowerState(
  4066. DeviceHandle : HANDLE;
  4067. DevicePowerState : PDEVICE_POWER_STATE
  4068. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4069. function ZwGetDevicePowerState(DeviceHandle: HANDLE; DevicePowerState: PDEVICE_POWER_STATE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4070. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4071. function NtGetPlugPlayEvent(
  4072. Reserved1 : ULONG;
  4073. Reserved2 : ULONG;
  4074. Buffer : PVOID;
  4075. BufferLength : ULONG
  4076. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4077. function ZwGetPlugPlayEvent(Reserved1: ULONG; Reserved2: ULONG; Buffer: PVOID; BufferLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4078. // Compatibility: NT3, NT4, W2K, 2K3
  4079. function NtGetTickCount(): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4080. function ZwGetTickCount(): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4081. // Compatibility: W2K, WXP, 2K3
  4082. function NtGetWriteWatch(
  4083. ProcessHandle : HANDLE;
  4084. Flags : ULONG;
  4085. BaseAddress : PVOID;
  4086. RegionSize : ULONG;
  4087. Buffer : PULONG;
  4088. BufferEntries : PULONG;
  4089. Granularity : PULONG
  4090. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4091. function ZwGetWriteWatch(ProcessHandle: HANDLE; Flags: ULONG; BaseAddress: PVOID; RegionSize: ULONG; Buffer: PULONG; BufferEntries: PULONG; Granularity: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4092. // Compatibility: W2K, WXP, 2K3
  4093. function NtImpersonateAnonymousToken(
  4094. ThreadHandle : HANDLE
  4095. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4096. function ZwImpersonateAnonymousToken(ThreadHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4097. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4098. function NtImpersonateClientOfPort(
  4099. PortHandle : HANDLE;
  4100. Message : PPORT_MESSAGE
  4101. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4102. function ZwImpersonateClientOfPort(PortHandle: HANDLE; Message: PPORT_MESSAGE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4103. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4104. function NtImpersonateThread(
  4105. ThreadHandle : HANDLE;
  4106. TargetThreadHandle : HANDLE;
  4107. SecurityQos : PSECURITY_QUALITY_OF_SERVICE
  4108. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4109. function ZwImpersonateThread(ThreadHandle: HANDLE; TargetThreadHandle: HANDLE; SecurityQos: PSECURITY_QUALITY_OF_SERVICE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4110. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4111. function NtInitializeRegistry(
  4112. Setup : BOOLEAN
  4113. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4114. function ZwInitializeRegistry(Setup: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4115. // Compatibility: W2K, WXP, 2K3
  4116. function NtInitiatePowerAction(
  4117. SystemAction : POWER_ACTION;
  4118. MinSystemState : SYSTEM_POWER_STATE;
  4119. Flags : ULONG;
  4120. Asynchronous : BOOLEAN
  4121. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4122. function ZwInitiatePowerAction(SystemAction: POWER_ACTION; MinSystemState: SYSTEM_POWER_STATE; Flags: ULONG; Asynchronous: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4123. // Compatibility: W2K, WXP, 2K3
  4124. function NtIsSystemResumeAutomatic(): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4125. function ZwIsSystemResumeAutomatic(): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4126. // Returns STATUS_NOT_IMPLEMENTED. Only MS knows the intention behind this.
  4127. //
  4128. // !!!DO NOT USE!!!
  4129. // Compatibility: NT4, W2K
  4130. function NtListenChannel(
  4131. x : PVOID;
  4132. y : PVOID
  4133. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4134. function ZwListenChannel(x: PVOID; y: PVOID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4135. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4136. function NtListenPort(
  4137. PortHandle : HANDLE;
  4138. Message : PPORT_MESSAGE
  4139. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4140. function ZwListenPort(PortHandle: HANDLE; Message: PPORT_MESSAGE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4141. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4142. function NtLoadDriver(
  4143. DriverServiceName : PUNICODE_STRING
  4144. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4145. function ZwLoadDriver(DriverServiceName: PUNICODE_STRING): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4146. // Relates to RegLoadKey().
  4147. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4148. function NtLoadKey(
  4149. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  4150. FileObjectAttributes : POBJECT_ATTRIBUTES
  4151. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4152. function ZwLoadKey(KeyObjectAttributes: POBJECT_ATTRIBUTES; FileObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4153. // Relates to RegLoadKey().
  4154. // Compatibility: NT4, W2K, WXP, 2K3
  4155. function NtLoadKey2(
  4156. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  4157. FileObjectAttributes : POBJECT_ATTRIBUTES;
  4158. Flags : ULONG
  4159. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4160. function ZwLoadKey2(KeyObjectAttributes: POBJECT_ATTRIBUTES; FileObjectAttributes: POBJECT_ATTRIBUTES; Flags: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4161. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4162. function NtLockFile(
  4163. FileHandle : HANDLE;
  4164. Event : HANDLE;
  4165. ApcRoutine : PIO_APC_ROUTINE;
  4166. ApcContext : PVOID;
  4167. IoStatusBlock : PIO_STATUS_BLOCK;
  4168. LockOffset : PULARGE_INTEGER;
  4169. LockLength : PULARGE_INTEGER;
  4170. Key : ULONG;
  4171. FailImmediately : BOOLEAN;
  4172. ExclusiveLock : BOOLEAN
  4173. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4174. function ZwLockFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; LockOffset: PULARGE_INTEGER; LockLength: PULARGE_INTEGER; Key: ULONG; FailImmediately: BOOLEAN;
  4175. ExclusiveLock: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4176. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4177. function NtLockVirtualMemory(
  4178. ProcessHandle : HANDLE;
  4179. BaseAddress : PPVOID;
  4180. LockSize : PULONG;
  4181. LockType : ULONG
  4182. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4183. function ZwLockVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; LockSize: PULONG; LockType: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4184. // Compatibility: WXP, 2K3
  4185. function NtMakePermanentObject(
  4186. Handle : HANDLE
  4187. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4188. function ZwMakePermanentObject(Handle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4189. // Documented in the DDK as ZwMakeTemporaryObject().
  4190. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4191. function NtMakeTemporaryObject(
  4192. Handle : HANDLE
  4193. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4194. function ZwMakeTemporaryObject(Handle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4195. // Compatibility: W2K, WXP, 2K3
  4196. function NtMapUserPhysicalPages(
  4197. BaseAddress : PVOID;
  4198. NumberOfPages : PULONG;
  4199. PageFrameNumbers : PULONG
  4200. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4201. function ZwMapUserPhysicalPages(BaseAddress: PVOID; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4202. // Compatibility: W2K, WXP, 2K3
  4203. function NtMapUserPhysicalPagesScatter(
  4204. BaseAddresses : PPVOID;
  4205. NumberOfPages : PULONG;
  4206. PageFrameNumbers : PULONG
  4207. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4208. function ZwMapUserPhysicalPagesScatter(BaseAddresses: PPVOID; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4209. // Documented in the DDK as ZwMapViewOfSection().
  4210. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4211. function NtMapViewOfSection(
  4212. SectionHandle : HANDLE;
  4213. ProcessHandle : HANDLE;
  4214. BaseAddress : PPVOID;
  4215. ZeroBits : ULONG;
  4216. CommitSize : ULONG;
  4217. SectionOffset : PLARGE_INTEGER;
  4218. ViewSize : PULONG;
  4219. InheritDisposition : SECTION_INHERIT;
  4220. AllocationType : ULONG;
  4221. Protect : ULONG
  4222. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4223. function ZwMapViewOfSection(SectionHandle: HANDLE; ProcessHandle: HANDLE; BaseAddress: PPVOID; ZeroBits: ULONG; CommitSize: ULONG; SectionOffset: PLARGE_INTEGER; ViewSize: PULONG; InheritDisposition: SECTION_INHERIT; AllocationType: ULONG;
  4224. Protect: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4225. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4226. function NtNotifyChangeDirectoryFile(
  4227. FileHandle : HANDLE;
  4228. Event : HANDLE;
  4229. ApcRoutine : PIO_APC_ROUTINE;
  4230. ApcContext : PVOID;
  4231. IoStatusBlock : PIO_STATUS_BLOCK;
  4232. Buffer : PFILE_NOTIFY_INFORMATION;
  4233. BufferLength : ULONG;
  4234. NotifyFilter : ULONG;
  4235. WatchSubtree : BOOLEAN
  4236. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4237. function ZwNotifyChangeDirectoryFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_NOTIFY_INFORMATION; BufferLength: ULONG; NotifyFilter: ULONG;
  4238. WatchSubtree: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4239. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4240. function NtNotifyChangeKey(
  4241. KeyHandle : HANDLE;
  4242. EventHandle : HANDLE;
  4243. ApcRoutine : PIO_APC_ROUTINE;
  4244. ApcContext : PVOID;
  4245. IoStatusBlock : PIO_STATUS_BLOCK;
  4246. NotifyFilter : ULONG;
  4247. WatchSubtree : BOOLEAN;
  4248. Buffer : PVOID;
  4249. BufferLength : ULONG;
  4250. Asynchronous : BOOLEAN
  4251. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4252. function ZwNotifyChangeKey(KeyHandle: HANDLE; EventHandle: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; NotifyFilter: ULONG; WatchSubtree: BOOLEAN; Buffer: PVOID; BufferLength: ULONG;
  4253. Asynchronous: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4254. // Compatibility: W2K, WXP, 2K3
  4255. function NtNotifyChangeMultipleKeys(
  4256. KeyHandle : HANDLE;
  4257. Flags : ULONG;
  4258. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  4259. EventHandle : HANDLE;
  4260. ApcRoutine : PIO_APC_ROUTINE;
  4261. ApcContext : PVOID;
  4262. IoStatusBlock : PIO_STATUS_BLOCK;
  4263. NotifyFilter : ULONG;
  4264. WatchSubtree : BOOLEAN;
  4265. Buffer : PVOID;
  4266. BufferLength : ULONG;
  4267. Asynchronous : BOOLEAN
  4268. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4269. function ZwNotifyChangeMultipleKeys(KeyHandle: HANDLE; Flags: ULONG; KeyObjectAttributes: POBJECT_ATTRIBUTES; EventHandle: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; NotifyFilter: ULONG;
  4270. WatchSubtree: BOOLEAN; Buffer: PVOID; BufferLength: ULONG; Asynchronous: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4271. // Returns STATUS_NOT_IMPLEMENTED. Only MS knows the intention behind this.
  4272. //
  4273. // !!!DO NOT USE!!!
  4274. // Compatibility: NT4, W2K
  4275. function NtOpenChannel(
  4276. ChannelHandle : PHANDLE;
  4277. ObjectAttributes : POBJECT_ATTRIBUTES
  4278. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4279. function ZwOpenChannel(ChannelHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4280. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4281. function NtOpenDirectoryObject(
  4282. DirectoryHandle : PHANDLE;
  4283. DesiredAccess : ACCESS_MASK;
  4284. ObjectAttributes : POBJECT_ATTRIBUTES
  4285. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4286. function ZwOpenDirectoryObject(DirectoryHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4287. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4288. function NtOpenEvent(
  4289. EventHandle : PHANDLE;
  4290. DesiredAccess : ACCESS_MASK;
  4291. ObjectAttributes : POBJECT_ATTRIBUTES
  4292. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4293. function ZwOpenEvent(EventHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4294. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4295. function NtOpenEventPair(
  4296. EventPairHandle : PHANDLE;
  4297. DesiredAccess : ACCESS_MASK;
  4298. ObjectAttributes : POBJECT_ATTRIBUTES
  4299. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4300. function ZwOpenEventPair(EventPairHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4301. // Documented in the DDK as ZwOpenFile().
  4302. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4303. function NtOpenFile(
  4304. FileHandle : PHANDLE;
  4305. DesiredAccess : ACCESS_MASK;
  4306. ObjectAttributes : POBJECT_ATTRIBUTES;
  4307. IoStatusBlock : PIO_STATUS_BLOCK;
  4308. ShareAccess : ULONG;
  4309. OpenOptions : ULONG
  4310. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4311. function ZwOpenFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; ShareAccess: ULONG; OpenOptions: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4312. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4313. function NtOpenIoCompletion(
  4314. IoCompletionHandle : PHANDLE;
  4315. DesiredAccess : ACCESS_MASK;
  4316. ObjectAttributes : POBJECT_ATTRIBUTES
  4317. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4318. function ZwOpenIoCompletion(IoCompletionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4319. // Compatibility: W2K, WXP, 2K3
  4320. function NtOpenJobObject(
  4321. JobHandle : PHANDLE;
  4322. DesiredAccess : ACCESS_MASK;
  4323. ObjectAttributes : POBJECT_ATTRIBUTES
  4324. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4325. function ZwOpenJobObject(JobHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4326. // Documented in the DDK as ZwOpenKey().
  4327. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4328. function NtOpenKey(
  4329. KeyHandle : PHANDLE;
  4330. DesiredAccess : ACCESS_MASK;
  4331. ObjectAttributes : POBJECT_ATTRIBUTES
  4332. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4333. function ZwOpenKey(KeyHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4334. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4335. function NtOpenMutant(
  4336. MutantHandle : PHANDLE;
  4337. DesiredAccess : ACCESS_MASK;
  4338. ObjectAttributes : POBJECT_ATTRIBUTES
  4339. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4340. function ZwOpenMutant(MutantHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4341. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4342. function NtOpenObjectAuditAlarm(
  4343. SubsystemName : PUNICODE_STRING;
  4344. HandleId : PPVOID;
  4345. ObjectTypeName : PUNICODE_STRING;
  4346. ObjectName : PUNICODE_STRING;
  4347. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  4348. TokenHandle : HANDLE;
  4349. DesiredAccess : ACCESS_MASK;
  4350. GrantedAccess : ACCESS_MASK;
  4351. Privileges : PPRIVILEGE_SET;
  4352. ObjectCreation : BOOLEAN;
  4353. AccessGranted : BOOLEAN;
  4354. GenerateOnClose : PBOOLEAN
  4355. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4356. function ZwOpenObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PPVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK;
  4357. GrantedAccess: ACCESS_MASK; Privileges: PPRIVILEGE_SET; ObjectCreation: BOOLEAN; AccessGranted: BOOLEAN; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4358. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4359. function NtOpenProcess(
  4360. ProcessHandle : PHANDLE;
  4361. DesiredAccess : ACCESS_MASK;
  4362. ObjectAttributes : POBJECT_ATTRIBUTES;
  4363. ClientId : PCLIENT_ID
  4364. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4365. function ZwOpenProcess(ProcessHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ClientId: PCLIENT_ID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4366. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4367. function NtOpenProcessToken(
  4368. ProcessHandle : HANDLE;
  4369. DesiredAccess : ACCESS_MASK;
  4370. TokenHandle : PHANDLE
  4371. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4372. function ZwOpenProcessToken(ProcessHandle: HANDLE; DesiredAccess: ACCESS_MASK; TokenHandle: PHANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4373. // Documented in the DDK as ZwOpenSection().
  4374. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4375. function NtOpenSection(
  4376. SectionHandle : PHANDLE;
  4377. DesiredAccess : ACCESS_MASK;
  4378. ObjectAttributes : POBJECT_ATTRIBUTES
  4379. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4380. function ZwOpenSection(SectionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4381. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4382. function NtOpenSemaphore(
  4383. SemaphoreHandle : PHANDLE;
  4384. DesiredAccess : ACCESS_MASK;
  4385. ObjectAttributes : POBJECT_ATTRIBUTES
  4386. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4387. function ZwOpenSemaphore(SemaphoreHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4388. // Documented in the DDK as ZwOpenSymbolicLinkObject().
  4389. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4390. function NtOpenSymbolicLinkObject(
  4391. SymbolicLinkHandle : PHANDLE;
  4392. DesiredAccess : ACCESS_MASK;
  4393. ObjectAttributes : POBJECT_ATTRIBUTES
  4394. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4395. function ZwOpenSymbolicLinkObject(SymbolicLinkHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4396. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4397. function NtOpenThread(
  4398. ThreadHandle : PHANDLE;
  4399. DesiredAccess : ACCESS_MASK;
  4400. ObjectAttributes : POBJECT_ATTRIBUTES;
  4401. ClientId : PCLIENT_ID
  4402. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4403. function ZwOpenThread(ThreadHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ClientId: PCLIENT_ID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4404. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4405. function NtOpenThreadToken(
  4406. ThreadHandle : HANDLE;
  4407. DesiredAccess : ACCESS_MASK;
  4408. OpenAsSelf : BOOLEAN;
  4409. TokenHandle : PHANDLE
  4410. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4411. function ZwOpenThreadToken(ThreadHandle: HANDLE; DesiredAccess: ACCESS_MASK; OpenAsSelf: BOOLEAN; TokenHandle: PHANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4412. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4413. function NtOpenTimer(
  4414. TimerHandle : PHANDLE;
  4415. DesiredAccess : ACCESS_MASK;
  4416. ObjectAttributes : POBJECT_ATTRIBUTES
  4417. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4418. function ZwOpenTimer(TimerHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4419. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4420. function NtPlugPlayControl(
  4421. ControlCode : ULONG;
  4422. Buffer : PVOID;
  4423. BufferLength : ULONG
  4424. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4425. function ZwPlugPlayControl(ControlCode: ULONG; Buffer: PVOID; BufferLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4426. // Compatibility: W2K, WXP, 2K3
  4427. function NtPowerInformation(
  4428. PowerInformationLevel : POWER_INFORMATION_LEVEL;
  4429. InputBuffer : PVOID;
  4430. InputBufferLength : ULONG;
  4431. OutputBuffer : PVOID;
  4432. OutputBufferLength : ULONG
  4433. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4434. function ZwPowerInformation(PowerInformationLevel: POWER_INFORMATION_LEVEL; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4435. // This function is very similar to PrivilegeCheck() from Advapi32.dll.
  4436. // Refer to the PSDK for additional information. Usually the same flags
  4437. // apply.
  4438. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4439. function NtPrivilegeCheck(
  4440. TokenHandle : HANDLE;
  4441. RequiredPrivileges : PPRIVILEGE_SET;
  4442. Result_ : PBOOLEAN
  4443. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4444. function ZwPrivilegeCheck(TokenHandle: HANDLE; RequiredPrivileges: PPRIVILEGE_SET; Result_: PBOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4445. // This function is very similar to PrivilegedServiceAuditAlarm() from
  4446. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  4447. // same flags apply.
  4448. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4449. function NtPrivilegedServiceAuditAlarm(
  4450. SubsystemName : PUNICODE_STRING;
  4451. ServiceName : PUNICODE_STRING;
  4452. TokenHandle : HANDLE;
  4453. Privileges : PPRIVILEGE_SET;
  4454. AccessGranted : BOOLEAN
  4455. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4456. function ZwPrivilegedServiceAuditAlarm(SubsystemName: PUNICODE_STRING; ServiceName: PUNICODE_STRING; TokenHandle: HANDLE; Privileges: PPRIVILEGE_SET; AccessGranted: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4457. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4458. function NtPrivilegeObjectAuditAlarm(
  4459. SubsystemName : PUNICODE_STRING;
  4460. HandleId : PVOID;
  4461. TokenHandle : HANDLE;
  4462. DesiredAccess : ACCESS_MASK;
  4463. Privileges : PPRIVILEGE_SET;
  4464. AccessGranted : BOOLEAN
  4465. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4466. function ZwPrivilegeObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; Privileges: PPRIVILEGE_SET; AccessGranted: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;
  4467. {$ENDIF}
  4468. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4469. function NtProtectVirtualMemory(
  4470. ProcessHandle : HANDLE;
  4471. BaseAddress : PPVOID;
  4472. ProtectSize : PULONG;
  4473. NewProtect : ULONG;
  4474. OldProtect : PULONG
  4475. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4476. function ZwProtectVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; ProtectSize: PULONG; NewProtect: ULONG; OldProtect: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4477. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4478. function NtPulseEvent(
  4479. EventHandle : HANDLE;
  4480. PreviousState : PULONG
  4481. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4482. function ZwPulseEvent(EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4483. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4484. function NtQueryAttributesFile(
  4485. ObjectAttributes : POBJECT_ATTRIBUTES;
  4486. FileInformation : PFILE_BASIC_INFORMATION
  4487. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4488. function ZwQueryAttributesFile(ObjectAttributes: POBJECT_ATTRIBUTES; FileInformation: PFILE_BASIC_INFORMATION): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4489. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4490. function NtQueryDefaultLocale(
  4491. ThreadOrSystem : BOOLEAN;
  4492. Locale : PLCID
  4493. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4494. function ZwQueryDefaultLocale(ThreadOrSystem: BOOLEAN; Locale: PLCID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4495. // Compatibility: W2K, WXP, 2K3
  4496. function NtQueryDefaultUILanguage(
  4497. LanguageId : PLANGID
  4498. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4499. function ZwQueryDefaultUILanguage(LanguageId: PLANGID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4500. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4501. function NtQueryDirectoryFile(
  4502. FileHandle : HANDLE;
  4503. Event : HANDLE;
  4504. ApcRoutine : PIO_APC_ROUTINE;
  4505. ApcContext : PVOID;
  4506. IoStatusBlock : PIO_STATUS_BLOCK;
  4507. FileInformation : PVOID;
  4508. FileInformationLength : ULONG;
  4509. FileInformationClass : FILE_INFORMATION_CLASS;
  4510. ReturnSingleEntry : BOOLEAN;
  4511. FileName : PUNICODE_STRING;
  4512. RestartScan : BOOLEAN
  4513. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4514. function ZwQueryDirectoryFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG;
  4515. FileInformationClass: FILE_INFORMATION_CLASS; ReturnSingleEntry: BOOLEAN; FileName: PUNICODE_STRING; RestartScan: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4516. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4517. function NtQueryDirectoryObject(
  4518. DirectoryHandle : HANDLE;
  4519. Buffer : PVOID;
  4520. BufferLength : ULONG;
  4521. ReturnSingleEntry : BOOLEAN;
  4522. RestartScan : BOOLEAN;
  4523. Context : PULONG;
  4524. ReturnLength : PULONG
  4525. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4526. function ZwQueryDirectoryObject(DirectoryHandle: HANDLE; Buffer: PVOID; BufferLength: ULONG; ReturnSingleEntry: BOOLEAN; RestartScan: BOOLEAN; Context: PULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;
  4527. {$ENDIF}
  4528. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4529. function NtQueryEaFile(
  4530. FileHandle : HANDLE;
  4531. IoStatusBlock : PIO_STATUS_BLOCK;
  4532. Buffer : PFILE_FULL_EA_INFORMATION;
  4533. BufferLength : ULONG;
  4534. ReturnSingleEntry : BOOLEAN;
  4535. EaList : PFILE_GET_EA_INFORMATION;
  4536. EaListLength : ULONG;
  4537. EaIndex : PULONG;
  4538. RestartScan : BOOLEAN
  4539. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4540. function ZwQueryEaFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_FULL_EA_INFORMATION; BufferLength: ULONG; ReturnSingleEntry: BOOLEAN; EaList: PFILE_GET_EA_INFORMATION; EaListLength: ULONG; EaIndex: PULONG;
  4541. RestartScan: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4542. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4543. function NtQueryEvent(
  4544. EventHandle : HANDLE;
  4545. EventInformationClass : EVENT_INFORMATION_CLASS;
  4546. EventInformation : PVOID;
  4547. EventInformationLength : ULONG;
  4548. ResultLength : PULONG
  4549. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4550. function ZwQueryEvent(EventHandle: HANDLE; EventInformationClass: EVENT_INFORMATION_CLASS; EventInformation: PVOID; EventInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4551. // Compatibility: NT4, W2K, WXP, 2K3
  4552. function NtQueryFullAttributesFile(
  4553. ObjectAttributes : POBJECT_ATTRIBUTES;
  4554. FileInformation : PFILE_NETWORK_OPEN_INFORMATION
  4555. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4556. function ZwQueryFullAttributesFile(ObjectAttributes: POBJECT_ATTRIBUTES; FileInformation: PFILE_NETWORK_OPEN_INFORMATION): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4557. // Compatibility: NT4, W2K, WXP, 2K3
  4558. function NtQueryInformationAtom(
  4559. Atom : USHORT;
  4560. AtomInformationClass : ATOM_INFORMATION_CLASS;
  4561. AtomInformation : PVOID;
  4562. AtomInformationLength : ULONG;
  4563. ReturnLength : PULONG
  4564. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4565. function ZwQueryInformationAtom(Atom: USHORT; AtomInformationClass: ATOM_INFORMATION_CLASS; AtomInformation: PVOID; AtomInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4566. // Documented in the DDK as ZwQueryInformationFile().
  4567. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4568. function NtQueryInformationFile(
  4569. FileHandle : HANDLE;
  4570. IoStatusBlock : PIO_STATUS_BLOCK;
  4571. FileInformation : PVOID;
  4572. FileInformationLength : ULONG;
  4573. FileInformationClass : FILE_INFORMATION_CLASS
  4574. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4575. function ZwQueryInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG; FileInformationClass: FILE_INFORMATION_CLASS): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;
  4576. {$ENDIF}
  4577. // Compatibility: W2K, WXP, 2K3
  4578. function NtQueryInformationJobObject(
  4579. JobHandle : HANDLE;
  4580. JobInformationClass : JOBOBJECTINFOCLASS;
  4581. JobInformation : PVOID;
  4582. JobInformationLength : ULONG;
  4583. ReturnLength : PULONG
  4584. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4585. function ZwQueryInformationJobObject(JobHandle: HANDLE; JobInformationClass: JOBOBJECTINFOCLASS; JobInformation: PVOID; JobInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4586. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4587. function NtQueryInformationPort(
  4588. PortHandle : HANDLE;
  4589. PortInformationClass : PORT_INFORMATION_CLASS;
  4590. PortInformation : PVOID;
  4591. PortInformationLength : ULONG;
  4592. ReturnLength : PULONG
  4593. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4594. function ZwQueryInformationPort(PortHandle: HANDLE; PortInformationClass: PORT_INFORMATION_CLASS; PortInformation: PVOID; PortInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4595. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4596. function NtQueryInformationProcess(
  4597. ProcessHandle : HANDLE;
  4598. ProcessInformationClass : PROCESSINFOCLASS;
  4599. ProcessInformation : PVOID;
  4600. ProcessInformationLength : ULONG;
  4601. ReturnLength : PULONG
  4602. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4603. function ZwQueryInformationProcess(ProcessHandle: HANDLE; ProcessInformationClass: PROCESSINFOCLASS; ProcessInformation: PVOID; ProcessInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;
  4604. {$ENDIF}
  4605. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4606. function NtQueryInformationThread(
  4607. ThreadHandle : HANDLE;
  4608. ThreadInformationClass : THREADINFOCLASS;
  4609. ThreadInformation : PVOID;
  4610. ThreadInformationLength : ULONG;
  4611. ReturnLength : PULONG
  4612. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4613. function ZwQueryInformationThread(ThreadHandle: HANDLE; ThreadInformationClass: THREADINFOCLASS; ThreadInformation: PVOID; ThreadInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4614. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4615. function NtQueryInformationToken(
  4616. TokenHandle : HANDLE;
  4617. TokenInformationClass : TOKEN_INFORMATION_CLASS;
  4618. TokenInformation : PVOID;
  4619. TokenInformationLength : ULONG;
  4620. ReturnLength : PULONG
  4621. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4622. function ZwQueryInformationToken(TokenHandle: HANDLE; TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: PVOID; TokenInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4623. // Compatibility: W2K, WXP, 2K3
  4624. function NtQueryInstallUILanguage(
  4625. LanguageId : PLANGID
  4626. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4627. function ZwQueryInstallUILanguage(LanguageId: PLANGID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4628. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4629. function NtQueryIntervalProfile(
  4630. Source : KPROFILE_SOURCE;
  4631. Interval : PULONG
  4632. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4633. function ZwQueryIntervalProfile(Source: KPROFILE_SOURCE; Interval: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4634. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4635. function NtQueryIoCompletion(
  4636. IoCompletionHandle : HANDLE;
  4637. IoCompletionInformationClass : IO_COMPLETION_INFORMATION_CLASS;
  4638. IoCompletionInformation : PVOID;
  4639. IoCompletionInformationLength : ULONG;
  4640. ResultLength : PULONG
  4641. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4642. function ZwQueryIoCompletion(IoCompletionHandle: HANDLE; IoCompletionInformationClass: IO_COMPLETION_INFORMATION_CLASS; IoCompletionInformation: PVOID; IoCompletionInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  4643. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4644. // Documented in the DDK as ZwQueryKey().
  4645. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4646. function NtQueryKey(
  4647. KeyHandle : HANDLE;
  4648. KeyInformationClass : KEY_INFORMATION_CLASS;
  4649. KeyInformation : PVOID;
  4650. KeyInformationLength : ULONG;
  4651. ResultLength : PULONG
  4652. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4653. function ZwQueryKey(KeyHandle: HANDLE; KeyInformationClass: KEY_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4654. // Compatibility: NT4, W2K, WXP, 2K3
  4655. function NtQueryMultipleValueKey(
  4656. KeyHandle : HANDLE;
  4657. ValueList : PKEY_VALUE_ENTRY;
  4658. NumberOfValues : ULONG;
  4659. Buffer : PVOID;
  4660. Length : PULONG;
  4661. ReturnLength : PULONG
  4662. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4663. function ZwQueryMultipleValueKey(KeyHandle: HANDLE; ValueList: PKEY_VALUE_ENTRY; NumberOfValues: ULONG; Buffer: PVOID; Length: PULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4664. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4665. function NtQueryMutant(
  4666. MutantHandle : HANDLE;
  4667. MutantInformationClass : MUTANT_INFORMATION_CLASS;
  4668. MutantInformation : PVOID;
  4669. MutantInformationLength : ULONG;
  4670. ResultLength : PULONG
  4671. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4672. function ZwQueryMutant(MutantHandle: HANDLE; MutantInformationClass: MUTANT_INFORMATION_CLASS; MutantInformation: PVOID; MutantInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4673. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4674. function NtQueryObject(
  4675. ObjectHandle : HANDLE;
  4676. ObjectInformationClass : OBJECT_INFORMATION_CLASS;
  4677. ObjectInformation : PVOID;
  4678. ObjectInformationLength : ULONG;
  4679. ReturnLength : PULONG
  4680. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4681. function ZwQueryObject(ObjectHandle: HANDLE; ObjectInformationClass: OBJECT_INFORMATION_CLASS; ObjectInformation: PVOID; ObjectInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4682. // Compatibility: W2K, WXP, 2K3
  4683. function NtQueryOpenSubKeys(
  4684. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  4685. NumberOfKey : PULONG
  4686. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4687. function ZwQueryOpenSubKeys(KeyObjectAttributes: POBJECT_ATTRIBUTES; NumberOfKey: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4688. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4689. function NtQueryPerformanceCounter(
  4690. PerformanceCount : PLARGE_INTEGER;
  4691. PerformanceFrequency : PLARGE_INTEGER
  4692. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4693. function ZwQueryPerformanceCounter(PerformanceCount: PLARGE_INTEGER; PerformanceFrequency: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4694. // Compatibility: WXP, 2K3
  4695. function NtQueryPortInformationProcess(): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4696. function ZwQueryPortInformationProcess(): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4697. // Compatibility: W2K, WXP, 2K3
  4698. function NtQueryQuotaInformationFile(
  4699. FileHandle : HANDLE;
  4700. IoStatusBlock : PIO_STATUS_BLOCK;
  4701. Buffer : PFILE_USER_QUOTA_INFORMATION;
  4702. BufferLength : ULONG;
  4703. ReturnSingleEntry : BOOLEAN;
  4704. QuotaList : PFILE_QUOTA_LIST_INFORMATION;
  4705. QuotaListLength : ULONG;
  4706. ResumeSid : PSID;
  4707. RestartScan : BOOLEAN
  4708. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4709. function ZwQueryQuotaInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_USER_QUOTA_INFORMATION; BufferLength: ULONG; ReturnSingleEntry: BOOLEAN; QuotaList: PFILE_QUOTA_LIST_INFORMATION;
  4710. QuotaListLength: ULONG; ResumeSid: PSID; RestartScan: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4711. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4712. function NtQuerySection(
  4713. SectionHandle : HANDLE;
  4714. SectionInformationClass : SECTION_INFORMATION_CLASS;
  4715. SectionInformation : PVOID;
  4716. SectionInformationLength : ULONG;
  4717. ResultLength : PULONG
  4718. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4719. function ZwQuerySection(SectionHandle: HANDLE; SectionInformationClass: SECTION_INFORMATION_CLASS; SectionInformation: PVOID; SectionInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4720. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4721. function NtQuerySecurityObject(
  4722. Handle : HANDLE;
  4723. RequestedInformation : SECURITY_INFORMATION;
  4724. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  4725. SecurityDescriptorLength : ULONG;
  4726. ReturnLength : PULONG
  4727. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4728. function ZwQuerySecurityObject(Handle: HANDLE; RequestedInformation: SECURITY_INFORMATION; SecurityDescriptor: PSECURITY_DESCRIPTOR; SecurityDescriptorLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;
  4729. {$ENDIF}
  4730. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4731. function NtQuerySemaphore(
  4732. SemaphoreHandle : HANDLE;
  4733. SemaphoreInformationClass : SEMAPHORE_INFORMATION_CLASS;
  4734. SemaphoreInformation : PVOID;
  4735. SemaphoreInformationLength : ULONG;
  4736. ResultLength : PULONG
  4737. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4738. function ZwQuerySemaphore(SemaphoreHandle: HANDLE; SemaphoreInformationClass: SEMAPHORE_INFORMATION_CLASS; SemaphoreInformation: PVOID; SemaphoreInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  4739. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4740. // Documented in the DDK as ZwQuerySymbolicLinkObject().
  4741. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4742. function NtQuerySymbolicLinkObject(
  4743. SymbolicLinkHandle : HANDLE;
  4744. TargetName : PUNICODE_STRING;
  4745. ReturnLength : PULONG
  4746. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4747. function ZwQuerySymbolicLinkObject(SymbolicLinkHandle: HANDLE; TargetName: PUNICODE_STRING; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4748. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4749. function NtQuerySystemEnvironmentValue(
  4750. Name : PUNICODE_STRING;
  4751. Value : PVOID;
  4752. ValueLength : ULONG;
  4753. ReturnLength : PULONG
  4754. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4755. function ZwQuerySystemEnvironmentValue(Name: PUNICODE_STRING; Value: PVOID; ValueLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4756. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4757. function NtQuerySystemInformation(
  4758. SystemInformationClass : SYSTEM_INFORMATION_CLASS;
  4759. SystemInformation : PVOID;
  4760. SystemInformationLength : ULONG;
  4761. ReturnLength : PULONG
  4762. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4763. function ZwQuerySystemInformation(SystemInformationClass: SYSTEM_INFORMATION_CLASS; SystemInformation: PVOID; SystemInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4764. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4765. function NtQuerySystemTime(
  4766. CurrentTime : PLARGE_INTEGER
  4767. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4768. function ZwQuerySystemTime(CurrentTime: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4769. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4770. function NtQueryTimer(
  4771. TimerHandle : HANDLE;
  4772. TimerInformationClass : TIMER_INFORMATION_CLASS;
  4773. TimerInformation : PVOID;
  4774. TimerInformationLength : ULONG;
  4775. ResultLength : PULONG
  4776. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4777. function ZwQueryTimer(TimerHandle: HANDLE; TimerInformationClass: TIMER_INFORMATION_CLASS; TimerInformation: PVOID; TimerInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4778. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4779. function NtQueryTimerResolution(
  4780. CoarsestResolution : PULONG;
  4781. FinestResolution : PULONG;
  4782. ActualResolution : PULONG
  4783. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4784. function ZwQueryTimerResolution(CoarsestResolution: PULONG; FinestResolution: PULONG; ActualResolution: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4785. // Documented in the DDK as ZwQueryValueKey().
  4786. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4787. function NtQueryValueKey(
  4788. KeyHandle : HANDLE;
  4789. ValueName : PUNICODE_STRING;
  4790. KeyValueInformationClass : KEY_VALUE_INFORMATION_CLASS;
  4791. KeyValueInformation : PVOID;
  4792. KeyValueInformationLength : ULONG;
  4793. ResultLength : PULONG
  4794. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4795. function ZwQueryValueKey(KeyHandle: HANDLE; ValueName: PUNICODE_STRING; KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS; KeyValueInformation: PVOID; KeyValueInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  4796. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4797. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4798. function NtQueryVirtualMemory(
  4799. ProcessHandle : HANDLE;
  4800. BaseAddress : PVOID;
  4801. MemoryInformationClass : MEMORY_INFORMATION_CLASS;
  4802. MemoryInformation : PVOID;
  4803. MemoryInformationLength : ULONG;
  4804. ReturnLength : PULONG
  4805. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4806. function ZwQueryVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PVOID; MemoryInformationClass: MEMORY_INFORMATION_CLASS; MemoryInformation: PVOID; MemoryInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  4807. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4808. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4809. function NtQueryVolumeInformationFile(
  4810. FileHandle : HANDLE;
  4811. IoStatusBlock : PIO_STATUS_BLOCK;
  4812. VolumeInformation : PVOID;
  4813. VolumeInformationLength : ULONG;
  4814. VolumeInformationClass : FS_INFORMATION_CLASS
  4815. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4816. function ZwQueryVolumeInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; VolumeInformation: PVOID; VolumeInformationLength: ULONG; VolumeInformationClass: FS_INFORMATION_CLASS): NTSTATUS; stdcall;
  4817. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4818. // Compatibility: NT4, W2K, WXP, 2K3
  4819. function NtQueueApcThread(
  4820. ThreadHandle : HANDLE;
  4821. ApcRoutine : PKNORMAL_ROUTINE;
  4822. ApcContext : PVOID;
  4823. Argument1 : PVOID;
  4824. Argument2 : PVOID
  4825. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4826. function ZwQueueApcThread(ThreadHandle: HANDLE; ApcRoutine: PKNORMAL_ROUTINE; ApcContext: PVOID; Argument1: PVOID; Argument2: PVOID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4827. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4828. function NtRaiseException(
  4829. ExceptionRecord : PEXCEPTION_RECORD;
  4830. Context : PCONTEXT;
  4831. SearchFrames : BOOLEAN
  4832. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4833. function ZwRaiseException(ExceptionRecord: PEXCEPTION_RECORD; Context: PCONTEXT; SearchFrames: BOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4834. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4835. function NtRaiseHardError(
  4836. Status : NTSTATUS;
  4837. NumberOfArguments : ULONG;
  4838. StringArgumentsMask : ULONG;
  4839. Arguments : PULONG;
  4840. MessageBoxType : ULONG;
  4841. MessageBoxResult : PULONG
  4842. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4843. function ZwRaiseHardError(Status: NTSTATUS; NumberOfArguments: ULONG; StringArgumentsMask: ULONG; Arguments: PULONG; MessageBoxType: ULONG; MessageBoxResult: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4844. // Documented in the DDK as ZwReadFile().
  4845. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4846. function NtReadFile(
  4847. FileHandle : HANDLE;
  4848. Event : HANDLE;
  4849. ApcRoutine : PIO_APC_ROUTINE;
  4850. ApcContext : PVOID;
  4851. IoStatusBlock : PIO_STATUS_BLOCK;
  4852. Buffer : PVOID;
  4853. Length : ULONG;
  4854. ByteOffset : PLARGE_INTEGER;
  4855. Key : PULONG
  4856. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4857. function ZwReadFile(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;
  4858. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4859. // Compatibility: NT4, W2K, WXP, 2K3
  4860. function NtReadFileScatter(
  4861. FileHandle : HANDLE;
  4862. Event : HANDLE;
  4863. ApcRoutine : PIO_APC_ROUTINE;
  4864. ApcContext : PVOID;
  4865. IoStatusBlock : PIO_STATUS_BLOCK;
  4866. Buffer : PFILE_SEGMENT_ELEMENT;
  4867. Length : ULONG;
  4868. ByteOffset : PLARGE_INTEGER;
  4869. Key : PULONG
  4870. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4871. function ZwReadFileScatter(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_SEGMENT_ELEMENT; Length: ULONG; ByteOffset: PLARGE_INTEGER;
  4872. Key: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4873. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4874. function NtReadRequestData(
  4875. PortHandle : HANDLE;
  4876. Message : PPORT_MESSAGE;
  4877. Index : ULONG;
  4878. Buffer : PVOID;
  4879. BufferLength : ULONG;
  4880. ReturnLength : PULONG
  4881. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4882. function ZwReadRequestData(PortHandle: HANDLE; Message: PPORT_MESSAGE; Index: ULONG; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4883. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4884. function NtReadVirtualMemory(
  4885. ProcessHandle : HANDLE;
  4886. BaseAddress : PVOID;
  4887. Buffer : PVOID;
  4888. BufferLength : ULONG;
  4889. ReturnLength : PULONG
  4890. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4891. function ZwReadVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PVOID; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4892. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4893. function NtRegisterThreadTerminatePort(
  4894. PortHandle : HANDLE
  4895. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4896. function ZwRegisterThreadTerminatePort(PortHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4897. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4898. function NtReleaseMutant(
  4899. MutantHandle : HANDLE;
  4900. PreviousState : PULONG
  4901. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4902. function ZwReleaseMutant(MutantHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4903. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4904. function NtReleaseSemaphore(
  4905. SemaphoreHandle : HANDLE;
  4906. ReleaseCount : LONG;
  4907. PreviousCount : PLONG
  4908. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4909. function ZwReleaseSemaphore(SemaphoreHandle: HANDLE; ReleaseCount: LONG; PreviousCount: PLONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4910. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4911. function NtRemoveIoCompletion(
  4912. IoCompletionHandle : HANDLE;
  4913. CompletionKey : PULONG;
  4914. CompletionValue : PULONG;
  4915. IoStatusBlock : PIO_STATUS_BLOCK;
  4916. Timeout : PLARGE_INTEGER
  4917. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4918. function ZwRemoveIoCompletion(IoCompletionHandle: HANDLE; CompletionKey: PULONG; CompletionValue: PULONG; IoStatusBlock: PIO_STATUS_BLOCK; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4919. // Compatibility: WXP, 2K3
  4920. function NtRemoveProcessDebug(
  4921. hProcess : HANDLE;
  4922. hDebugObject : HANDLE
  4923. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4924. function ZwRemoveProcessDebug(hProcess: HANDLE; hDebugObject: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4925. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4926. function NtReplaceKey(
  4927. NewFileObjectAttributes : POBJECT_ATTRIBUTES;
  4928. KeyHandle : HANDLE;
  4929. OldFileObjectAttributes : POBJECT_ATTRIBUTES
  4930. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4931. function ZwReplaceKey(NewFileObjectAttributes: POBJECT_ATTRIBUTES; KeyHandle: HANDLE; OldFileObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4932. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4933. function NtReplyPort(
  4934. PortHandle : HANDLE;
  4935. ReplyMessage : PPORT_MESSAGE
  4936. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4937. function ZwReplyPort(PortHandle: HANDLE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4938. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4939. function NtReplyWaitReceivePort(
  4940. PortHandle : HANDLE;
  4941. PortIdentifier : PULONG;
  4942. ReplyMessage : PPORT_MESSAGE;
  4943. Message : PPORT_MESSAGE
  4944. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4945. function ZwReplyWaitReceivePort(PortHandle: HANDLE; PortIdentifier: PULONG; ReplyMessage: PPORT_MESSAGE; Message: PPORT_MESSAGE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4946. // Compatibility: W2K, WXP, 2K3
  4947. function NtReplyWaitReceivePortEx(
  4948. PortHandle : HANDLE;
  4949. PortIdentifier : PULONG;
  4950. ReplyMessage : PPORT_MESSAGE;
  4951. Message : PPORT_MESSAGE;
  4952. Timeout : PLARGE_INTEGER
  4953. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4954. function ZwReplyWaitReceivePortEx(PortHandle: HANDLE; PortIdentifier: PULONG; ReplyMessage: PPORT_MESSAGE; Message: PPORT_MESSAGE; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4955. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4956. function NtReplyWaitReplyPort(
  4957. PortHandle : HANDLE;
  4958. ReplyMessage : PPORT_MESSAGE
  4959. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4960. function ZwReplyWaitReplyPort(PortHandle: HANDLE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4961. // Returns STATUS_NOT_IMPLEMENTED. Only MS knows the intention behind this.
  4962. //
  4963. // !!!DO NOT USE!!!
  4964. // Compatibility: NT4, W2K
  4965. function NtReplyWaitSendChannel(
  4966. x : PVOID;
  4967. y : PVOID;
  4968. z : PVOID
  4969. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4970. function ZwReplyWaitSendChannel(x: PVOID; y: PVOID; z: PVOID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4971. // Compatibility: W2K, WXP, 2K3
  4972. function NtRequestDeviceWakeup(
  4973. DeviceHandle : HANDLE
  4974. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4975. function ZwRequestDeviceWakeup(DeviceHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4976. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4977. function NtRequestPort(
  4978. PortHandle : HANDLE;
  4979. RequestMessage : PPORT_MESSAGE
  4980. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4981. function ZwRequestPort(PortHandle: HANDLE; RequestMessage: PPORT_MESSAGE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4982. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4983. function NtRequestWaitReplyPort(
  4984. PortHandle : HANDLE;
  4985. RequestMessage : PPORT_MESSAGE;
  4986. ReplyMessage : PPORT_MESSAGE
  4987. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4988. function ZwRequestWaitReplyPort(PortHandle: HANDLE; RequestMessage: PPORT_MESSAGE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4989. // Compatibility: W2K, WXP, 2K3
  4990. function NtRequestWakeupLatency(
  4991. Latency : LATENCY_TIME
  4992. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4993. function ZwRequestWakeupLatency(Latency: LATENCY_TIME): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4994. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  4995. function NtResetEvent(
  4996. EventHandle : HANDLE;
  4997. PreviousState : PULONG
  4998. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  4999. function ZwResetEvent(EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5000. // Compatibility: W2K, WXP, 2K3
  5001. function NtResetWriteWatch(
  5002. ProcessHandle : HANDLE;
  5003. BaseAddress : PVOID;
  5004. RegionSize : ULONG
  5005. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5006. function ZwResetWriteWatch(ProcessHandle: HANDLE; BaseAddress: PVOID; RegionSize: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5007. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5008. function NtRestoreKey(
  5009. KeyHandle : HANDLE;
  5010. FileHandle : HANDLE;
  5011. Flags : ULONG
  5012. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5013. function ZwRestoreKey(KeyHandle: HANDLE; FileHandle: HANDLE; Flags: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5014. // Compatibility: WXP, 2K3
  5015. function NtResumeProcess(
  5016. hProcess : HANDLE
  5017. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5018. function ZwResumeProcess(hProcess: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5019. // This function is very similar to ResumeThread() from Kernel32.dll. Refer
  5020. // to the PSDK for additional information. Usually the same flags apply.
  5021. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5022. function NtResumeThread(
  5023. hThread : HANDLE;
  5024. dwResumeCount : PULONG
  5025. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5026. function ZwResumeThread(hThread: HANDLE; dwResumeCount: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5027. // Relates to RegSaveKey().
  5028. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5029. function NtSaveKey(
  5030. KeyHandle : HANDLE;
  5031. FileHandle : HANDLE
  5032. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5033. function ZwSaveKey(KeyHandle: HANDLE; FileHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5034. // Relates to RegSaveKeyEx().
  5035. // Compatibility: WXP, 2K3
  5036. function NtSaveKeyEx(
  5037. KeyHandle : HANDLE;
  5038. FileHandle : HANDLE;
  5039. Flags : DWORD
  5040. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5041. function ZwSaveKeyEx(KeyHandle: HANDLE; FileHandle: HANDLE; Flags: DWORD): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5042. // Compatibility: W2K, WXP, 2K3
  5043. function NtSaveMergedKeys(
  5044. KeyHandle1 : HANDLE;
  5045. KeyHandle2 : HANDLE;
  5046. FileHandle : HANDLE
  5047. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5048. function ZwSaveMergedKeys(KeyHandle1: HANDLE; KeyHandle2: HANDLE; FileHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5049. // Compatibility: W2K, WXP, 2K3
  5050. function NtSecureConnectPort(
  5051. PortHandle : PHANDLE;
  5052. PortName : PUNICODE_STRING;
  5053. SecurityQos : PSECURITY_QUALITY_OF_SERVICE;
  5054. WriteSection : PPORT_SECTION_WRITE;
  5055. ServerSid : PSID;
  5056. ReadSection : PPORT_SECTION_READ;
  5057. MaxMessageSize : PULONG;
  5058. ConnectData : PVOID;
  5059. ConnectDataLength : PULONG
  5060. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5061. function ZwSecureConnectPort(PortHandle: PHANDLE; PortName: PUNICODE_STRING; SecurityQos: PSECURITY_QUALITY_OF_SERVICE; WriteSection: PPORT_SECTION_WRITE; ServerSid: PSID; ReadSection: PPORT_SECTION_READ; MaxMessageSize: PULONG;
  5062. ConnectData: PVOID; ConnectDataLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5063. // Returns STATUS_NOT_IMPLEMENTED. Only MS knows the intention behind this.
  5064. //
  5065. // !!!DO NOT USE!!!
  5066. // Compatibility: NT4, W2K
  5067. function NtSendWaitReplyChannel(
  5068. x : PVOID;
  5069. y : PVOID;
  5070. z : PVOID;
  5071. z2 : PVOID
  5072. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5073. function ZwSendWaitReplyChannel(x: PVOID; y: PVOID; z: PVOID; z2: PVOID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5074. // Returns STATUS_NOT_IMPLEMENTED. Only MS knows the intention behind this.
  5075. //
  5076. // !!!DO NOT USE!!!
  5077. // Compatibility: NT4, W2K
  5078. function NtSetContextChannel(
  5079. x : PVOID
  5080. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5081. function ZwSetContextChannel(x: PVOID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5082. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5083. function NtSetContextThread(
  5084. ThreadHandle : HANDLE;
  5085. Context : PCONTEXT
  5086. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5087. function ZwSetContextThread(ThreadHandle: HANDLE; Context: PCONTEXT): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5088. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5089. function NtSetDefaultHardErrorPort(
  5090. PortHandle : HANDLE
  5091. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5092. function ZwSetDefaultHardErrorPort(PortHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5093. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5094. function NtSetDefaultLocale(
  5095. ThreadOrSystem : BOOLEAN;
  5096. Locale : LCID
  5097. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5098. function ZwSetDefaultLocale(ThreadOrSystem: BOOLEAN; Locale: LCID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5099. // Compatibility: W2K, WXP, 2K3
  5100. function NtSetDefaultUILanguage(
  5101. LanguageId : LANGID
  5102. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5103. function ZwSetDefaultUILanguage(LanguageId: LANGID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5104. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5105. function NtSetEaFile(
  5106. FileHandle : HANDLE;
  5107. IoStatusBlock : PIO_STATUS_BLOCK;
  5108. Buffer : PFILE_FULL_EA_INFORMATION;
  5109. BufferLength : ULONG
  5110. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5111. function ZwSetEaFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_FULL_EA_INFORMATION; BufferLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5112. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5113. function NtSetEvent(
  5114. EventHandle : HANDLE;
  5115. PreviousState : PULONG
  5116. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5117. function ZwSetEvent(EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5118. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5119. function NtSetHighEventPair(
  5120. EventPairHandle : HANDLE
  5121. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5122. function ZwSetHighEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5123. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5124. function NtSetHighWaitLowEventPair(
  5125. EventPairHandle : HANDLE
  5126. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5127. function ZwSetHighWaitLowEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5128. // Compatibility: NT3, NT4
  5129. function NtSetHighWaitLowThread(): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5130. function ZwSetHighWaitLowThread(): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5131. // Documented in the DDK as ZwSetInformationFile().
  5132. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5133. function NtSetInformationFile(
  5134. FileHandle : HANDLE;
  5135. IoStatusBlock : PIO_STATUS_BLOCK;
  5136. FileInformation : PVOID;
  5137. FileInformationLength : ULONG;
  5138. FileInformationClass : FILE_INFORMATION_CLASS
  5139. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5140. function ZwSetInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG; FileInformationClass: FILE_INFORMATION_CLASS): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;
  5141. {$ENDIF}
  5142. // Compatibility: W2K, WXP, 2K3
  5143. function NtSetInformationJobObject(
  5144. JobHandle : HANDLE;
  5145. JobInformationClass : JOBOBJECTINFOCLASS;
  5146. JobInformation : PVOID;
  5147. JobInformationLength : ULONG
  5148. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5149. function ZwSetInformationJobObject(JobHandle: HANDLE; JobInformationClass: JOBOBJECTINFOCLASS; JobInformation: PVOID; JobInformationLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5150. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5151. function NtSetInformationKey(
  5152. KeyHandle : HANDLE;
  5153. KeyInformationClass : KEY_SET_INFORMATION_CLASS;
  5154. KeyInformation : PVOID;
  5155. KeyInformationLength : ULONG
  5156. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5157. function ZwSetInformationKey(KeyHandle: HANDLE; KeyInformationClass: KEY_SET_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5158. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5159. function NtSetInformationObject(
  5160. ObjectHandle : HANDLE;
  5161. ObjectInformationClass : OBJECT_INFORMATION_CLASS;
  5162. ObjectInformation : PVOID;
  5163. ObjectInformationLength : ULONG
  5164. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5165. function ZwSetInformationObject(ObjectHandle: HANDLE; ObjectInformationClass: OBJECT_INFORMATION_CLASS; ObjectInformation: PVOID; ObjectInformationLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5166. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5167. function NtSetInformationProcess(
  5168. ProcessHandle : HANDLE;
  5169. ProcessInformationClass : PROCESSINFOCLASS;
  5170. ProcessInformation : PVOID;
  5171. ProcessInformationLength : ULONG
  5172. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5173. function ZwSetInformationProcess(ProcessHandle: HANDLE; ProcessInformationClass: PROCESSINFOCLASS; ProcessInformation: PVOID; ProcessInformationLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5174. // Documented in the DDK as ZwSetInformationThread().
  5175. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5176. function NtSetInformationThread(
  5177. ThreadHandle : HANDLE;
  5178. ThreadInformationClass : THREADINFOCLASS;
  5179. ThreadInformation : PVOID;
  5180. ThreadInformationLength : ULONG
  5181. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5182. function ZwSetInformationThread(ThreadHandle: HANDLE; ThreadInformationClass: THREADINFOCLASS; ThreadInformation: PVOID; ThreadInformationLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5183. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5184. function NtSetInformationToken(
  5185. TokenHandle : HANDLE;
  5186. TokenInformationClass : TOKEN_INFORMATION_CLASS;
  5187. TokenInformation : PVOID;
  5188. TokenInformationLength : ULONG
  5189. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5190. function ZwSetInformationToken(TokenHandle: HANDLE; TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: PVOID; TokenInformationLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5191. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5192. function NtSetIntervalProfile(
  5193. Interval : ULONG;
  5194. Source : KPROFILE_SOURCE
  5195. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5196. function ZwSetIntervalProfile(Interval: ULONG; Source: KPROFILE_SOURCE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5197. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5198. function NtSetIoCompletion(
  5199. IoCompletionHandle : HANDLE;
  5200. CompletionKey : ULONG;
  5201. CompletionValue : ULONG;
  5202. Status : NTSTATUS;
  5203. Information : ULONG
  5204. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5205. function ZwSetIoCompletion(IoCompletionHandle: HANDLE; CompletionKey: ULONG; CompletionValue: ULONG; Status: NTSTATUS; Information: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5206. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5207. function NtSetLdtEntries(
  5208. Selector1 : ULONG;
  5209. LdtEntry1 : LDT_ENTRY;
  5210. Selector2 : ULONG;
  5211. LdtEntry2 : LDT_ENTRY
  5212. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5213. function ZwSetLdtEntries(Selector1: ULONG; LdtEntry1: LDT_ENTRY; Selector2: ULONG; LdtEntry2: LDT_ENTRY): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5214. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5215. function NtSetLowEventPair(
  5216. EventPairHandle : HANDLE
  5217. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5218. function ZwSetLowEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5219. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5220. function NtSetLowWaitHighEventPair(
  5221. EventPairHandle : HANDLE
  5222. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5223. function ZwSetLowWaitHighEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5224. // Compatibility: NT3, NT4
  5225. function NtSetLowWaitHighThread(): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5226. function ZwSetLowWaitHighThread(): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5227. // Compatibility: W2K, WXP, 2K3
  5228. function NtSetQuotaInformationFile(
  5229. FileHandle : HANDLE;
  5230. IoStatusBlock : PIO_STATUS_BLOCK;
  5231. Buffer : PFILE_USER_QUOTA_INFORMATION;
  5232. BufferLength : ULONG
  5233. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5234. function ZwSetQuotaInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_USER_QUOTA_INFORMATION; BufferLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5235. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5236. function NtSetSecurityObject(
  5237. Handle : HANDLE;
  5238. SecurityInformation : SECURITY_INFORMATION;
  5239. SecurityDescriptor : PSECURITY_DESCRIPTOR
  5240. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5241. function ZwSetSecurityObject(Handle: HANDLE; SecurityInformation: SECURITY_INFORMATION; SecurityDescriptor: PSECURITY_DESCRIPTOR): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5242. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5243. function NtSetSystemEnvironmentValue(
  5244. Name : PUNICODE_STRING;
  5245. Value : PUNICODE_STRING
  5246. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5247. function ZwSetSystemEnvironmentValue(Name: PUNICODE_STRING; Value: PUNICODE_STRING): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5248. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5249. function NtSetSystemInformation(
  5250. SystemInformationClass : SYSTEM_INFORMATION_CLASS;
  5251. SystemInformation : PVOID;
  5252. SystemInformationLength : ULONG
  5253. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5254. function ZwSetSystemInformation(SystemInformationClass: SYSTEM_INFORMATION_CLASS; SystemInformation: PVOID; SystemInformationLength: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5255. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5256. function NtSetSystemPowerState(
  5257. SystemAction : POWER_ACTION;
  5258. MinSystemState : SYSTEM_POWER_STATE;
  5259. Flags : ULONG
  5260. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5261. function ZwSetSystemPowerState(SystemAction: POWER_ACTION; MinSystemState: SYSTEM_POWER_STATE; Flags: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5262. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5263. function NtSetSystemTime(
  5264. NewTime : PLARGE_INTEGER;
  5265. OldTime : PLARGE_INTEGER
  5266. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5267. function ZwSetSystemTime(NewTime: PLARGE_INTEGER; OldTime: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5268. // Compatibility: W2K, WXP, 2K3
  5269. function NtSetThreadExecutionState(
  5270. ExecutionState : EXECUTION_STATE;
  5271. PreviousExecutionState : PEXECUTION_STATE
  5272. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5273. function ZwSetThreadExecutionState(ExecutionState: EXECUTION_STATE; PreviousExecutionState: PEXECUTION_STATE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5274. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5275. function NtSetTimer(
  5276. TimerHandle : HANDLE;
  5277. DueTime : PLARGE_INTEGER;
  5278. TimerApcRoutine : PTIMER_APC_ROUTINE;
  5279. TimerContext : PVOID;
  5280. Resume : BOOLEAN;
  5281. Period : LONG;
  5282. PreviousState : PBOOLEAN
  5283. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5284. function ZwSetTimer(TimerHandle: HANDLE; DueTime: PLARGE_INTEGER; TimerApcRoutine: PTIMER_APC_ROUTINE; TimerContext: PVOID; Resume: BOOLEAN; Period: LONG; PreviousState: PBOOLEAN): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5285. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5286. function NtSetTimerResolution(
  5287. RequestedResolution : ULONG;
  5288. Set_ : BOOLEAN;
  5289. ActualResolution : PULONG
  5290. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5291. function ZwSetTimerResolution(RequestedResolution: ULONG; Set_: BOOLEAN; ActualResolution: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5292. // Compatibility: W2K, WXP, 2K3
  5293. function NtSetUuidSeed(
  5294. UuidSeed : PUCHAR
  5295. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5296. function ZwSetUuidSeed(UuidSeed: PUCHAR): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5297. // Documented in the DDK as ZwSetValueKey().
  5298. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5299. function NtSetValueKey(
  5300. KeyHandle : HANDLE;
  5301. ValueName : PUNICODE_STRING;
  5302. TitleIndex : ULONG;
  5303. Type_ : ULONG;
  5304. Data : PVOID;
  5305. DataSize : ULONG
  5306. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5307. function ZwSetValueKey(KeyHandle: HANDLE; ValueName: PUNICODE_STRING; TitleIndex: ULONG; Type_: ULONG; Data: PVOID; DataSize: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5308. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5309. function NtSetVolumeInformationFile(
  5310. FileHandle : HANDLE;
  5311. IoStatusBlock : PIO_STATUS_BLOCK;
  5312. Buffer : PVOID;
  5313. BufferLength : ULONG;
  5314. VolumeInformationClass : FS_INFORMATION_CLASS
  5315. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5316. function ZwSetVolumeInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PVOID; BufferLength: ULONG; VolumeInformationClass: FS_INFORMATION_CLASS): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5317. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5318. function NtShutdownSystem(
  5319. Action : SHUTDOWN_ACTION
  5320. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5321. function ZwShutdownSystem(Action: SHUTDOWN_ACTION): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5322. // Compatibility: NT4, W2K, WXP, 2K3
  5323. function NtSignalAndWaitForSingleObject(
  5324. HandleToSignal : HANDLE;
  5325. HandleToWait : HANDLE;
  5326. Alertable : BOOLEAN;
  5327. Timeout : PLARGE_INTEGER
  5328. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5329. function ZwSignalAndWaitForSingleObject(HandleToSignal: HANDLE; HandleToWait: HANDLE; Alertable: BOOLEAN; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5330. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5331. function NtStartProfile(
  5332. ProfileHandle : HANDLE
  5333. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5334. function ZwStartProfile(ProfileHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5335. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5336. function NtStopProfile(
  5337. ProfileHandle : HANDLE
  5338. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5339. function ZwStopProfile(ProfileHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5340. // Compatibility: WXP, 2K3
  5341. function NtSuspendProcess(
  5342. hProcess : HANDLE
  5343. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5344. function ZwSuspendProcess(hProcess: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5345. // This function is very similar to SuspendThread() from Kernel32.dll.
  5346. // Refer to the PSDK for additional information. Usually the same flags
  5347. // apply.
  5348. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5349. function NtSuspendThread(
  5350. hThread : HANDLE;
  5351. dwLastResumeCount : PULONG
  5352. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5353. function ZwSuspendThread(hThread: HANDLE; dwLastResumeCount: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5354. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5355. function NtSystemDebugControl(
  5356. ControlCode : DEBUG_CONTROL_CODE;
  5357. InputBuffer : PVOID;
  5358. InputBufferLength : ULONG;
  5359. OutputBuffer : PVOID;
  5360. OutputBufferLength : ULONG;
  5361. ReturnLength : PULONG
  5362. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5363. function ZwSystemDebugControl(ControlCode: DEBUG_CONTROL_CODE; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5364. // Compatibility: W2K, WXP, 2K3
  5365. function NtTerminateJobObject(
  5366. JobHandle : HANDLE;
  5367. ExitStatus : NTSTATUS
  5368. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5369. function ZwTerminateJobObject(JobHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5370. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5371. function NtTerminateProcess(
  5372. ProcessHandle : HANDLE;
  5373. ExitStatus : NTSTATUS
  5374. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5375. function ZwTerminateProcess(ProcessHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5376. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5377. function NtTerminateThread(
  5378. ThreadHandle : HANDLE;
  5379. ExitStatus : NTSTATUS
  5380. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5381. function ZwTerminateThread(ThreadHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5382. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5383. function NtTestAlert(): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5384. function ZwTestAlert(): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5385. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5386. function NtUnloadDriver(
  5387. DriverServiceName : PUNICODE_STRING
  5388. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5389. function ZwUnloadDriver(DriverServiceName: PUNICODE_STRING): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5390. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5391. function NtUnloadKey(
  5392. KeyObjectAttributes : POBJECT_ATTRIBUTES
  5393. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5394. function ZwUnloadKey(KeyObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5395. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5396. function NtUnlockFile(
  5397. FileHandle : HANDLE;
  5398. IoStatusBlock : PIO_STATUS_BLOCK;
  5399. LockOffset : PULARGE_INTEGER;
  5400. LockLength : PULARGE_INTEGER;
  5401. Key : ULONG
  5402. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5403. function ZwUnlockFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; LockOffset: PULARGE_INTEGER; LockLength: PULARGE_INTEGER; Key: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5404. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5405. function NtUnlockVirtualMemory(
  5406. ProcessHandle : HANDLE;
  5407. BaseAddress : PPVOID;
  5408. LockSize : PULONG;
  5409. LockType : ULONG
  5410. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5411. function ZwUnlockVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; LockSize: PULONG; LockType: ULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5412. // Documented in the DDK as ZwUnmapViewOfSection().
  5413. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5414. function NtUnmapViewOfSection(
  5415. ProcessHandle : HANDLE;
  5416. BaseAddress : PVOID
  5417. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5418. function ZwUnmapViewOfSection(ProcessHandle: HANDLE; BaseAddress: PVOID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5419. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5420. function NtVdmControl(
  5421. ControlCode : ULONG;
  5422. ControlData : PVOID
  5423. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5424. function ZwVdmControl(ControlCode: ULONG; ControlData: PVOID): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5425. // Compatibility: NT3
  5426. function NtW32Call(
  5427. RoutineIndex : ULONG;
  5428. Argument : PVOID;
  5429. ArgumentLength : ULONG;
  5430. Result_ : PPVOID;
  5431. ResultLength : PULONG
  5432. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5433. function ZwW32Call(RoutineIndex: ULONG; Argument: PVOID; ArgumentLength: ULONG; Result_: PPVOID; ResultLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5434. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5435. function NtWaitForMultipleObjects(
  5436. HandleCount : ULONG;
  5437. Handles : PHANDLE;
  5438. WaitType : WAIT_TYPE;
  5439. Alertable : BOOLEAN;
  5440. Timeout : PLARGE_INTEGER
  5441. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5442. function ZwWaitForMultipleObjects(HandleCount: ULONG; Handles: PHANDLE; WaitType: WAIT_TYPE; Alertable: BOOLEAN; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5443. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5444. function NtWaitForSingleObject(
  5445. Handle : HANDLE;
  5446. Alertable : BOOLEAN;
  5447. Timeout : PLARGE_INTEGER
  5448. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5449. function ZwWaitForSingleObject(Handle: HANDLE; Alertable: BOOLEAN; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5450. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5451. function NtWaitHighEventPair(
  5452. EventPairHandle : HANDLE
  5453. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5454. function ZwWaitHighEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5455. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5456. function NtWaitLowEventPair(
  5457. EventPairHandle : HANDLE
  5458. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5459. function ZwWaitLowEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5460. // Documented in the DDK as ZwWriteFile().
  5461. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5462. function NtWriteFile(
  5463. FileHandle : HANDLE;
  5464. Event : HANDLE;
  5465. ApcRoutine : PIO_APC_ROUTINE;
  5466. ApcContext : PVOID;
  5467. IoStatusBlock : PIO_STATUS_BLOCK;
  5468. Buffer : PVOID;
  5469. Length : ULONG;
  5470. ByteOffset : PLARGE_INTEGER;
  5471. Key : PULONG
  5472. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5473. function ZwWriteFile(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;
  5474. {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5475. // Compatibility: NT4, W2K, WXP, 2K3
  5476. function NtWriteFileGather(
  5477. FileHandle : HANDLE;
  5478. Event : HANDLE;
  5479. ApcRoutine : PIO_APC_ROUTINE;
  5480. ApcContext : PVOID;
  5481. IoStatusBlock : PIO_STATUS_BLOCK;
  5482. Buffer : PFILE_SEGMENT_ELEMENT;
  5483. Length : ULONG;
  5484. ByteOffset : PLARGE_INTEGER;
  5485. Key : PULONG
  5486. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5487. function ZwWriteFileGather(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_SEGMENT_ELEMENT; Length: ULONG; ByteOffset: PLARGE_INTEGER;
  5488. Key: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5489. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5490. function NtWriteRequestData(
  5491. PortHandle : HANDLE;
  5492. Message : PPORT_MESSAGE;
  5493. Index : ULONG;
  5494. Buffer : PVOID;
  5495. BufferLength : ULONG;
  5496. ReturnLength : PULONG
  5497. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5498. function ZwWriteRequestData(PortHandle: HANDLE; Message: PPORT_MESSAGE; Index: ULONG; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5499. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5500. function NtWriteVirtualMemory(
  5501. ProcessHandle : HANDLE;
  5502. BaseAddress : PVOID;
  5503. Buffer : PVOID;
  5504. BufferLength : ULONG;
  5505. ReturnLength : PULONG
  5506. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5507. function ZwWriteVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PVOID; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5508. // Compatibility: NT4, W2K, WXP, 2K3
  5509. function NtYieldExecution(): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5510. function ZwYieldExecution(): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5511. // This function is very similar to MakeSelfRelativeSD() from Advapi32.dll.
  5512. // Refer to the PSDK for additional information. Usually the same flags
  5513. // apply.
  5514. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5515. function RtlAbsoluteToSelfRelativeSD(
  5516. pAbsoluteSD : PSECURITY_DESCRIPTOR;
  5517. pSelfRelativeSD : PSECURITY_DESCRIPTOR;
  5518. lpdwBufferLength : LPDWORD
  5519. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5520. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5521. procedure RtlAcquirePebLock(); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5522. // This function is very similar to AddAccessAllowedAce() from
  5523. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  5524. // same flags apply.
  5525. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5526. function RtlAddAccessAllowedAce(
  5527. pAcl : PACL;
  5528. dwAceRevision : DWORD;
  5529. AccessMask : ACCESS_MASK;
  5530. pSid : PSID
  5531. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5532. // This function is very similar to AddAccessAllowedAceEx() from
  5533. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  5534. // same flags apply.
  5535. // Compatibility: W2K, WXP, 2K3
  5536. function RtlAddAccessAllowedAceEx(
  5537. pAcl : PACL;
  5538. dwAceRevision : DWORD;
  5539. AceFlags : DWORD;
  5540. AccessMask : ACCESS_MASK;
  5541. pSid : PSID
  5542. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5543. // This function is very similar to AddAccessDeniedAce() from Advapi32.dll.
  5544. // Refer to the PSDK for additional information. Usually the same flags
  5545. // apply.
  5546. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5547. function RtlAddAccessDeniedAce(
  5548. pAcl : PACL;
  5549. dwAceRevision : DWORD;
  5550. AccessMask : ACCESS_MASK;
  5551. pSid : PSID
  5552. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5553. // This function is very similar to AddAccessDeniedAceEx() from
  5554. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  5555. // same flags apply.
  5556. // Compatibility: W2K, WXP, 2K3
  5557. function RtlAddAccessDeniedAceEx(
  5558. pAcl : PACL;
  5559. dwAceRevision : DWORD;
  5560. AceFlags : DWORD;
  5561. AccessMask : ACCESS_MASK;
  5562. pSid : PSID
  5563. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5564. // This function is very similar to AddAce() from Advapi32.dll. Refer to
  5565. // the PSDK for additional information. Usually the same flags apply.
  5566. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5567. function RtlAddAce(
  5568. pAcl : PACL;
  5569. dwAceRevision : DWORD;
  5570. dwStartingAceIndex : DWORD;
  5571. pAceList : PVOID;
  5572. nAceListLength : DWORD
  5573. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5574. // This function is very similar to AddAuditAccessAce() from Advapi32.dll.
  5575. // Refer to the PSDK for additional information. Usually the same flags
  5576. // apply.
  5577. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5578. function RtlAddAuditAccessAce(
  5579. pAcl : PACL;
  5580. dwAceRevision : DWORD;
  5581. AccessMask : ACCESS_MASK;
  5582. pSid : PSID;
  5583. bAuditSuccess : BOOLEAN;
  5584. bAuditFailure : BOOLEAN
  5585. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5586. // This function is very similar to AddAuditAccessAceEx() from
  5587. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  5588. // same flags apply.
  5589. // Compatibility: W2K, WXP, 2K3
  5590. function RtlAddAuditAccessAceEx(
  5591. pAcl : PACL;
  5592. dwAceRevision : DWORD;
  5593. AceFlags : DWORD;
  5594. AccessMask : ACCESS_MASK;
  5595. pSid : PSID;
  5596. bAuditSuccess : BOOLEAN;
  5597. bAuditFailure : BOOLEAN
  5598. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5599. // Compatibility: W2K, WXP
  5600. function RtlAddRange(
  5601. RangeList : PRTL_RANGE_LIST;
  5602. Start : ULONGLONG;
  5603. End_ : ULONGLONG;
  5604. Attributes : UCHAR;
  5605. Flags : ULONG;
  5606. UserData : PVOID;
  5607. Owner : PVOID
  5608. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5609. // Compatibility: WXP, 2K3
  5610. function RtlAddVectoredExceptionHandler(
  5611. FirstHandler : ULONG;
  5612. VectoredHandler : PVECTORED_EXCEPTION_HANDLER
  5613. ): PVOID; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5614. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5615. function RtlAdjustPrivilege(
  5616. Privilege : ULONG;
  5617. Enable : BOOLEAN;
  5618. CurrentThread : BOOLEAN;
  5619. Enabled : PBOOLEAN
  5620. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5621. // This function is very similar to AllocateAndInitializeSid() from
  5622. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  5623. // same flags apply.
  5624. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5625. function RtlAllocateAndInitializeSid(
  5626. pIdentifierAuthority : PSID_IDENTIFIER_AUTHORITY;
  5627. SubAuthorityCount : BYTE;
  5628. nSubAuthority0 : DWORD;
  5629. nSubAuthority1 : DWORD;
  5630. nSubAuthority2 : DWORD;
  5631. nSubAuthority3 : DWORD;
  5632. nSubAuthority4 : DWORD;
  5633. nSubAuthority5 : DWORD;
  5634. nSubAuthority6 : DWORD;
  5635. nSubAuthority7 : DWORD;
  5636. var pSid : PSID
  5637. ): BOOL; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5638. // The function HeapAlloc() from Kernel32.dll is an export forwarder to
  5639. // this function. This means you can refer to the documentation of
  5640. // HeapAlloc()!
  5641. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5642. function RtlAllocateHeap(
  5643. hHeap : HANDLE;
  5644. dwFlags : ULONG;
  5645. Size : ULONG
  5646. ): PVOID; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5647. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5648. function RtlAnsiCharToUnicodeChar(
  5649. AnsiChar : CHAR
  5650. ): WCHAR; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5651. // Documented in the DDK.
  5652. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5653. function RtlAnsiStringToUnicodeSize(
  5654. AnsiString : PANSI_STRING
  5655. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5656. // Documented in the DDK.
  5657. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5658. function RtlAnsiStringToUnicodeString(
  5659. DestinationString : PUNICODE_STRING;
  5660. SourceString : PANSI_STRING;
  5661. AllocateDestinationString : BOOLEAN
  5662. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5663. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5664. function RtlAppendAsciizToString(
  5665. DestinationString : PSTRING;
  5666. AppendThisString : LPCSTR
  5667. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5668. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5669. function RtlAppendStringToString(
  5670. DestinationString : PSTRING;
  5671. AppendThisString : PSTRING
  5672. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5673. // Documented in the DDK.
  5674. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5675. function RtlAppendUnicodeStringToString(
  5676. DestinationString : PUNICODE_STRING;
  5677. SourceString : PUNICODE_STRING
  5678. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5679. // Documented in the DDK.
  5680. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5681. function RtlAppendUnicodeToString(
  5682. Destination : PUNICODE_STRING;
  5683. Source : LPCWSTR
  5684. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5685. // This function is very similar to AreAllAccessesGranted() from
  5686. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  5687. // same flags apply.
  5688. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5689. function RtlAreAllAccessesGranted(
  5690. GrantedAccess : ACCESS_MASK;
  5691. WantedAccess : ACCESS_MASK
  5692. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5693. // This function is very similar to AreAnyAccessesGranted() from
  5694. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  5695. // same flags apply.
  5696. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5697. function RtlAreAnyAccessesGranted(
  5698. GrantedAccess : ACCESS_MASK;
  5699. WantedAccess : ACCESS_MASK
  5700. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5701. // Documented in the DDK.
  5702. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5703. function RtlAreBitsClear(
  5704. BitMapHeader : PRTL_BITMAP;
  5705. StartingIndex : ULONG;
  5706. Length : ULONG
  5707. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5708. // Documented in the DDK.
  5709. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5710. function RtlAreBitsSet(
  5711. BitMapHeader : PRTL_BITMAP;
  5712. StartingIndex : ULONG;
  5713. Length : ULONG
  5714. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5715. // Mentioned in the DDK.
  5716. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5717. procedure RtlAssert(
  5718. FailedAssertion : PVOID;
  5719. FileName : PVOID;
  5720. LineNumber : ULONG;
  5721. Message : PCHAR
  5722. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5723. // The function RtlCaptureContext() from Kernel32.dll is an export
  5724. // forwarder to this function. This means you can refer to the
  5725. // documentation of RtlCaptureContext()!
  5726. // Compatibility: WXP, 2K3
  5727. procedure RtlCaptureContext(
  5728. ContextRecord : PCONTEXT
  5729. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5730. // Documented in the DDK.
  5731. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5732. function RtlCharToInteger(
  5733. Str : PCSZ;
  5734. Base : ULONG;
  5735. Value : PULONG
  5736. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5737. // Somehow internally used.
  5738. // Compatibility: W2K, WXP, 2K3
  5739. procedure RtlCheckForOrphanedCriticalSections(
  5740. hThread : HANDLE
  5741. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5742. // Documented in the DDK.
  5743. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5744. function RtlCheckRegistryKey(
  5745. RelativeTo : ULONG;
  5746. Path : PWSTR
  5747. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5748. // Documented in the DDK.
  5749. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5750. procedure RtlClearAllBits(
  5751. BitMapHeader : PRTL_BITMAP
  5752. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5753. // Documented in the DDK.
  5754. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5755. procedure RtlClearBits(
  5756. BitMapHeader : PRTL_BITMAP;
  5757. StartingIndex : ULONG;
  5758. NumberToClear : ULONG
  5759. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5760. // This function is very similar to HeapCompact() from Kernel32.dll. Refer
  5761. // to the PSDK for additional information. Usually the same flags apply.
  5762. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5763. function RtlCompactHeap(
  5764. hHeap : HANDLE;
  5765. dwFlags : ULONG
  5766. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5767. // Documented in the DDK.
  5768. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5769. function RtlCompareMemory(
  5770. Source1 : PVOID;
  5771. Source2 : PVOID;
  5772. Length : SIZE_T
  5773. ): SIZE_T; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5774. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5775. function RtlCompareMemoryUlong(
  5776. Source : PVOID;
  5777. Length : ULONG;
  5778. Value : ULONG
  5779. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5780. // Documented in the DDK.
  5781. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5782. function RtlCompareString(
  5783. String1 : PSTRING;
  5784. String2 : PSTRING;
  5785. CaseInsensitive : BOOLEAN
  5786. ): LONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5787. // Documented in the DDK.
  5788. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5789. function RtlCompareUnicodeString(
  5790. String1 : PUNICODE_STRING;
  5791. String2 : PUNICODE_STRING;
  5792. CaseInsensitive : BOOLEAN
  5793. ): LONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5794. // Documented in the DDK.
  5795. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5796. function RtlConvertLongToLargeInteger(
  5797. SignedInteger : LONG
  5798. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5799. // This function is very similar to ConvertSidToStringSid() from
  5800. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  5801. // same flags apply.
  5802. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5803. function RtlConvertSidToUnicodeString(
  5804. UnicodeString : PUNICODE_STRING;
  5805. Sid : PSID;
  5806. AllocateDestinationString : BOOLEAN
  5807. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5808. // Documented in the DDK.
  5809. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5810. function RtlConvertUlongToLargeInteger(
  5811. UnsignedInteger : ULONG
  5812. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5813. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5814. procedure RtlCopyLuid(
  5815. Destination : PLUID;
  5816. Source : PLUID
  5817. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5818. // Compatibility: W2K, WXP
  5819. function RtlCopyRangeList(
  5820. CopyRangeList : PRTL_RANGE_LIST;
  5821. RangeList : PRTL_RANGE_LIST
  5822. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5823. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5824. function RtlCopySecurityDescriptor(
  5825. Source : PSECURITY_DESCRIPTOR;
  5826. var Destination : PSECURITY_DESCRIPTOR
  5827. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5828. // This function is very similar to CopySid() from Advapi32.dll. Refer to
  5829. // the PSDK for additional information. Usually the same flags apply.
  5830. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5831. function RtlCopySid(
  5832. DestinationLength : ULONG;
  5833. Destination : PSID;
  5834. Source : PSID
  5835. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5836. // Documented in the DDK.
  5837. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5838. procedure RtlCopyString(
  5839. DestinationString : PSTRING;
  5840. SourceString : PSTRING
  5841. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5842. // Documented in the DDK.
  5843. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5844. procedure RtlCopyUnicodeString(
  5845. DestinationString : PUNICODE_STRING;
  5846. SourceString : PUNICODE_STRING
  5847. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5848. // This function is very similar to InitializeAcl() from Advapi32.dll.
  5849. // Refer to the PSDK for additional information. Usually the same flags
  5850. // apply.
  5851. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5852. function RtlCreateAcl(
  5853. pAcl : PACL;
  5854. nAclLength : DWORD;
  5855. dwAclRevision : DWORD
  5856. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5857. // This function is very similar to HeapCreate() from Kernel32.dll. Refer
  5858. // to the PSDK for additional information. Usually the same flags apply.
  5859. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5860. function RtlCreateHeap(
  5861. dwOptions : ULONG;
  5862. Base : PVOID;
  5863. dwMaximumSize : SIZE_T;
  5864. dwInitialSize : SIZE_T;
  5865. UnknownOptional1 : PVOID;
  5866. UnknownOptional2 : PVOID
  5867. ): HANDLE; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5868. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5869. function RtlCreateProcessParameters(
  5870. ProcessParameters : PPRTL_USER_PROCESS_PARAMETERS;
  5871. ImageFile : PUNICODE_STRING;
  5872. DllPath : PUNICODE_STRING;
  5873. CurrentDirectory : PUNICODE_STRING;
  5874. CommandLine : PUNICODE_STRING;
  5875. CreationFlags : ULONG;
  5876. WindowTitle : PUNICODE_STRING;
  5877. Desktop : PUNICODE_STRING;
  5878. Reserved : PUNICODE_STRING;
  5879. Reserved2 : PUNICODE_STRING
  5880. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5881. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5882. function RtlCreateQueryDebugBuffer(
  5883. Size : ULONG;
  5884. EventPair : BOOLEAN
  5885. ): PDEBUG_BUFFER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5886. // Documented in the DDK.
  5887. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5888. function RtlCreateRegistryKey(
  5889. RelativeTo : ULONG;
  5890. Path : PWSTR
  5891. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5892. // Documented in the DDK.
  5893. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5894. function RtlCreateSecurityDescriptor(
  5895. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  5896. Revision : ULONG
  5897. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5898. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5899. function RtlCreateUnicodeString(
  5900. DestinationString : PUNICODE_STRING;
  5901. SourceString : PWSTR
  5902. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5903. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5904. function RtlCreateUnicodeStringFromAsciiz(
  5905. DestinationString : PUNICODE_STRING;
  5906. SourceString : PCHAR
  5907. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5908. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5909. function RtlCreateUserProcess(
  5910. ImageFileName : PUNICODE_STRING;
  5911. Attributes : ULONG;
  5912. ProcessParameters : PRTL_USER_PROCESS_PARAMETERS;
  5913. ProcessSecurityDescriptor : PSECURITY_DESCRIPTOR;
  5914. ThreadSecurityDescriptor : PSECURITY_DESCRIPTOR;
  5915. ParentProcess : HANDLE;
  5916. InheritHandles : BOOLEAN;
  5917. DebugPort : HANDLE;
  5918. ExceptionPort : HANDLE;
  5919. ProcessInfo : PRTL_PROCESS_INFORMATION
  5920. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5921. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5922. function RtlCreateUserThread(
  5923. hProcess : HANDLE;
  5924. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  5925. CreateSuspended : BOOLEAN;
  5926. StackZeroBits : ULONG;
  5927. StackReserve : ULONG;
  5928. StackCommit : ULONG;
  5929. lpStartAddress : PTHREAD_START_ROUTINE;
  5930. lpParameter : PVOID;
  5931. phThread : PHANDLE;
  5932. ClientId : PCLIENT_ID
  5933. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5934. // #->REVIEW LAST PARAMETER
  5935. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5936. function RtlCutoverTimeToSystemTime(
  5937. TargetTimeFields : PTIME_FIELDS;
  5938. Time : PLARGE_INTEGER;
  5939. CurrentTime : PLARGE_INTEGER;
  5940. bUnknown : BOOLEAN
  5941. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5942. // This function is very similar to DeleteAce() from Advapi32.dll. Refer to
  5943. // the PSDK for additional information. Usually the same flags apply.
  5944. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5945. function RtlDeleteAce(
  5946. pAcl : PACL;
  5947. dwAceIndex : DWORD
  5948. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5949. // The function DeleteCriticalSection() from Kernel32.dll is an export
  5950. // forwarder to this function. This means you can refer to the
  5951. // documentation of DeleteCriticalSection()!
  5952. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5953. procedure RtlDeleteCriticalSection(
  5954. lpCriticalSection : PRTL_CRITICAL_SECTION
  5955. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5956. // Compatibility: W2K, WXP
  5957. function RtlDeleteOwnersRanges(
  5958. RangeList : PRTL_RANGE_LIST;
  5959. Owner : PVOID
  5960. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5961. // Compatibility: W2K, WXP
  5962. function RtlDeleteRange(
  5963. RangeList : PRTL_RANGE_LIST;
  5964. Start : ULONGLONG;
  5965. End_ : ULONGLONG;
  5966. Owner : PVOID
  5967. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5968. // Documented in the DDK.
  5969. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5970. function RtlDeleteRegistryValue(
  5971. RelativeTo : ULONG;
  5972. Path : LPCWSTR;
  5973. ValueName : LPCWSTR
  5974. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5975. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5976. function RtlDeNormalizeProcessParams(
  5977. ProcessParameters : PRTL_USER_PROCESS_PARAMETERS
  5978. ): PRTL_USER_PROCESS_PARAMETERS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5979. // This function is very similar to HeapDestroy() from Kernel32.dll. Refer
  5980. // to the PSDK for additional information. Usually the same flags apply.
  5981. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5982. function RtlDestroyHeap(
  5983. HeapHandle : HANDLE
  5984. ): HANDLE; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5985. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5986. function RtlDestroyProcessParameters(
  5987. ProcessParameters : PRTL_USER_PROCESS_PARAMETERS
  5988. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5989. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5990. function RtlDestroyQueryDebugBuffer(
  5991. DebugBuffer : PDEBUG_BUFFER
  5992. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5993. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  5994. function RtlDetermineDosPathNameType_U(
  5995. wcsPathNameType : PWSTR
  5996. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  5997. // Compatibility: W2K, WXP, 2K3
  5998. function RtlDnsHostNameToComputerName(
  5999. ComputerName : PUNICODE_STRING;
  6000. DnsName : PUNICODE_STRING;
  6001. AllocateComputerNameString : BOOLEAN
  6002. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6003. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6004. function RtlDoesFileExists_U(
  6005. FileName : PWSTR
  6006. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6007. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6008. function RtlDosPathNameToNtPathName_U(
  6009. DosName : PWSTR;
  6010. var NtName : UNICODE_STRING;
  6011. DosFilePath : PPWSTR;
  6012. NtFilePath : PUNICODE_STRING
  6013. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6014. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6015. function RtlDosSearchPath_U(
  6016. SearchPath : PWSTR;
  6017. Name : PWSTR;
  6018. Ext : PWSTR;
  6019. cbBuf : ULONG;
  6020. Buffer : PWSTR;
  6021. var Shortname : PWSTR
  6022. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6023. // Compatibility: WXP, 2K3
  6024. function RtlDowncaseUnicodeChar(
  6025. Source : WCHAR
  6026. ): WCHAR; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6027. // Compatibility: NT4, W2K, WXP, 2K3
  6028. function RtlDowncaseUnicodeString(
  6029. DestinationString : PUNICODE_STRING;
  6030. SourceString : PUNICODE_STRING;
  6031. AllocateDestinationString : BOOLEAN
  6032. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6033. // #->REVIEW First parameter must be 0..3, but details have to be
  6034. // investigated!!!
  6035. // Compatibility: WXP, 2K3
  6036. function RtlDuplicateUnicodeString(
  6037. AddTerminatingZero : ULONG;
  6038. Source : PUNICODE_STRING;
  6039. Destination : PUNICODE_STRING
  6040. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6041. // Compatibility: W2K, WXP, 2K3
  6042. procedure RtlEnableEarlyCriticalSectionEventCreation(); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6043. // Documented in the DDK.
  6044. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6045. function RtlEnlargedIntegerMultiply(
  6046. Multiplicand : LONG;
  6047. Multiplier : LONG
  6048. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6049. // Documented in the DDK.
  6050. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6051. function RtlEnlargedUnsignedDivide(
  6052. Dividend : ULARGE_INTEGER;
  6053. Divisor : ULONG;
  6054. Remainder : PULONG
  6055. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6056. // Documented in the DDK.
  6057. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6058. function RtlEnlargedUnsignedMultiply(
  6059. Multiplicand : ULONG;
  6060. Multiplier : ULONG
  6061. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6062. // The function EnterCriticalSection() from Kernel32.dll is an export
  6063. // forwarder to this function. This means you can refer to the
  6064. // documentation of EnterCriticalSection()!
  6065. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6066. procedure RtlEnterCriticalSection(
  6067. lpCriticalSection : PRTL_CRITICAL_SECTION
  6068. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6069. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6070. function RtlEqualComputerName(
  6071. String1 : PUNICODE_STRING;
  6072. String2 : PUNICODE_STRING
  6073. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6074. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6075. function RtlEqualDomainName(
  6076. String1 : PUNICODE_STRING;
  6077. String2 : PUNICODE_STRING
  6078. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6079. // Documented in the DDK.
  6080. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6081. function RtlEqualLuid(
  6082. Luid1 : PLUID;
  6083. Luid2 : PLUID
  6084. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6085. // This function is very similar to EqualPrefixSid() from Advapi32.dll.
  6086. // Refer to the PSDK for additional information. Usually the same flags
  6087. // apply.
  6088. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6089. function RtlEqualPrefixSid(
  6090. pSid1 : PSID;
  6091. pSid2 : PSID
  6092. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6093. // This function is very similar to EqualSid() from Advapi32.dll. Refer to
  6094. // the PSDK for additional information. Usually the same flags apply.
  6095. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6096. function RtlEqualSid(
  6097. pSid1 : PSID;
  6098. pSid2 : PSID
  6099. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6100. // Documented in the DDK.
  6101. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6102. function RtlEqualString(
  6103. String1 : PSTRING;
  6104. String2 : PSTRING;
  6105. CaseInsensitive : BOOLEAN
  6106. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6107. // Documented in the DDK.
  6108. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6109. function RtlEqualUnicodeString(
  6110. String1 : PUNICODE_STRING;
  6111. String2 : PUNICODE_STRING;
  6112. CaseInsensitive : BOOLEAN
  6113. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6114. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6115. procedure RtlEraseUnicodeString(
  6116. Str : PUNICODE_STRING
  6117. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6118. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6119. function RtlExpandEnvironmentStrings_U(
  6120. Environment : PVOID;
  6121. Source : PUNICODE_STRING;
  6122. Destination : PUNICODE_STRING;
  6123. ReturnedLength : PULONG
  6124. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6125. // Documented in the DDK.
  6126. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6127. function RtlExtendedIntegerMultiply(
  6128. Multiplicand : LARGE_INTEGER;
  6129. Multiplier : LONG
  6130. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6131. // Documented in the DDK.
  6132. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6133. function RtlExtendedLargeIntegerDivide(
  6134. Dividend : LARGE_INTEGER;
  6135. Divisor : ULONG;
  6136. Remainder : PULONG
  6137. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6138. // Documented in the DDK.
  6139. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6140. function RtlExtendedMagicDivide(
  6141. Dividend : LARGE_INTEGER;
  6142. MagicDivisor : LARGE_INTEGER;
  6143. ShiftCount : CCHAR
  6144. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6145. // The function RtlFillMemory() from Kernel32.dll is an export forwarder to
  6146. // this function. This means you can refer to the documentation of
  6147. // RtlFillMemory()!
  6148. // Documented in the DDK.
  6149. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6150. procedure RtlFillMemory(
  6151. Destination : PVOID;
  6152. Length : SIZE_T;
  6153. Fill : UCHAR
  6154. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6155. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6156. procedure RtlFillMemoryUlong(
  6157. Destination : PVOID;
  6158. Length : ULONG;
  6159. Fill : ULONG
  6160. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6161. // Finds characters out of the set contained in CharactersToFind inside
  6162. // UnicodeString - description of flags will follow. Only the lower 3 bits
  6163. // are valid!!!
  6164. // Compatibility: WXP, 2K3
  6165. function RtlFindCharInUnicodeString(
  6166. dwFlags : ULONG;
  6167. UnicodeString : PUNICODE_STRING;
  6168. CharactersToFind : PUNICODE_STRING;
  6169. Positions : PUSHORT
  6170. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6171. // Documented in the DDK.
  6172. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6173. function RtlFindClearBits(
  6174. BitMapHeader : PRTL_BITMAP;
  6175. NumberToFind : ULONG;
  6176. HintIndex : ULONG
  6177. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6178. // Documented in the DDK.
  6179. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6180. function RtlFindClearBitsAndSet(
  6181. BitMapHeader : PRTL_BITMAP;
  6182. NumberToFind : ULONG;
  6183. HintIndex : ULONG
  6184. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6185. // Documented in the DDK.
  6186. // Compatibility: W2K, WXP, 2K3
  6187. function RtlFindLastBackwardRunClear(
  6188. BitMapHeader : PRTL_BITMAP;
  6189. FromIndex : ULONG;
  6190. StartingRunIndex : PULONG
  6191. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6192. // Documented in the DDK.
  6193. // Compatibility: W2K, WXP, 2K3
  6194. function RtlFindLeastSignificantBit(
  6195. Set_ : ULONGLONG
  6196. ): CCHAR; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6197. // Documented in the DDK.
  6198. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6199. function RtlFindLongestRunClear(
  6200. BitMapHeader : PRTL_BITMAP;
  6201. StartingIndex : PULONG
  6202. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6203. // Compatibility: W2K, WXP, 2K3
  6204. function RtlFindMostSignificantBit(
  6205. Set_ : ULONGLONG
  6206. ): CCHAR; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6207. // Documented in the DDK.
  6208. // Compatibility: W2K, WXP, 2K3
  6209. function RtlFindNextForwardRunClear(
  6210. BitMapHeader : PRTL_BITMAP;
  6211. FromIndex : ULONG;
  6212. StartingRunIndex : PULONG
  6213. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6214. // Compatibility: W2K, WXP
  6215. function RtlFindRange(
  6216. RangeList : PRTL_RANGE_LIST;
  6217. Minimum : ULONGLONG;
  6218. Maximum : ULONGLONG;
  6219. Length : ULONG;
  6220. Alignment : ULONG;
  6221. Flags : ULONG;
  6222. AttributeAvailableMask : UCHAR;
  6223. Context : PVOID;
  6224. Callback : PRTL_CONFLICT_RANGE_CALLBACK;
  6225. Start : PULONGLONG
  6226. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6227. // Documented in the DDK.
  6228. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6229. function RtlFindSetBits(
  6230. BitMapHeader : PRTL_BITMAP;
  6231. NumberToFind : ULONG;
  6232. HintIndex : ULONG
  6233. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6234. // Documented in the DDK.
  6235. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6236. function RtlFindSetBitsAndClear(
  6237. BitMapHeader : PRTL_BITMAP;
  6238. NumberToFind : ULONG;
  6239. HintIndex : ULONG
  6240. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6241. // This function is very similar to FindFirstFreeAce() from Advapi32.dll.
  6242. // Refer to the PSDK for additional information. Usually the same flags
  6243. // apply.
  6244. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6245. function RtlFirstFreeAce(
  6246. pAcl : PACL;
  6247. var pAce : PVOID
  6248. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6249. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6250. function RtlFormatCurrentUserKeyPath(
  6251. CurrentUserKeyPath : PUNICODE_STRING
  6252. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6253. // Documented in the DDK.
  6254. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6255. procedure RtlFreeAnsiString(
  6256. AnsiString : PANSI_STRING
  6257. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6258. // The function HeapFree() from Kernel32.dll is an export forwarder to this
  6259. // function. This means you can refer to the documentation of HeapFree()!
  6260. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6261. function RtlFreeHeap(
  6262. hHeap : HANDLE;
  6263. dwFlags : ULONG;
  6264. MemoryPointer : PVOID
  6265. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6266. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6267. procedure RtlFreeOemString(
  6268. OemString : POEM_STRING
  6269. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6270. // Compatibility: W2K, WXP
  6271. procedure RtlFreeRangeList(
  6272. RangeList : PRTL_RANGE_LIST
  6273. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6274. // This function is very similar to FreeSid() from Advapi32.dll. Refer to
  6275. // the PSDK for additional information. Usually the same flags apply.
  6276. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6277. function RtlFreeSid(
  6278. pSid : PSID
  6279. ): PVOID; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6280. // Documented in the DDK.
  6281. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6282. procedure RtlFreeUnicodeString(
  6283. UnicodeString : PUNICODE_STRING
  6284. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6285. // This function is very similar to GetAce() from Advapi32.dll. Refer to
  6286. // the PSDK for additional information. Usually the same flags apply.
  6287. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6288. function RtlGetAce(
  6289. pAcl : PACL;
  6290. dwAceIndex : DWORD;
  6291. var pAce : PVOID
  6292. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6293. // Mentioned in the DDK.
  6294. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6295. procedure RtlGetCallersAddress(
  6296. CallersAddress : PPVOID;
  6297. CallersCaller : PPVOID
  6298. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6299. // This function is very similar to GetSecurityDescriptorControl() from
  6300. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  6301. // same flags apply.
  6302. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6303. function RtlGetControlSecurityDescriptor(
  6304. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  6305. var Control : SECURITY_DESCRIPTOR_CONTROL;
  6306. var dwRevision : DWORD
  6307. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6308. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6309. function RtlGetCurrentDirectory_U(
  6310. MaximumLength : ULONG;
  6311. Buffer : PWSTR
  6312. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6313. // Compatibility: WXP, 2K3
  6314. function RtlGetCurrentPeb(): PPEB; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6315. // This function is very similar to GetSecurityDescriptorDacl() from
  6316. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  6317. // same flags apply.
  6318. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6319. function RtlGetDaclSecurityDescriptor(
  6320. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  6321. var bDaclPresent : BOOLEAN;
  6322. var Dacl : PACL;
  6323. var bDaclDefaulted : BOOLEAN
  6324. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6325. // Compatibility: W2K, WXP
  6326. function RtlGetFirstRange(
  6327. RangeList : PRTL_RANGE_LIST;
  6328. Iterator : PRTL_RANGE_LIST_ITERATOR;
  6329. var Range : PRTL_RANGE
  6330. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6331. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6332. function RtlGetFullPathName_U(
  6333. DosName : PWSTR;
  6334. Size : ULONG;
  6335. Buf : PWSTR;
  6336. var Shortname : PWSTR
  6337. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6338. // This function is very similar to GetSecurityDescriptorGroup() from
  6339. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  6340. // same flags apply.
  6341. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6342. function RtlGetGroupSecurityDescriptor(
  6343. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  6344. var pGroup : PSID;
  6345. var bGroupDefaulted : BOOLEAN
  6346. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6347. // Compatibility: WXP, 2K3
  6348. function RtlGetLastNtStatus(): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6349. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6350. function RtlGetLongestNtPathLength(): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6351. // Compatibility: W2K, WXP
  6352. function RtlGetNextRange(
  6353. Iterator : PRTL_RANGE_LIST_ITERATOR;
  6354. var Range : PRTL_RANGE;
  6355. MoveForwards : BOOLEAN
  6356. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6357. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6358. function RtlGetNtGlobalFlags(): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6359. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6360. function RtlGetNtProductType(
  6361. var ProductType : ULONG
  6362. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6363. // #->REVIEW LAST PARAMETER
  6364. // Compatibility: WXP, 2K3
  6365. procedure RtlGetNtVersionNumbers(
  6366. var dwMajorVersion : ULONG;
  6367. var dwMinorVersion : ULONG;
  6368. UnknownCanBeNull : PDWORD
  6369. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6370. // This function is very similar to GetSecurityDescriptorOwner() from
  6371. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  6372. // same flags apply.
  6373. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6374. function RtlGetOwnerSecurityDescriptor(
  6375. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  6376. var pOwner : PSID;
  6377. var OwnerDefaulted : BOOLEAN
  6378. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6379. // This function is very similar to GetProcessHeaps() from Kernel32.dll.
  6380. // Refer to the PSDK for additional information. Usually the same flags
  6381. // apply.
  6382. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6383. function RtlGetProcessHeaps(
  6384. ArraySize : ULONG;
  6385. HeapArray : PHANDLE
  6386. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6387. // This function is very similar to GetSecurityDescriptorSacl() from
  6388. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  6389. // same flags apply.
  6390. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6391. function RtlGetSaclSecurityDescriptor(
  6392. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  6393. var bSaclPresent : BOOLEAN;
  6394. var Sacl : PACL;
  6395. var bSaclDefaulted : BOOLEAN
  6396. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6397. // This function is very similar to GetVersionEx() from Kernel32.dll. Refer
  6398. // to the PSDK for additional information. Usually the same flags apply.
  6399. // Documented in the DDK.
  6400. // Compatibility: W2K, WXP, 2K3
  6401. function RtlGetVersion(
  6402. lpVersionInformation : PRTL_OSVERSIONINFOW
  6403. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6404. // Documented in the DDK.
  6405. // Compatibility: W2K, WXP, 2K3
  6406. function RtlGUIDFromString(
  6407. GuidString : PUNICODE_STRING;
  6408. Guid : LPGUID
  6409. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6410. // This function is very similar to GetSidIdentifierAuthority() from
  6411. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  6412. // same flags apply.
  6413. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6414. function RtlIdentifierAuthoritySid(
  6415. Sid : PSID
  6416. ): PSID_IDENTIFIER_AUTHORITY; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6417. // This function is very similar to ImageDirectoryEntryToData() from
  6418. // Dbghelp.dll. Refer to the PSDK for additional information. Usually the
  6419. // same flags apply.
  6420. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6421. function RtlImageDirectoryEntryToData(
  6422. ImageBase : HMODULE;
  6423. MappedAsImage : BOOLEAN;
  6424. DirectoryEntry : USHORT;
  6425. Size : PULONG
  6426. ): PVOID; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6427. // This function is very similar to ImageNtHeader() from Dbghelp.dll. Refer
  6428. // to the PSDK for additional information. Usually the same flags apply.
  6429. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6430. function RtlImageNtHeader(
  6431. ImageBase : HMODULE
  6432. ): PIMAGE_NT_HEADERS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6433. // This function is very similar to ImageNtHeader() from Dbghelp.dll. Refer
  6434. // to the PSDK for additional information. Usually the same flags apply.
  6435. // With dwFlags equal 1 it shows the same behavior as RtlImageNtHeader()
  6436. // Compatibility: 2K3
  6437. function RtlImageNtHeaderEx(
  6438. dwFlags : DWORD;
  6439. ImageBase : HMODULE
  6440. ): PIMAGE_NT_HEADERS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6441. // This function is very similar to ImageRvaToSection() from Dbghelp.dll.
  6442. // Refer to the PSDK for additional information. Usually the same flags
  6443. // apply.
  6444. // Compatibility: NT4, W2K, WXP, 2K3
  6445. function RtlImageRvaToSection(
  6446. NtHeaders : PIMAGE_NT_HEADERS;
  6447. ImageBase : HMODULE;
  6448. Rva : ULONG
  6449. ): PIMAGE_SECTION_HEADER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6450. // This function is very similar to ImageRvaToVa() from Dbghelp.dll. Refer
  6451. // to the PSDK for additional information. Usually the same flags apply.
  6452. // Compatibility: NT4, W2K, WXP, 2K3
  6453. function RtlImageRvaToVa(
  6454. NtHeaders : PIMAGE_NT_HEADERS;
  6455. ImageBase : HMODULE;
  6456. Rva : ULONG;
  6457. var LastRvaSection : PIMAGE_SECTION_HEADER
  6458. ): PVOID; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6459. // This function is very similar to ImpersonateSelf() from Advapi32.dll.
  6460. // Refer to the PSDK for additional information. Usually the same flags
  6461. // apply.
  6462. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6463. function RtlImpersonateSelf(
  6464. ImpersonationLevel : SECURITY_IMPERSONATION_LEVEL
  6465. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6466. // Documented in the DDK.
  6467. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6468. procedure RtlInitAnsiString(
  6469. DestinationString : PANSI_STRING;
  6470. SourceString : PCSZ
  6471. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6472. // Compatibility: 2K3
  6473. function RtlInitAnsiStringEx(
  6474. DestinationString : PANSI_STRING;
  6475. SourceString : PCSZ
  6476. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6477. // Documented in the DDK.
  6478. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6479. procedure RtlInitializeBitMap(
  6480. BitMapHeader : PRTL_BITMAP;
  6481. BitMapBuffer : PULONG;
  6482. SizeOfBitMap : ULONG
  6483. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6484. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6485. function RtlInitializeCriticalSection(
  6486. lpCriticalSection : PRTL_CRITICAL_SECTION
  6487. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6488. // Compatibility: NT4, W2K, WXP, 2K3
  6489. function RtlInitializeCriticalSectionAndSpinCount(
  6490. lpCriticalSection : PRTL_CRITICAL_SECTION;
  6491. dwSpinCount : ULONG
  6492. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6493. // Compatibility: W2K, WXP
  6494. procedure RtlInitializeRangeList(
  6495. RangeList : PRTL_RANGE_LIST
  6496. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6497. // This function is very similar to InitializeSid() from Advapi32.dll.
  6498. // Refer to the PSDK for additional information. Usually the same flags
  6499. // apply.
  6500. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6501. function RtlInitializeSid(
  6502. pSid : PSID;
  6503. pIdentifierAuthority : PSID_IDENTIFIER_AUTHORITY;
  6504. nSubAuthorityCount : UCHAR
  6505. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6506. // Compatibility: WXP, 2K3
  6507. procedure RtlInitializeSListHead(
  6508. ListHead : PSLIST_HEADER
  6509. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6510. // Documented in the DDK.
  6511. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6512. procedure RtlInitString(
  6513. DestinationString : PSTRING;
  6514. SourceString : PCSZ
  6515. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6516. // Documented in the DDK.
  6517. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6518. procedure RtlInitUnicodeString(
  6519. DestinationString : PUNICODE_STRING;
  6520. SourceString : LPCWSTR
  6521. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6522. // Compatibility: WXP, 2K3
  6523. function RtlInitUnicodeStringEx(
  6524. DestinationString : PUNICODE_STRING;
  6525. SourceString : LPCWSTR
  6526. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6527. // Documented in the DDK.
  6528. // Compatibility: W2K, WXP, 2K3
  6529. function RtlInt64ToUnicodeString(
  6530. Value : ULONGLONG;
  6531. Base : ULONG;
  6532. Str : PUNICODE_STRING
  6533. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6534. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6535. function RtlIntegerToChar(
  6536. Value : ULONG;
  6537. Base : ULONG;
  6538. Length : ULONG;
  6539. Str : PCHAR
  6540. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6541. // Documented in the DDK.
  6542. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6543. function RtlIntegerToUnicodeString(
  6544. Value : ULONG;
  6545. Base : ULONG;
  6546. Str : PUNICODE_STRING
  6547. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6548. // Compatibility: WXP, 2K3
  6549. function RtlInterlockedFlushSList(
  6550. ListHead : PSLIST_HEADER
  6551. ): PSLIST_ENTRY; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6552. // Compatibility: WXP, 2K3
  6553. function RtlInterlockedPopEntrySList(
  6554. ListHead : PSLIST_HEADER
  6555. ): PSLIST_ENTRY; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6556. // Compatibility: WXP, 2K3
  6557. function RtlInterlockedPushEntrySList(
  6558. ListHead : PSLIST_HEADER;
  6559. ListEntry : PSLIST_ENTRY
  6560. ): PSLIST_ENTRY; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6561. // Compatibility: W2K, WXP
  6562. function RtlInvertRangeList(
  6563. InvertedRangeList : PRTL_RANGE_LIST;
  6564. RangeList : PRTL_RANGE_LIST
  6565. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6566. // Compatibility: WXP, 2K3
  6567. function RtlIpv4AddressToStringA(
  6568. IP : PULONG;
  6569. Buffer : LPSTR
  6570. ): LPSTR; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6571. // Compatibility: WXP, 2K3
  6572. function RtlIpv4AddressToStringW(
  6573. IP : PULONG;
  6574. Buffer : LPWSTR
  6575. ): LPWSTR; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6576. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6577. function RtlIsDosDeviceName_U(
  6578. TestString : LPCWSTR
  6579. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6580. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6581. function RtlIsNameLegalDOS8Dot3(
  6582. Name : PUNICODE_STRING;
  6583. OemName : POEM_STRING;
  6584. NameContainsSpaces : PBOOLEAN
  6585. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6586. // Compatibility: W2K, WXP
  6587. function RtlIsRangeAvailable(
  6588. RangeList : PRTL_RANGE_LIST;
  6589. Start : ULONGLONG;
  6590. End_ : ULONGLONG;
  6591. Flags : ULONG;
  6592. AttributeAvailableMask : UCHAR;
  6593. Context : PVOID;
  6594. Callback : PRTL_CONFLICT_RANGE_CALLBACK;
  6595. Available : PBOOLEAN
  6596. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6597. // This function is very similar to IsTextUnicode() from Advapi32.dll.
  6598. // Refer to the PSDK for additional information. Usually the same flags
  6599. // apply.
  6600. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6601. function RtlIsTextUnicode(
  6602. lpBuffer : PVOID;
  6603. cb : Integer;
  6604. lpi : LPINT
  6605. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6606. // Documented in the DDK.
  6607. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6608. function RtlLargeIntegerAdd(
  6609. Addend1 : LARGE_INTEGER;
  6610. Addend2 : LARGE_INTEGER
  6611. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6612. // Documented in the DDK.
  6613. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6614. function RtlLargeIntegerArithmeticShift(
  6615. LargeInteger : LARGE_INTEGER;
  6616. ShiftCount : CCHAR
  6617. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6618. // Documented in the DDK.
  6619. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6620. function RtlLargeIntegerDivide(
  6621. Dividend : LARGE_INTEGER;
  6622. Divisor : LARGE_INTEGER;
  6623. Remainder : PLARGE_INTEGER
  6624. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6625. // Documented in the DDK.
  6626. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6627. function RtlLargeIntegerNegate(
  6628. NegateThis : LARGE_INTEGER
  6629. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6630. // Documented in the DDK.
  6631. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6632. function RtlLargeIntegerShiftLeft(
  6633. LargeInteger : LARGE_INTEGER;
  6634. ShiftCount : CCHAR
  6635. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6636. // Documented in the DDK.
  6637. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6638. function RtlLargeIntegerShiftRight(
  6639. LargeInteger : LARGE_INTEGER;
  6640. ShiftCount : CCHAR
  6641. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6642. // Documented in the DDK.
  6643. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6644. function RtlLargeIntegerSubtract(
  6645. Number : LARGE_INTEGER;
  6646. Subtrahend : LARGE_INTEGER
  6647. ): LARGE_INTEGER; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6648. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6649. function RtlLargeIntegerToChar(
  6650. Value : PLARGE_INTEGER;
  6651. Base : ULONG;
  6652. BufferLength : ULONG;
  6653. Buffer : PCHAR
  6654. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6655. // The function LeaveCriticalSection() from Kernel32.dll is an export
  6656. // forwarder to this function. This means you can refer to the
  6657. // documentation of LeaveCriticalSection()!
  6658. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6659. procedure RtlLeaveCriticalSection(
  6660. lpCriticalSection : PRTL_CRITICAL_SECTION
  6661. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6662. // This function is very similar to GetSidLengthRequired() from
  6663. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  6664. // same flags apply.
  6665. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6666. function RtlLengthRequiredSid(
  6667. nSubAuthorityCount : ULONG
  6668. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6669. // This function is very similar to GetSecurityDescriptorLength() from
  6670. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  6671. // same flags apply.
  6672. // Documented in the DDK.
  6673. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6674. function RtlLengthSecurityDescriptor(
  6675. SecurityDescriptor : PSECURITY_DESCRIPTOR
  6676. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6677. // This function is very similar to GetLengthSid() from Advapi32.dll. Refer
  6678. // to the PSDK for additional information. Usually the same flags apply.
  6679. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6680. function RtlLengthSid(
  6681. pSid : PSID
  6682. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6683. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6684. function RtlLocalTimeToSystemTime(
  6685. LocalTime : PLARGE_INTEGER;
  6686. SystemTime : PLARGE_INTEGER
  6687. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6688. // This function is very similar to HeapLock() from Kernel32.dll. Refer to
  6689. // the PSDK for additional information. Usually the same flags apply.
  6690. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6691. function RtlLockHeap(
  6692. hHeap : PVOID
  6693. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6694. // This function is very similar to MakeSelfRelativeSD() from Advapi32.dll.
  6695. // Refer to the PSDK for additional information. Usually the same flags
  6696. // apply.
  6697. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6698. function RtlMakeSelfRelativeSD(
  6699. pAbsoluteSD : PSECURITY_DESCRIPTOR;
  6700. pSelfRelativeSD : PSECURITY_DESCRIPTOR;
  6701. lpdwBufferLength : LPDWORD
  6702. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6703. // This function is very similar to MapGenericMask() from Advapi32.dll.
  6704. // Refer to the PSDK for additional information. Usually the same flags
  6705. // apply.
  6706. // Documented in the DDK.
  6707. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6708. procedure RtlMapGenericMask(
  6709. AccessMask : PACCESS_MASK;
  6710. GenericMapping : PGENERIC_MAPPING
  6711. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6712. // Maps an error from the security subsystem to a native error status.
  6713. // Compatibility: WXP, 2K3
  6714. function RtlMapSecurityErrorToNtStatus(
  6715. SecurityError : DWORD
  6716. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6717. // Compatibility: W2K, WXP
  6718. function RtlMergeRangeLists(
  6719. MergedRangeList : PRTL_RANGE_LIST;
  6720. RangeList1 : PRTL_RANGE_LIST;
  6721. RangeList2 : PRTL_RANGE_LIST;
  6722. Flags : ULONG
  6723. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6724. // Documented in the DDK.
  6725. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6726. procedure RtlMoveMemory(
  6727. Destination : PVOID;
  6728. Source : PVOID;
  6729. Length : SIZE_T
  6730. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6731. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6732. function RtlNormalizeProcessParams(
  6733. ProcessParameters : PRTL_USER_PROCESS_PARAMETERS
  6734. ): PRTL_USER_PROCESS_PARAMETERS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6735. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6736. function RtlNtStatusToDosError(
  6737. Status : NTSTATUS
  6738. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6739. // Compatibility: WXP, 2K3
  6740. function RtlNtStatusToDosErrorNoTeb(
  6741. Status : NTSTATUS
  6742. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6743. // Documented in the DDK.
  6744. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6745. function RtlNumberOfClearBits(
  6746. BitMapHeader : PRTL_BITMAP
  6747. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6748. // Documented in the DDK.
  6749. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6750. function RtlNumberOfSetBits(
  6751. BitMapHeader : PRTL_BITMAP
  6752. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6753. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6754. function RtlOemStringToUnicodeSize(
  6755. AnsiString : POEM_STRING
  6756. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6757. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6758. function RtlOemStringToUnicodeString(
  6759. DestinationString : PUNICODE_STRING;
  6760. SourceString : POEM_STRING;
  6761. AllocateDestinationString : BOOLEAN
  6762. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6763. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6764. function RtlOemToUnicodeN(
  6765. UnicodeString : PWSTR;
  6766. UnicodeSize : ULONG;
  6767. var ResultSize : ULONG;
  6768. OemString : PCHAR;
  6769. OemSize : ULONG
  6770. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6771. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6772. function RtlOpenCurrentUser(
  6773. samDesired : ACCESS_MASK;
  6774. phkResult : PHKEY
  6775. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6776. // Either raises an exception of type STATUS_RESOURCE_NOT_OWNED or returns
  6777. // a BOOLEAN value.
  6778. // Should perhaps not be called explicitly.
  6779. // Compatibility: WXP, 2K3
  6780. function RtlpNotOwnerCriticalSection(
  6781. lpCriticalSection : PRTL_CRITICAL_SECTION
  6782. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6783. // This is a private wrapper for NtCreateKey().
  6784. // However, 2 of the parameters are not being used!
  6785. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6786. function RtlpNtCreateKey(
  6787. KeyHandle : PHANDLE;
  6788. DesiredAccess : ACCESS_MASK;
  6789. ObjectAttributes : POBJECT_ATTRIBUTES;
  6790. Unused1 : ULONG;
  6791. Unused2 : ULONG;
  6792. Disposition : PULONG
  6793. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6794. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6795. function RtlpNtEnumerateSubKey(
  6796. KeyHandle : HANDLE;
  6797. SubKeyName : PUNICODE_STRING;
  6798. Index : ULONG;
  6799. Unused1 : ULONG
  6800. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6801. // This function is very similar to NtCreateKey() from Ntdll.dll. Usually
  6802. // the same or similar flags apply.
  6803. // This is exactly the same as NtDeleteKey() by now!
  6804. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6805. function RtlpNtMakeTemporaryKey(
  6806. KeyHandle : HANDLE
  6807. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6808. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6809. function RtlpNtOpenKey(
  6810. KeyHandle : HANDLE;
  6811. DesiredAccess : ACCESS_MASK;
  6812. ObjectAttributes : POBJECT_ATTRIBUTES;
  6813. Unused : ULONG
  6814. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6815. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6816. function RtlpNtQueryValueKey(
  6817. KeyHandle : HANDLE;
  6818. Type_ : PULONG;
  6819. Data : PVOID;
  6820. DataSize : PULONG;
  6821. Unused : ULONG
  6822. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6823. // This is a private wrapper for NtSetValueKey().
  6824. // The parameters of TitleIndex and ValueName are not being passed, that is
  6825. // empty.
  6826. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6827. function RtlpNtSetValueKey(
  6828. KeyHandle : HANDLE;
  6829. Type_ : ULONG;
  6830. Data : PVOID;
  6831. DataSize : ULONG
  6832. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6833. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6834. function RtlPrefixString(
  6835. String1 : PANSI_STRING;
  6836. String2 : PANSI_STRING;
  6837. CaseInsensitive : BOOLEAN
  6838. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6839. // Documented in the DDK.
  6840. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6841. function RtlPrefixUnicodeString(
  6842. String1 : PUNICODE_STRING;
  6843. String2 : PUNICODE_STRING;
  6844. CaseInsensitive : BOOLEAN
  6845. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6846. // Compatibility: WXP, 2K3
  6847. function RtlQueryDepthSList(
  6848. ListHead : PSLIST_HEADER
  6849. ): USHORT; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6850. // VarValue has to have a buffer assigned big enough to hold the value.
  6851. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6852. function RtlQueryEnvironmentVariable_U(
  6853. Environment : PVOID;
  6854. VarName : PUNICODE_STRING;
  6855. VarValue : PUNICODE_STRING
  6856. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6857. // This function is very similar to GetAclInformation() from Advapi32.dll.
  6858. // Refer to the PSDK for additional information. Usually the same flags
  6859. // apply.
  6860. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6861. function RtlQueryInformationAcl(
  6862. pAcl : PACL;
  6863. pAclInformation : PVOID;
  6864. nAclInformationLength : DWORD;
  6865. dwAclInformationClass : ACL_INFORMATION_CLASS
  6866. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6867. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6868. function RtlQueryProcessDebugInformation(
  6869. ProcessId : ULONG;
  6870. DebugInfoClassMask : ULONG;
  6871. DebugBuffer : PDEBUG_BUFFER
  6872. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6873. // Documented in the DDK.
  6874. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6875. function RtlQueryRegistryValues(
  6876. RelativeTo : ULONG;
  6877. Path : LPCWSTR;
  6878. QueryTable : PRTL_QUERY_REGISTRY_TABLE;
  6879. Context : PVOID;
  6880. Environment : PVOID
  6881. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6882. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6883. procedure RtlRaiseStatus(
  6884. Status : NTSTATUS
  6885. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6886. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6887. function RtlRandom(
  6888. Seed : PULONG
  6889. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6890. // Compatibility: WXP, 2K3
  6891. function RtlRandomEx(
  6892. Seed : PULONG
  6893. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6894. // The function HeapReAlloc() from Kernel32.dll is an export forwarder to
  6895. // this function. This means you can refer to the documentation of
  6896. // HeapReAlloc()!
  6897. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6898. function RtlReAllocateHeap(
  6899. hHeap : HANDLE;
  6900. dwFlags : ULONG;
  6901. lpMem : PVOID;
  6902. dwBytes : SIZE_T
  6903. ): PVOID; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6904. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6905. procedure RtlReleasePebLock(); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6906. // Compatibility: WXP, 2K3
  6907. function RtlRemoveVectoredExceptionHandler(
  6908. VectoredHandlerHandle : PVOID
  6909. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6910. // Compatibility: WXP, 2K3
  6911. procedure RtlRestoreLastWin32Error(
  6912. dwErrCode : DWORD
  6913. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6914. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6915. procedure RtlRunDecodeUnicodeString(
  6916. CodeSeed : UCHAR;
  6917. StringToDecode : PUNICODE_STRING
  6918. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6919. // If CodeSeed == 0 it will be assigned a value by the function. Use this
  6920. // very value in a call to RtlRunDecodeUnicodeString()! To decode the
  6921. // string afterwards.
  6922. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6923. procedure RtlRunEncodeUnicodeString(
  6924. var CodeSeed : UCHAR;
  6925. StringToEncode : PUNICODE_STRING
  6926. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6927. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6928. procedure RtlSecondsSince1970ToTime(
  6929. SecondsSince1970 : ULONG;
  6930. Time : PLARGE_INTEGER
  6931. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6932. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6933. procedure RtlSecondsSince1980ToTime(
  6934. SecondsSince1980 : ULONG;
  6935. Time : PLARGE_INTEGER
  6936. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6937. // This function is very similar to MakeAbsoluteSD() from Advapi32.dll.
  6938. // Refer to the PSDK for additional information. Usually the same flags
  6939. // apply.
  6940. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6941. function RtlSelfRelativeToAbsoluteSD(
  6942. pSelfRelativeSD : PSECURITY_DESCRIPTOR;
  6943. pAbsoluteSD : PSECURITY_DESCRIPTOR;
  6944. lpdwAbsoluteSDSize : LPDWORD;
  6945. pDacl : PACL;
  6946. lpdwDaclSize : LPDWORD;
  6947. pSacl : PACL;
  6948. lpdwSaclSize : LPDWORD;
  6949. pOwner : PSID;
  6950. lpdwOwnerSize : LPDWORD;
  6951. pPrimaryGroup : PSID;
  6952. lpdwPrimaryGroupSize : LPDWORD
  6953. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6954. // Documented in the DDK.
  6955. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6956. procedure RtlSetAllBits(
  6957. BitMapHeader : PRTL_BITMAP
  6958. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6959. // Documented in the DDK.
  6960. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6961. procedure RtlSetBits(
  6962. BitMapHeader : PRTL_BITMAP;
  6963. StartingIndex : ULONG;
  6964. NumberToSet : ULONG
  6965. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6966. // This function is very similar to SetSecurityDescriptorControl() from
  6967. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  6968. // same flags apply.
  6969. // Compatibility: W2K, WXP, 2K3
  6970. function RtlSetControlSecurityDescriptor(
  6971. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  6972. ControlBitsOfInterest : SECURITY_DESCRIPTOR_CONTROL;
  6973. ControlBitsToSet : SECURITY_DESCRIPTOR_CONTROL
  6974. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6975. // The function SetCriticalSectionSpinCount() from Kernel32.dll is an
  6976. // export forwarder to this function. This means you can refer to the
  6977. // documentation of SetCriticalSectionSpinCount()!
  6978. // Compatibility: NT4, W2K, WXP, 2K3
  6979. function RtlSetCriticalSectionSpinCount(
  6980. lpCriticalSection : PRTL_CRITICAL_SECTION;
  6981. dwSpinCount : ULONG
  6982. ): DWORD; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6983. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6984. function RtlSetCurrentDirectory_U(
  6985. NewCurrentDirectory : PUNICODE_STRING
  6986. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6987. // Documented in the DDK.
  6988. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6989. function RtlSetDaclSecurityDescriptor(
  6990. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  6991. DaclPresent : BOOLEAN;
  6992. Dacl : PACL;
  6993. DaclDefaulted : BOOLEAN
  6994. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  6995. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  6996. function RtlSetGroupSecurityDescriptor(
  6997. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  6998. pGroup : PSID;
  6999. bGroupDefaulted : BOOLEAN
  7000. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7001. // This function is very similar to SetAclInformation() from Advapi32.dll.
  7002. // Refer to the PSDK for additional information. Usually the same flags
  7003. // apply.
  7004. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7005. function RtlSetInformationAcl(
  7006. pAcl : PACL;
  7007. pAclInformation : PVOID;
  7008. nInformationLength : DWORD;
  7009. dwAclInformationClass : ACL_INFORMATION_CLASS
  7010. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7011. // Compatibility: WXP, 2K3
  7012. function RtlSetLastWin32ErrorAndNtStatusFromNtStatus(
  7013. Status : NTSTATUS
  7014. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7015. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7016. function RtlSetOwnerSecurityDescriptor(
  7017. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  7018. pOwner : PSID;
  7019. bOwnerDefaulted : BOOLEAN
  7020. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7021. // Compatibility: WXP, 2K3
  7022. function RtlSetProcessIsCritical(
  7023. bIsCritical : BOOLEAN;
  7024. pbOldIsCriticalValue : PBOOLEAN;
  7025. bUnknownCanBeFalse : BOOLEAN
  7026. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7027. // This function is very similar to SetSecurityDescriptorSacl() from
  7028. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  7029. // same flags apply.
  7030. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7031. function RtlSetSaclSecurityDescriptor(
  7032. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  7033. bSaclPresent : BOOLEAN;
  7034. pSacl : PACL;
  7035. SaclDefaulted : BOOLEAN
  7036. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7037. // Compatibility: WXP, 2K3
  7038. function RtlSetThreadIsCritical(
  7039. bIsCritical : BOOLEAN;
  7040. pbOldIsCriticalValue : PBOOLEAN;
  7041. bUnknownCanBeFalse : BOOLEAN
  7042. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7043. // The function HeapSize() from Kernel32.dll is an export forwarder to this
  7044. // function. This means you can refer to the documentation of HeapSize()!
  7045. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7046. function RtlSizeHeap(
  7047. hHeap : HANDLE;
  7048. dwFlags : ULONG;
  7049. lpMem : PVOID
  7050. ): SIZE_T; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7051. // Documented in the DDK.
  7052. // Compatibility: W2K, WXP, 2K3
  7053. function RtlStringFromGUID(
  7054. Guid : REFGUID;
  7055. GuidString : PUNICODE_STRING
  7056. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7057. // This function is very similar to GetSidSubAuthorityCount() from
  7058. // Advapi32.dll. Refer to the PSDK for additional information. Usually the
  7059. // same flags apply.
  7060. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7061. function RtlSubAuthorityCountSid(
  7062. pSid : PSID
  7063. ): PUCHAR; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7064. // This function is very similar to GetSidSubAuthority() from Advapi32.dll.
  7065. // Refer to the PSDK for additional information. Usually the same flags
  7066. // apply.
  7067. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7068. function RtlSubAuthoritySid(
  7069. pSid : PSID;
  7070. nSubAuthority : DWORD
  7071. ): PDWORD; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7072. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7073. function RtlSystemTimeToLocalTime(
  7074. SystemTime : PLARGE_INTEGER;
  7075. LocalTime : PLARGE_INTEGER
  7076. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7077. // Documented in the DDK.
  7078. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7079. function RtlTimeFieldsToTime(
  7080. TimeFields : PTIME_FIELDS;
  7081. Time : PLARGE_INTEGER
  7082. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7083. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7084. procedure RtlTimeToElapsedTimeFields(
  7085. Time : PLARGE_INTEGER;
  7086. TimeFields : PTIME_FIELDS
  7087. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7088. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7089. function RtlTimeToSecondsSince1970(
  7090. Time : PLARGE_INTEGER;
  7091. ElapsedSeconds : PULONG
  7092. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7093. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7094. function RtlTimeToSecondsSince1980(
  7095. Time : PLARGE_INTEGER;
  7096. ElapsedSeconds : PULONG
  7097. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7098. // Documented in the DDK.
  7099. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7100. procedure RtlTimeToTimeFields(
  7101. Time : PLARGE_INTEGER;
  7102. TimeFields : PTIME_FIELDS
  7103. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7104. // The function TryEnterCriticalSection() from Kernel32.dll is an export
  7105. // forwarder to this function. This means you can refer to the
  7106. // documentation of TryEnterCriticalSection()!
  7107. // Compatibility: NT4, W2K, WXP, 2K3
  7108. function RtlTryEnterCriticalSection(
  7109. lpCriticalSection : PRTL_CRITICAL_SECTION
  7110. ): BOOL; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7111. // Documented in the DDK.
  7112. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7113. function RtlUnicodeStringToAnsiSize(
  7114. UnicodeString : PUNICODE_STRING
  7115. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7116. // Documented in the DDK.
  7117. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7118. function RtlUnicodeStringToAnsiString(
  7119. DestinationString : PANSI_STRING;
  7120. SourceString : PUNICODE_STRING;
  7121. AllocateDestinationString : BOOLEAN
  7122. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7123. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7124. function RtlUnicodeStringToCountedOemString(
  7125. DestinationString : POEM_STRING;
  7126. SourceString : PUNICODE_STRING;
  7127. AllocateDestinationString : BOOLEAN
  7128. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7129. // Documented in the DDK.
  7130. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7131. function RtlUnicodeStringToInteger(
  7132. Str : PUNICODE_STRING;
  7133. Base : ULONG;
  7134. Value : PULONG
  7135. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7136. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7137. function RtlUnicodeStringToOemSize(
  7138. UnicodeString : PUNICODE_STRING
  7139. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7140. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7141. function RtlUnicodeStringToOemString(
  7142. DestinationString : POEM_STRING;
  7143. SourceString : PCUNICODE_STRING;
  7144. AllocateDestinationString : BOOLEAN
  7145. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7146. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7147. function RtlUnicodeToMultiByteSize(
  7148. BytesInMultiByteString : PULONG;
  7149. UnicodeString : PWSTR;
  7150. BytesInUnicodeString : ULONG
  7151. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7152. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7153. function RtlUniform(
  7154. Seed : PULONG
  7155. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7156. // The function RtlUnwind() from Kernel32.dll is an export forwarder to
  7157. // this function. This means you can refer to the documentation of
  7158. // RtlUnwind()!
  7159. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7160. procedure RtlUnwind(
  7161. TargetFrame : PVOID;
  7162. TargetIp : PVOID;
  7163. ExceptionRecord : PEXCEPTION_RECORD;
  7164. ReturnValue : PVOID
  7165. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7166. // Documented in the DDK.
  7167. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7168. function RtlUpcaseUnicodeChar(
  7169. SourceCharacter : WCHAR
  7170. ): WCHAR; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7171. // Documented in the DDK.
  7172. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7173. function RtlUpcaseUnicodeString(
  7174. DestinationString : PUNICODE_STRING;
  7175. SourceString : PUNICODE_STRING;
  7176. AllocateDestinationString : BOOLEAN
  7177. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7178. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7179. function RtlUpcaseUnicodeStringToAnsiString(
  7180. DestinationString : PSTRING;
  7181. SourceString : PUNICODE_STRING;
  7182. AllocateDestinationString : BOOLEAN
  7183. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7184. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7185. function RtlUpcaseUnicodeStringToCountedOemString(
  7186. DestinationString : PSTRING;
  7187. SourceString : PUNICODE_STRING;
  7188. AllocateDestinationString : BOOLEAN
  7189. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7190. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7191. function RtlUpcaseUnicodeStringToOemString(
  7192. DestinationString : PSTRING;
  7193. SourceString : PUNICODE_STRING;
  7194. AllocateDestinationString : BOOLEAN
  7195. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7196. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7197. function RtlUpcaseUnicodeToMultiByteN(
  7198. MbString : PCHAR;
  7199. MbSize : ULONG;
  7200. var ResultSize : ULONG;
  7201. UnicodeString : PWSTR;
  7202. UnicodeSize : ULONG
  7203. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7204. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7205. function RtlUpcaseUnicodeToOemN(
  7206. OemString : PCHAR;
  7207. OemSize : ULONG;
  7208. var ResultSize : ULONG;
  7209. UnicodeString : PWSTR;
  7210. UnicodeSize : ULONG
  7211. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7212. // Documented in the DDK.
  7213. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7214. function RtlUpperChar(
  7215. Character : CHAR
  7216. ): CHAR; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7217. // Documented in the DDK.
  7218. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7219. procedure RtlUpperString(
  7220. DestinationString : PSTRING;
  7221. SourceString : PSTRING
  7222. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7223. // #->REVIEW NUMBER OF PARAMETERS
  7224. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7225. function RtlValidAcl(
  7226. Acl : PACL
  7227. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7228. // This function is very similar to HeapValidate() from Kernel32.dll. Refer
  7229. // to the PSDK for additional information. Usually the same flags apply.
  7230. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7231. function RtlValidateHeap(
  7232. hHeap : HANDLE;
  7233. dwFlags : ULONG;
  7234. lpMem : LPCVOID
  7235. ): BOOL; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7236. // Compatibility: WXP, 2K3
  7237. function RtlValidateUnicodeString(
  7238. dwMustBeNull : ULONG;
  7239. ValidateThis : PUNICODE_STRING
  7240. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7241. // Compatibility: W2K, WXP, 2K3
  7242. function RtlValidRelativeSecurityDescriptor(
  7243. SecurityDescriptorInput : PSECURITY_DESCRIPTOR;
  7244. SecurityDescriptorLength : ULONG;
  7245. RequiredInformation : SECURITY_INFORMATION
  7246. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7247. // Documented in the DDK.
  7248. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7249. function RtlValidSecurityDescriptor(
  7250. SecurityDescriptor : PSECURITY_DESCRIPTOR
  7251. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7252. // #->REVIEW NUMBER OF PARAMETERS; XREF: see IsValidSid()!
  7253. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7254. function RtlValidSid(
  7255. pSid : PSID
  7256. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7257. // Documented in the DDK.
  7258. // Compatibility: W2K, WXP, 2K3
  7259. function RtlVerifyVersionInfo(
  7260. VersionInfo : PRTL_OSVERSIONINFOEXW;
  7261. TypeMask : ULONG;
  7262. ConditionMask : ULONGLONG
  7263. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7264. // Documented in the DDK.
  7265. function RtlVolumeDeviceToDosName(
  7266. VolumeDeviceObject : PVOID;
  7267. DosName : PUNICODE_STRING
  7268. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7269. // Documented in the DDK.
  7270. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7271. function RtlWriteRegistryValue(
  7272. RelativeTo : ULONG;
  7273. Path : LPCWSTR;
  7274. ValueName : LPCWSTR;
  7275. ValueType : ULONG;
  7276. ValueData : PVOID;
  7277. ValueLength : ULONG
  7278. ): NTSTATUS; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7279. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7280. function RtlxAnsiStringToUnicodeSize(
  7281. AnsiString : PANSI_STRING
  7282. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7283. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7284. function RtlxOemStringToUnicodeSize(
  7285. AnsiString : POEM_STRING
  7286. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7287. // Documented in the DDK.
  7288. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7289. function RtlxUnicodeStringToAnsiSize(
  7290. UnicodeString : PUNICODE_STRING
  7291. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7292. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7293. function RtlxUnicodeStringToOemSize(
  7294. UnicodeString : PUNICODE_STRING
  7295. ): ULONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7296. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7297. function RtlZeroHeap(
  7298. hHeap : HANDLE;
  7299. dwFlags : ULONG
  7300. ): BOOLEAN; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7301. // Documented in the DDK.
  7302. // Compatibility: NT3, NT4, W2K, WXP, 2K3
  7303. procedure RtlZeroMemory(
  7304. Destination : PVOID;
  7305. Length : SIZE_T
  7306. ); stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7307. // This function is very similar to VerSetConditionMask() from
  7308. // Kernel32.dll. Refer to the PSDK for additional information. Usually the
  7309. // same flags apply.
  7310. // Compatibility: W2K, WXP, 2K3
  7311. function VerSetConditionMask(
  7312. ConditionMask : ULONGLONG;
  7313. dwTypeMask : DWORD;
  7314. Condition : BYTE
  7315. ): ULONGLONG; stdcall; {$IFNDEF RTDL}external ntdll;{$ENDIF}
  7316. //// 810 automatically created prototype entries.
  7317. //// END : Function prototypes
  7318. implementation
  7319. // This function is actually declared as a macro defined as memcpy()
  7320. procedure RtlCopyMemory(Destination: PVOID; Source: PVOID; Length: SIZE_T); stdcall;
  7321. begin
  7322. Move(Source^, Destination^, Length);
  7323. end;
  7324. // Own function to retrieve the process's heap handle
  7325. function NtpGetProcessHeap(): HANDLE;
  7326. asm
  7327. {$ifdef cpu386}
  7328. mov EAX, FS:[018h] // EAX now holds the TEB address
  7329. mov EAX, [EAX+030h] // TEB+$30 holds the PEB address
  7330. mov EAX, DWORD PTR [EAX+24] // PEB+$30 holds the ProcessHeap's handle
  7331. {$endif cpu386}
  7332. {$ifdef cpux86_64}
  7333. mov RAX, GS:[48] // EAX now holds the TEB address
  7334. mov RAX, [RAX+060h] // TEB+$30 holds the PEB address
  7335. mov RAX, DWORD PTR [RAX+48] // PEB+$30 holds the ProcessHeap's handle
  7336. {$endif cpux86_64}
  7337. end;
  7338. // Own function to retrieve the thread environment block (TEB) pointer
  7339. function NtpCurrentTeb(): PTEB;
  7340. asm
  7341. {$ifdef cpu386}
  7342. mov EAX, FS:[24]
  7343. {$endif cpu386}
  7344. {$ifdef cpux86_64}
  7345. mov RAX, GS:[48]
  7346. {$endif cpux86_64}
  7347. end;
  7348. // Own function to retrieve the process environment block (PEB) pointer
  7349. function RtlpGetCurrentPeb(): PPEB;
  7350. asm
  7351. {$ifdef cpu386}
  7352. mov EAX, FS:[24]
  7353. mov EAX, [EAX+030h]
  7354. {$endif cpu386}
  7355. {$ifdef cpux86_64}
  7356. mov RAX, GS:[24]
  7357. mov RAX, [RAX+060h]
  7358. {$endif cpux86_64}
  7359. end;
  7360. (* Own function to swap bytes in 16bit values
  7361. The RtlUshortByteSwap routine converts a USHORT from
  7362. little-endian to big-endian, and vice versa. *)
  7363. function RtlUshortByteSwap(Source: USHORT): USHORT;
  7364. asm
  7365. {$ifdef cpux86_64}
  7366. mov CX, AX
  7367. {$endif cpux86_64}
  7368. rol AX, 08h
  7369. end;
  7370. (* Own function to swap bytes in 32bit values
  7371. The RtlUlongByteSwap routine converts a ULONG from little-endian to
  7372. big-endian, and vice versa. *)
  7373. function RtlUlongByteSwap(Source: ULONG): ULONG;
  7374. asm
  7375. {$ifdef cpux86_64}
  7376. mov ECX, EAX
  7377. {$endif cpux86_64}
  7378. bswap EAX
  7379. (*
  7380. // Does the same but perhaps slower ...
  7381. // Source = $11223344
  7382. rol AX, 08h // Source = $11224433
  7383. rol EAX, 0Fh // Source = $44331122
  7384. rol AX, 08h // Source = $44332211
  7385. *)
  7386. end;
  7387. (* Own function to swap bytes in 64bit values
  7388. The RtlUlonglongByteSwap routine converts a ULONGLONG from
  7389. little-endian to big-endian, and vice versa. *)
  7390. function RtlUlonglongByteSwap(Source: ULONGLONG): ULONGLONG;
  7391. asm
  7392. {$ifdef cpu386}
  7393. mov EAX, [ESP+0Ch] // Get the high part of the ULONGLONG into EAX
  7394. mov EDX, [ESP+08h] // Get the low part of the ULONGLONG into EDX
  7395. // This is not written as mnemonics to be compatible with D4!
  7396. db 0Fh, 0C8h // "bswap EAX" can only be executed on 486+!!!
  7397. db 0Fh, 0CAh // "bswap EDX" can only be executed on 486+!!!
  7398. // High part returns in EDX, low part in EAX
  7399. {$endif cpu386}
  7400. {$ifdef cpux86_64}
  7401. MOV RCX,RAX
  7402. BSWAP EAX
  7403. {$endif cpux86_64}
  7404. end;
  7405. // Resembles the RtlValidateUnicodeString() function available from Windows XP
  7406. // on exactly as it is on this OS version, except for the calling convention.
  7407. function RtlpValidateUnicodeString(dwMustBeNull: DWORD; UnicodeString: PUNICODE_STRING): NTSTATUS;
  7408. begin
  7409. result := STATUS_INVALID_PARAMETER;
  7410. if (dwMustBeNull = 0) then
  7411. begin
  7412. result := STATUS_SUCCESS;
  7413. if (Assigned(UnicodeString)) then
  7414. begin
  7415. result := STATUS_INVALID_PARAMETER;
  7416. if ((UnicodeString^.Length mod 2 = 0) and (UnicodeString^.MaximumLength mod 2 = 0) and (UnicodeString^.Length <= UnicodeString^.MaximumLength)) then
  7417. if ((UnicodeString^.Length > 0) and (UnicodeString^.MaximumLength > 0)) then
  7418. if (Assigned(UnicodeString^.Buffer)) then
  7419. result := STATUS_SUCCESS;
  7420. end;
  7421. end;
  7422. end;
  7423. // Resembles the RtlValidateUnicodeString() function available from Windows XP
  7424. // on, but does not require the first parameter which anyway must be zero.
  7425. function RtlpValidateUnicodeString2(UnicodeString: PUNICODE_STRING): NTSTATUS;
  7426. begin
  7427. result := STATUS_SUCCESS;
  7428. if (Assigned(UnicodeString)) then
  7429. begin
  7430. result := STATUS_INVALID_PARAMETER;
  7431. if ((UnicodeString^.Length mod 2 = 0) and (UnicodeString^.MaximumLength mod 2 = 0) and (UnicodeString^.Length <= UnicodeString^.MaximumLength)) then
  7432. if ((UnicodeString^.Length > 0) and (UnicodeString^.MaximumLength > 0)) then
  7433. if (Assigned(UnicodeString^.Buffer)) then
  7434. result := STATUS_SUCCESS;
  7435. end;
  7436. end;
  7437. {$IFDEF RTDL}
  7438. /// Function types
  7439. type
  7440. TFNCsrGetProcessId = function (): DWORD; stdcall;
  7441. TFNDbgQueryDebugFilterState = function (ComponentId: ULONG; Level: ULONG): NTSTATUS; stdcall;
  7442. TFNDbgSetDebugFilterState = function (ComponentId: ULONG; Level: ULONG; State: BOOLEAN): NTSTATUS; stdcall;
  7443. TFNKiRaiseUserExceptionDispatcher = function (): ULONG; stdcall;
  7444. TFNLdrAccessResource = function (hModule: HANDLE; ResourceDataEntry: PIMAGE_RESOURCE_DATA_ENTRY; Address: PPVOID; dwSize: PULONG): NTSTATUS; stdcall;
  7445. TFNLdrAlternateResourcesEnabled = function (): BOOLEAN; stdcall;
  7446. TFNLdrDisableThreadCalloutsForDll = function (hModule: HANDLE): NTSTATUS; stdcall;
  7447. TFNLdrGetDllHandle = function (pwPath: PWORD; pReserved: PVOID; pusPath: PUNICODE_STRING; var phModule: HANDLE): NTSTATUS; stdcall;
  7448. TFNLdrGetProcedureAddress = function (hModule: HANDLE; dwOrdinal: ULONG; psName: PSTRING; var pProcedure: PVOID): NTSTATUS; stdcall;
  7449. TFNLdrLoadDll = function (pwPath: PWORD; pdwFlags: PDWORD; pusPath: PUNICODE_STRING; var phModule: HANDLE): NTSTATUS; stdcall;
  7450. TFNLdrQueryImageFileExecutionOptions = function (pusImagePath: PUNICODE_STRING; pwOptionName: PWORD; dwRequestedType: DWORD; pData: PVOID; dwSize: DWORD; pdwSize: PDWORD): NTSTATUS; stdcall;
  7451. TFNLdrQueryProcessModuleInformation = function (psmi: PSYSTEM_MODULE_INFORMATION; dwSize: DWORD; pdwSize: PDWORD): NTSTATUS; stdcall;
  7452. TFNLdrShutdownProcess = procedure(); stdcall;
  7453. TFNLdrShutdownThread = procedure(); stdcall;
  7454. TFNLdrUnloadDll = function (hModule: HANDLE): NTSTATUS; stdcall;
  7455. TFNNtAcceptConnectPort = function (PortHandle: PHANDLE; PortIdentifier: ULONG; Message: PPORT_MESSAGE; Accept: BOOLEAN; WriteSection: PPORT_SECTION_WRITE; ReadSection: PPORT_SECTION_READ): NTSTATUS; stdcall;
  7456. TFNNtAccessCheck = function (SecurityDescriptor: PSECURITY_DESCRIPTOR; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG;
  7457. GrantedAccess: PACCESS_MASK; AccessStatus: PBOOLEAN): NTSTATUS; stdcall;
  7458. TFNNtAccessCheckAndAuditAlarm = function (SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; DesiredAccess: ACCESS_MASK;
  7459. GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOLEAN; GrantedAccess: PACCESS_MASK; AccessStatus: PBOOLEAN; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall;
  7460. TFNNtAccessCheckByType = function (SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG;
  7461. GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG; GrantedAccess: PACCESS_MASK; AccessStatus: PULONG): NTSTATUS; stdcall;
  7462. TFNNtAccessCheckByTypeAndAuditAlarm = function (SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
  7463. DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOLEAN; GrantedAccess: PACCESS_MASK;
  7464. AccessStatus: PULONG; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall;
  7465. TFNNtAccessCheckByTypeResultList = function (SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG;
  7466. GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG; GrantedAccessList: PACCESS_MASK; AccessStatusList: PULONG): NTSTATUS; stdcall;
  7467. TFNNtAccessCheckByTypeResultListAndAuditAlarm = function (SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
  7468. DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOLEAN; GrantedAccessList: PACCESS_MASK;
  7469. AccessStatusList: PULONG; GenerateOnClose: PULONG): NTSTATUS; stdcall;
  7470. TFNNtAccessCheckByTypeResultListAndAuditAlarmByHandle = function (SubsystemName: PUNICODE_STRING; HandleId: PVOID; TokenHandle: HANDLE; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING;
  7471. SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING;
  7472. ObjectCreation: BOOLEAN; GrantedAccessList: PACCESS_MASK; AccessStatusList: PULONG; GenerateOnClose: PULONG): NTSTATUS; stdcall;
  7473. TFNNtAddAtom = function (Str: PWSTR; StringLength: ULONG; Atom: PUSHORT): NTSTATUS; stdcall;
  7474. TFNNtAdjustGroupsToken = function (TokenHandle: HANDLE; ResetToDefault: BOOLEAN; NewState: PTOKEN_GROUPS; BufferLength: ULONG; PreviousState: PTOKEN_GROUPS; ReturnLength: PULONG): NTSTATUS; stdcall;
  7475. TFNNtAdjustPrivilegesToken = function (TokenHandle: HANDLE; DisableAllPrivileges: BOOLEAN; NewState: PTOKEN_PRIVILEGES; BufferLength: ULONG; PreviousState: PTOKEN_PRIVILEGES; ReturnLength: PULONG): NTSTATUS; stdcall;
  7476. TFNNtAlertResumeThread = function (ThreadHandle: HANDLE; PreviousSuspendCount: PULONG): NTSTATUS; stdcall;
  7477. TFNNtAlertThread = function (ThreadHandle: HANDLE): NTSTATUS; stdcall;
  7478. TFNNtAllocateLocallyUniqueId = function (Luid: PLUID): NTSTATUS; stdcall;
  7479. TFNNtAllocateUserPhysicalPages = function (ProcessHandle: HANDLE; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall;
  7480. TFNNtAllocateUuids = function (UuidLastTimeAllocated: PLARGE_INTEGER; UuidDeltaTime: PULONG; UuidSequenceNumber: PULONG; UuidSeed: PUCHAR): NTSTATUS; stdcall;
  7481. TFNNtAllocateVirtualMemory = function (ProcessHandle: HANDLE; BaseAddress: PPVOID; ZeroBits: ULONG; AllocationSize: PULONG; AllocationType: ULONG; Protect: ULONG): NTSTATUS; stdcall;
  7482. TFNNtAreMappedFilesTheSame = function (Address1: PVOID; Address2: PVOID): NTSTATUS; stdcall;
  7483. TFNNtAssignProcessToJobObject = function (JobHandle: HANDLE; ProcessHandle: HANDLE): NTSTATUS; stdcall;
  7484. TFNNtCallbackReturn = function (Result_: PVOID; ResultLength: ULONG; Status: NTSTATUS): NTSTATUS; stdcall;
  7485. TFNNtCancelDeviceWakeupRequest = function (DeviceHandle: HANDLE): NTSTATUS; stdcall;
  7486. TFNNtCancelIoFile = function (FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall;
  7487. TFNNtCancelTimer = function (TimerHandle: HANDLE; PreviousState: PBOOLEAN): NTSTATUS; stdcall;
  7488. TFNNtClearEvent = function (EventHandle: HANDLE): NTSTATUS; stdcall;
  7489. TFNNtClose = function (Handle: HANDLE): NTSTATUS; stdcall;
  7490. TFNNtCloseObjectAuditAlarm = function (SubsystemName: PUNICODE_STRING; HandleId: PVOID; GenerateOnClose: BOOLEAN): NTSTATUS; stdcall;
  7491. TFNNtCompleteConnectPort = function (PortHandle: HANDLE): NTSTATUS; stdcall;
  7492. TFNNtConnectPort = function (PortHandle: PHANDLE; PortName: PUNICODE_STRING; SecurityQos: PSECURITY_QUALITY_OF_SERVICE; WriteSection: PPORT_SECTION_WRITE; ReadSection: PPORT_SECTION_READ; MaxMessageSize: PULONG; ConnectData: PVOID;
  7493. ConnectDataLength: PULONG): NTSTATUS; stdcall;
  7494. TFNNtContinue = function (Context: PCONTEXT; TestAlert: BOOLEAN): NTSTATUS; stdcall;
  7495. TFNNtCreateChannel = function (ChannelHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7496. TFNNtCreateDirectoryObject = function (DirectoryHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7497. TFNNtCreateEvent = function (EventHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; EventType: EVENT_TYPE; InitialState: BOOLEAN): NTSTATUS; stdcall;
  7498. TFNNtCreateEventPair = function (EventPairHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7499. TFNNtCreateFile = function (FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; AllocationSize: PLARGE_INTEGER; FileAttributes: ULONG; ShareAccess: ULONG;
  7500. CreateDisposition: ULONG; CreateOptions: ULONG; EaBuffer: PVOID; EaLength: ULONG): NTSTATUS; stdcall;
  7501. TFNNtCreateIoCompletion = function (IoCompletionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; NumberOfConcurrentThreads: ULONG): NTSTATUS; stdcall;
  7502. TFNNtCreateJobObject = function (JobHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7503. TFNNtCreateKey = function (KeyHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TitleIndex: ULONG; Class_: PUNICODE_STRING; CreateOptions: ULONG; Disposition: PULONG): NTSTATUS; stdcall;
  7504. TFNNtCreateMailslotFile = function (FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; CreateOptions: ULONG; Unknown: ULONG; MaxMessageSize: ULONG;
  7505. ReadTimeout: PLARGE_INTEGER): NTSTATUS; stdcall;
  7506. TFNNtCreateMutant = function (MutantHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InitialOwner: BOOLEAN): NTSTATUS; stdcall;
  7507. TFNNtCreateNamedPipeFile = function (FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; ShareAccess: ULONG; CreateDisposition: ULONG; CreateOptions: ULONG;
  7508. TypeMessage: BOOLEAN; ReadmodeMessage: BOOLEAN; Nonblocking: BOOLEAN; MaxInstances: ULONG; InBufferSize: ULONG; OutBufferSize: ULONG; DefaultTimeout: PLARGE_INTEGER): NTSTATUS; stdcall;
  7509. TFNNtCreatePagingFile = function (FileName: PUNICODE_STRING; InitialSize: PULARGE_INTEGER; MaximumSize: PULARGE_INTEGER; Reserved: ULONG): NTSTATUS; stdcall;
  7510. TFNNtCreatePort = function (PortHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES; MaxDataSize: ULONG; MaxMessageSize: ULONG; Reserved: ULONG): NTSTATUS; stdcall;
  7511. TFNNtCreateProcess = function (ProcessHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InheritFromProcessHandle: HANDLE; InheritHandles: BOOLEAN; SectionHandle: HANDLE; DebugPort: HANDLE;
  7512. ExceptionPort: HANDLE): NTSTATUS; stdcall;
  7513. TFNNtCreateProfile = function (ProfileHandle: PHANDLE; ProcessHandle: HANDLE; Base: PVOID; Size: ULONG; BucketShift: ULONG; Buffer: PULONG; BufferLength: ULONG; Source: KPROFILE_SOURCE; ProcessorMask: ULONG): NTSTATUS; stdcall;
  7514. TFNNtCreateSection = function (SectionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; SectionSize: PLARGE_INTEGER; Protect: ULONG; Attributes: ULONG; FileHandle: HANDLE): NTSTATUS; stdcall;
  7515. TFNNtCreateSemaphore = function (SemaphoreHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InitialCount: LONG; MaximumCount: LONG): NTSTATUS; stdcall;
  7516. TFNNtCreateSymbolicLinkObject = function (SymbolicLinkHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TargetName: PUNICODE_STRING): NTSTATUS; stdcall;
  7517. TFNNtCreateThread = function (ThreadHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ProcessHandle: HANDLE; ClientId: PCLIENT_ID; ThreadContext: PCONTEXT; UserStack: PUSER_STACK;
  7518. CreateSuspended: BOOLEAN): NTSTATUS; stdcall;
  7519. TFNNtCreateTimer = function (TimerHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TimerType: TIMER_TYPE): NTSTATUS; stdcall;
  7520. TFNNtCreateToken = function (TokenHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; Type_: TOKEN_TYPE; AuthenticationId: PLUID; ExpirationTime: PLARGE_INTEGER; User: PTOKEN_USER; Groups: PTOKEN_GROUPS;
  7521. Privileges: PTOKEN_PRIVILEGES; Owner: PTOKEN_OWNER; PrimaryGroup: PTOKEN_PRIMARY_GROUP; DefaultDacl: PTOKEN_DEFAULT_DACL; Source: PTOKEN_SOURCE): NTSTATUS; stdcall;
  7522. TFNNtCreateWaitablePort = function (PortHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES; MaxDataSize: ULONG; MaxMessageSize: ULONG; Reserved: ULONG): NTSTATUS; stdcall;
  7523. TFNNtCurrentTeb = function (): PTEB; stdcall;
  7524. TFNNtDebugActiveProcess = function (hProcess: HANDLE; hDebugObject: HANDLE): NTSTATUS; stdcall;
  7525. TFNNtDelayExecution = function (Alertable: BOOLEAN; Interval: PLARGE_INTEGER): NTSTATUS; stdcall;
  7526. TFNNtDeleteAtom = function (Atom: USHORT): NTSTATUS; stdcall;
  7527. TFNNtDeleteFile = function (ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7528. TFNNtDeleteKey = function (KeyHandle: HANDLE): NTSTATUS; stdcall;
  7529. TFNNtDeleteObjectAuditAlarm = function (SubsystemName: PUNICODE_STRING; HandleId: PVOID; GenerateOnClose: BOOLEAN): NTSTATUS; stdcall;
  7530. TFNNtDeleteValueKey = function (KeyHandle: HANDLE; ValueName: PUNICODE_STRING): NTSTATUS; stdcall;
  7531. TFNNtDeviceIoControlFile = function (FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; IoControlCode: ULONG; InputBuffer: PVOID; InputBufferLength: ULONG;
  7532. OutputBuffer: PVOID; OutputBufferLength: ULONG): NTSTATUS; stdcall;
  7533. TFNNtDisplayString = function (Str: PUNICODE_STRING): NTSTATUS; stdcall;
  7534. TFNNtDuplicateObject = function (SourceProcessHandle: HANDLE; SourceHandle: HANDLE; TargetProcessHandle: HANDLE; TargetHandle: PHANDLE; DesiredAccess: ACCESS_MASK; Attributes: ULONG; Options: ULONG): NTSTATUS; stdcall;
  7535. TFNNtDuplicateToken = function (ExistingTokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; EffectiveOnly: BOOLEAN; TokenType: TOKEN_TYPE; NewTokenHandle: PHANDLE): NTSTATUS; stdcall;
  7536. TFNNtEnumerateKey = function (KeyHandle: HANDLE; Index: ULONG; KeyInformationClass: KEY_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  7537. TFNNtEnumerateValueKey = function (KeyHandle: HANDLE; Index: ULONG; KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS; KeyValueInformation: PVOID; KeyValueInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  7538. TFNNtExtendSection = function (SectionHandle: HANDLE; SectionSize: PLARGE_INTEGER): NTSTATUS; stdcall;
  7539. TFNNtFilterToken = function (ExistingTokenHandle: HANDLE; Flags: ULONG; SidsToDisable: PTOKEN_GROUPS; PrivilegesToDelete: PTOKEN_PRIVILEGES; SidsToRestricted: PTOKEN_GROUPS; NewTokenHandle: PHANDLE): NTSTATUS; stdcall;
  7540. TFNNtFindAtom = function (Str: PWSTR; StringLength: ULONG; Atom: PUSHORT): NTSTATUS; stdcall;
  7541. TFNNtFlushBuffersFile = function (FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall;
  7542. TFNNtFlushInstructionCache = function (ProcessHandle: HANDLE; BaseAddress: PVOID; FlushSize: ULONG): NTSTATUS; stdcall;
  7543. TFNNtFlushKey = function (KeyHandle: HANDLE): NTSTATUS; stdcall;
  7544. TFNNtFlushVirtualMemory = function (ProcessHandle: HANDLE; BaseAddress: PPVOID; FlushSize: PULONG; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall;
  7545. TFNNtFlushWriteBuffer = function (): NTSTATUS; stdcall;
  7546. TFNNtFreeUserPhysicalPages = function (ProcessHandle: HANDLE; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall;
  7547. TFNNtFreeVirtualMemory = function (ProcessHandle: HANDLE; BaseAddress: PPVOID; FreeSize: PULONG; FreeType: ULONG): NTSTATUS; stdcall;
  7548. TFNNtFsControlFile = function (FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; FsControlCode: ULONG; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID;
  7549. OutputBufferLength: ULONG): NTSTATUS; stdcall;
  7550. TFNNtGetContextThread = function (ThreadHandle: HANDLE; Context: PCONTEXT): NTSTATUS; stdcall;
  7551. TFNNtGetCurrentProcessorNumber = function (): ULONG; stdcall;
  7552. TFNNtGetDevicePowerState = function (DeviceHandle: HANDLE; DevicePowerState: PDEVICE_POWER_STATE): NTSTATUS; stdcall;
  7553. TFNNtGetPlugPlayEvent = function (Reserved1: ULONG; Reserved2: ULONG; Buffer: PVOID; BufferLength: ULONG): NTSTATUS; stdcall;
  7554. TFNNtGetTickCount = function (): ULONG; stdcall;
  7555. TFNNtGetWriteWatch = function (ProcessHandle: HANDLE; Flags: ULONG; BaseAddress: PVOID; RegionSize: ULONG; Buffer: PULONG; BufferEntries: PULONG; Granularity: PULONG): NTSTATUS; stdcall;
  7556. TFNNtImpersonateAnonymousToken = function (ThreadHandle: HANDLE): NTSTATUS; stdcall;
  7557. TFNNtImpersonateClientOfPort = function (PortHandle: HANDLE; Message: PPORT_MESSAGE): NTSTATUS; stdcall;
  7558. TFNNtImpersonateThread = function (ThreadHandle: HANDLE; TargetThreadHandle: HANDLE; SecurityQos: PSECURITY_QUALITY_OF_SERVICE): NTSTATUS; stdcall;
  7559. TFNNtInitializeRegistry = function (Setup: BOOLEAN): NTSTATUS; stdcall;
  7560. TFNNtInitiatePowerAction = function (SystemAction: POWER_ACTION; MinSystemState: SYSTEM_POWER_STATE; Flags: ULONG; Asynchronous: BOOLEAN): NTSTATUS; stdcall;
  7561. TFNNtIsSystemResumeAutomatic = function (): BOOLEAN; stdcall;
  7562. TFNNtListenChannel = function (x: PVOID; y: PVOID): NTSTATUS; stdcall;
  7563. TFNNtListenPort = function (PortHandle: HANDLE; Message: PPORT_MESSAGE): NTSTATUS; stdcall;
  7564. TFNNtLoadDriver = function (DriverServiceName: PUNICODE_STRING): NTSTATUS; stdcall;
  7565. TFNNtLoadKey = function (KeyObjectAttributes: POBJECT_ATTRIBUTES; FileObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7566. TFNNtLoadKey2 = function (KeyObjectAttributes: POBJECT_ATTRIBUTES; FileObjectAttributes: POBJECT_ATTRIBUTES; Flags: ULONG): NTSTATUS; stdcall;
  7567. TFNNtLockFile = function (FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; LockOffset: PULARGE_INTEGER; LockLength: PULARGE_INTEGER; Key: ULONG; FailImmediately: BOOLEAN;
  7568. ExclusiveLock: BOOLEAN): NTSTATUS; stdcall;
  7569. TFNNtLockVirtualMemory = function (ProcessHandle: HANDLE; BaseAddress: PPVOID; LockSize: PULONG; LockType: ULONG): NTSTATUS; stdcall;
  7570. TFNNtMakePermanentObject = function (Handle: HANDLE): NTSTATUS; stdcall;
  7571. TFNNtMakeTemporaryObject = function (Handle: HANDLE): NTSTATUS; stdcall;
  7572. TFNNtMapUserPhysicalPages = function (BaseAddress: PVOID; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall;
  7573. TFNNtMapUserPhysicalPagesScatter = function (BaseAddresses: PPVOID; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall;
  7574. TFNNtMapViewOfSection = function (SectionHandle: HANDLE; ProcessHandle: HANDLE; BaseAddress: PPVOID; ZeroBits: ULONG; CommitSize: ULONG; SectionOffset: PLARGE_INTEGER; ViewSize: PULONG; InheritDisposition: SECTION_INHERIT;
  7575. AllocationType: ULONG; Protect: ULONG): NTSTATUS; stdcall;
  7576. TFNNtNotifyChangeDirectoryFile = function (FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_NOTIFY_INFORMATION; BufferLength: ULONG; NotifyFilter: ULONG;
  7577. WatchSubtree: BOOLEAN): NTSTATUS; stdcall;
  7578. TFNNtNotifyChangeKey = function (KeyHandle: HANDLE; EventHandle: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; NotifyFilter: ULONG; WatchSubtree: BOOLEAN; Buffer: PVOID; BufferLength: ULONG;
  7579. Asynchronous: BOOLEAN): NTSTATUS; stdcall;
  7580. TFNNtNotifyChangeMultipleKeys = function (KeyHandle: HANDLE; Flags: ULONG; KeyObjectAttributes: POBJECT_ATTRIBUTES; EventHandle: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; NotifyFilter: ULONG;
  7581. WatchSubtree: BOOLEAN; Buffer: PVOID; BufferLength: ULONG; Asynchronous: BOOLEAN): NTSTATUS; stdcall;
  7582. TFNNtOpenChannel = function (ChannelHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7583. TFNNtOpenDirectoryObject = function (DirectoryHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7584. TFNNtOpenEvent = function (EventHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7585. TFNNtOpenEventPair = function (EventPairHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7586. TFNNtOpenFile = function (FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; ShareAccess: ULONG; OpenOptions: ULONG): NTSTATUS; stdcall;
  7587. TFNNtOpenIoCompletion = function (IoCompletionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7588. TFNNtOpenJobObject = function (JobHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7589. TFNNtOpenKey = function (KeyHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7590. TFNNtOpenMutant = function (MutantHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7591. TFNNtOpenObjectAuditAlarm = function (SubsystemName: PUNICODE_STRING; HandleId: PPVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; TokenHandle: HANDLE;
  7592. DesiredAccess: ACCESS_MASK; GrantedAccess: ACCESS_MASK; Privileges: PPRIVILEGE_SET; ObjectCreation: BOOLEAN; AccessGranted: BOOLEAN; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall;
  7593. TFNNtOpenProcess = function (ProcessHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ClientId: PCLIENT_ID): NTSTATUS; stdcall;
  7594. TFNNtOpenProcessToken = function (ProcessHandle: HANDLE; DesiredAccess: ACCESS_MASK; TokenHandle: PHANDLE): NTSTATUS; stdcall;
  7595. TFNNtOpenSection = function (SectionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7596. TFNNtOpenSemaphore = function (SemaphoreHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7597. TFNNtOpenSymbolicLinkObject = function (SymbolicLinkHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7598. TFNNtOpenThread = function (ThreadHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ClientId: PCLIENT_ID): NTSTATUS; stdcall;
  7599. TFNNtOpenThreadToken = function (ThreadHandle: HANDLE; DesiredAccess: ACCESS_MASK; OpenAsSelf: BOOLEAN; TokenHandle: PHANDLE): NTSTATUS; stdcall;
  7600. TFNNtOpenTimer = function (TimerHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7601. TFNNtPlugPlayControl = function (ControlCode: ULONG; Buffer: PVOID; BufferLength: ULONG): NTSTATUS; stdcall;
  7602. TFNNtPowerInformation = function (PowerInformationLevel: POWER_INFORMATION_LEVEL; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG): NTSTATUS; stdcall;
  7603. TFNNtPrivilegeCheck = function (TokenHandle: HANDLE; RequiredPrivileges: PPRIVILEGE_SET; Result_: PBOOLEAN): NTSTATUS; stdcall;
  7604. TFNNtPrivilegeObjectAuditAlarm = function (SubsystemName: PUNICODE_STRING; HandleId: PVOID; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; Privileges: PPRIVILEGE_SET; AccessGranted: BOOLEAN): NTSTATUS; stdcall;
  7605. TFNNtPrivilegedServiceAuditAlarm = function (SubsystemName: PUNICODE_STRING; ServiceName: PUNICODE_STRING; TokenHandle: HANDLE; Privileges: PPRIVILEGE_SET; AccessGranted: BOOLEAN): NTSTATUS; stdcall;
  7606. TFNNtProtectVirtualMemory = function (ProcessHandle: HANDLE; BaseAddress: PPVOID; ProtectSize: PULONG; NewProtect: ULONG; OldProtect: PULONG): NTSTATUS; stdcall;
  7607. TFNNtPulseEvent = function (EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall;
  7608. TFNNtQueryAttributesFile = function (ObjectAttributes: POBJECT_ATTRIBUTES; FileInformation: PFILE_BASIC_INFORMATION): NTSTATUS; stdcall;
  7609. TFNNtQueryDefaultLocale = function (ThreadOrSystem: BOOLEAN; Locale: PLCID): NTSTATUS; stdcall;
  7610. TFNNtQueryDefaultUILanguage = function (LanguageId: PLANGID): NTSTATUS; stdcall;
  7611. TFNNtQueryDirectoryFile = function (FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG;
  7612. FileInformationClass: FILE_INFORMATION_CLASS; ReturnSingleEntry: BOOLEAN; FileName: PUNICODE_STRING; RestartScan: BOOLEAN): NTSTATUS; stdcall;
  7613. TFNNtQueryDirectoryObject = function (DirectoryHandle: HANDLE; Buffer: PVOID; BufferLength: ULONG; ReturnSingleEntry: BOOLEAN; RestartScan: BOOLEAN; Context: PULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7614. TFNNtQueryEaFile = function (FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_FULL_EA_INFORMATION; BufferLength: ULONG; ReturnSingleEntry: BOOLEAN; EaList: PFILE_GET_EA_INFORMATION; EaListLength: ULONG; EaIndex: PULONG;
  7615. RestartScan: BOOLEAN): NTSTATUS; stdcall;
  7616. TFNNtQueryEvent = function (EventHandle: HANDLE; EventInformationClass: EVENT_INFORMATION_CLASS; EventInformation: PVOID; EventInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  7617. TFNNtQueryFullAttributesFile = function (ObjectAttributes: POBJECT_ATTRIBUTES; FileInformation: PFILE_NETWORK_OPEN_INFORMATION): NTSTATUS; stdcall;
  7618. TFNNtQueryInformationAtom = function (Atom: USHORT; AtomInformationClass: ATOM_INFORMATION_CLASS; AtomInformation: PVOID; AtomInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7619. TFNNtQueryInformationFile = function (FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG; FileInformationClass: FILE_INFORMATION_CLASS): NTSTATUS; stdcall;
  7620. TFNNtQueryInformationJobObject = function (JobHandle: HANDLE; JobInformationClass: JOBOBJECTINFOCLASS; JobInformation: PVOID; JobInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7621. TFNNtQueryInformationPort = function (PortHandle: HANDLE; PortInformationClass: PORT_INFORMATION_CLASS; PortInformation: PVOID; PortInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7622. TFNNtQueryInformationProcess = function (ProcessHandle: HANDLE; ProcessInformationClass: PROCESSINFOCLASS; ProcessInformation: PVOID; ProcessInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7623. TFNNtQueryInformationThread = function (ThreadHandle: HANDLE; ThreadInformationClass: THREADINFOCLASS; ThreadInformation: PVOID; ThreadInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7624. TFNNtQueryInformationToken = function (TokenHandle: HANDLE; TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: PVOID; TokenInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7625. TFNNtQueryInstallUILanguage = function (LanguageId: PLANGID): NTSTATUS; stdcall;
  7626. TFNNtQueryIntervalProfile = function (Source: KPROFILE_SOURCE; Interval: PULONG): NTSTATUS; stdcall;
  7627. TFNNtQueryIoCompletion = function (IoCompletionHandle: HANDLE; IoCompletionInformationClass: IO_COMPLETION_INFORMATION_CLASS; IoCompletionInformation: PVOID; IoCompletionInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  7628. TFNNtQueryKey = function (KeyHandle: HANDLE; KeyInformationClass: KEY_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  7629. TFNNtQueryMultipleValueKey = function (KeyHandle: HANDLE; ValueList: PKEY_VALUE_ENTRY; NumberOfValues: ULONG; Buffer: PVOID; Length: PULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7630. TFNNtQueryMutant = function (MutantHandle: HANDLE; MutantInformationClass: MUTANT_INFORMATION_CLASS; MutantInformation: PVOID; MutantInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  7631. TFNNtQueryObject = function (ObjectHandle: HANDLE; ObjectInformationClass: OBJECT_INFORMATION_CLASS; ObjectInformation: PVOID; ObjectInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7632. TFNNtQueryOpenSubKeys = function (KeyObjectAttributes: POBJECT_ATTRIBUTES; NumberOfKey: PULONG): NTSTATUS; stdcall;
  7633. TFNNtQueryPerformanceCounter = function (PerformanceCount: PLARGE_INTEGER; PerformanceFrequency: PLARGE_INTEGER): NTSTATUS; stdcall;
  7634. TFNNtQueryPortInformationProcess = function (): ULONG; stdcall;
  7635. TFNNtQueryQuotaInformationFile = function (FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_USER_QUOTA_INFORMATION; BufferLength: ULONG; ReturnSingleEntry: BOOLEAN; QuotaList: PFILE_QUOTA_LIST_INFORMATION;
  7636. QuotaListLength: ULONG; ResumeSid: PSID; RestartScan: BOOLEAN): NTSTATUS; stdcall;
  7637. TFNNtQuerySection = function (SectionHandle: HANDLE; SectionInformationClass: SECTION_INFORMATION_CLASS; SectionInformation: PVOID; SectionInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  7638. TFNNtQuerySecurityObject = function (Handle: HANDLE; RequestedInformation: SECURITY_INFORMATION; SecurityDescriptor: PSECURITY_DESCRIPTOR; SecurityDescriptorLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7639. TFNNtQuerySemaphore = function (SemaphoreHandle: HANDLE; SemaphoreInformationClass: SEMAPHORE_INFORMATION_CLASS; SemaphoreInformation: PVOID; SemaphoreInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  7640. TFNNtQuerySymbolicLinkObject = function (SymbolicLinkHandle: HANDLE; TargetName: PUNICODE_STRING; ReturnLength: PULONG): NTSTATUS; stdcall;
  7641. TFNNtQuerySystemEnvironmentValue = function (Name: PUNICODE_STRING; Value: PVOID; ValueLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7642. TFNNtQuerySystemInformation = function (SystemInformationClass: SYSTEM_INFORMATION_CLASS; SystemInformation: PVOID; SystemInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7643. TFNNtQuerySystemTime = function (CurrentTime: PLARGE_INTEGER): NTSTATUS; stdcall;
  7644. TFNNtQueryTimer = function (TimerHandle: HANDLE; TimerInformationClass: TIMER_INFORMATION_CLASS; TimerInformation: PVOID; TimerInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  7645. TFNNtQueryTimerResolution = function (CoarsestResolution: PULONG; FinestResolution: PULONG; ActualResolution: PULONG): NTSTATUS; stdcall;
  7646. TFNNtQueryValueKey = function (KeyHandle: HANDLE; ValueName: PUNICODE_STRING; KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS; KeyValueInformation: PVOID; KeyValueInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall;
  7647. TFNNtQueryVirtualMemory = function (ProcessHandle: HANDLE; BaseAddress: PVOID; MemoryInformationClass: MEMORY_INFORMATION_CLASS; MemoryInformation: PVOID; MemoryInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7648. TFNNtQueryVolumeInformationFile = function (FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; VolumeInformation: PVOID; VolumeInformationLength: ULONG; VolumeInformationClass: FS_INFORMATION_CLASS): NTSTATUS; stdcall;
  7649. TFNNtQueueApcThread = function (ThreadHandle: HANDLE; ApcRoutine: PKNORMAL_ROUTINE; ApcContext: PVOID; Argument1: PVOID; Argument2: PVOID): NTSTATUS; stdcall;
  7650. TFNNtRaiseException = function (ExceptionRecord: PEXCEPTION_RECORD; Context: PCONTEXT; SearchFrames: BOOLEAN): NTSTATUS; stdcall;
  7651. TFNNtRaiseHardError = function (Status: NTSTATUS; NumberOfArguments: ULONG; StringArgumentsMask: ULONG; Arguments: PULONG; MessageBoxType: ULONG; MessageBoxResult: PULONG): NTSTATUS; stdcall;
  7652. TFNNtReadFile = function (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;
  7653. TFNNtReadFileScatter = function (FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_SEGMENT_ELEMENT; Length: ULONG; ByteOffset: PLARGE_INTEGER;
  7654. Key: PULONG): NTSTATUS; stdcall;
  7655. TFNNtReadRequestData = function (PortHandle: HANDLE; Message: PPORT_MESSAGE; Index: ULONG; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7656. TFNNtReadVirtualMemory = function (ProcessHandle: HANDLE; BaseAddress: PVOID; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7657. TFNNtRegisterThreadTerminatePort = function (PortHandle: HANDLE): NTSTATUS; stdcall;
  7658. TFNNtReleaseMutant = function (MutantHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall;
  7659. TFNNtReleaseSemaphore = function (SemaphoreHandle: HANDLE; ReleaseCount: LONG; PreviousCount: PLONG): NTSTATUS; stdcall;
  7660. TFNNtRemoveIoCompletion = function (IoCompletionHandle: HANDLE; CompletionKey: PULONG; CompletionValue: PULONG; IoStatusBlock: PIO_STATUS_BLOCK; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall;
  7661. TFNNtRemoveProcessDebug = function (hProcess: HANDLE; hDebugObject: HANDLE): NTSTATUS; stdcall;
  7662. TFNNtReplaceKey = function (NewFileObjectAttributes: POBJECT_ATTRIBUTES; KeyHandle: HANDLE; OldFileObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7663. TFNNtReplyPort = function (PortHandle: HANDLE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall;
  7664. TFNNtReplyWaitReceivePort = function (PortHandle: HANDLE; PortIdentifier: PULONG; ReplyMessage: PPORT_MESSAGE; Message: PPORT_MESSAGE): NTSTATUS; stdcall;
  7665. TFNNtReplyWaitReceivePortEx = function (PortHandle: HANDLE; PortIdentifier: PULONG; ReplyMessage: PPORT_MESSAGE; Message: PPORT_MESSAGE; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall;
  7666. TFNNtReplyWaitReplyPort = function (PortHandle: HANDLE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall;
  7667. TFNNtReplyWaitSendChannel = function (x: PVOID; y: PVOID; z: PVOID): NTSTATUS; stdcall;
  7668. TFNNtRequestDeviceWakeup = function (DeviceHandle: HANDLE): NTSTATUS; stdcall;
  7669. TFNNtRequestPort = function (PortHandle: HANDLE; RequestMessage: PPORT_MESSAGE): NTSTATUS; stdcall;
  7670. TFNNtRequestWaitReplyPort = function (PortHandle: HANDLE; RequestMessage: PPORT_MESSAGE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall;
  7671. TFNNtRequestWakeupLatency = function (Latency: LATENCY_TIME): NTSTATUS; stdcall;
  7672. TFNNtResetEvent = function (EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall;
  7673. TFNNtResetWriteWatch = function (ProcessHandle: HANDLE; BaseAddress: PVOID; RegionSize: ULONG): NTSTATUS; stdcall;
  7674. TFNNtRestoreKey = function (KeyHandle: HANDLE; FileHandle: HANDLE; Flags: ULONG): NTSTATUS; stdcall;
  7675. TFNNtResumeProcess = function (hProcess: HANDLE): NTSTATUS; stdcall;
  7676. TFNNtResumeThread = function (hThread: HANDLE; dwResumeCount: PULONG): NTSTATUS; stdcall;
  7677. TFNNtSaveKey = function (KeyHandle: HANDLE; FileHandle: HANDLE): NTSTATUS; stdcall;
  7678. TFNNtSaveKeyEx = function (KeyHandle: HANDLE; FileHandle: HANDLE; Flags: DWORD): NTSTATUS; stdcall;
  7679. TFNNtSaveMergedKeys = function (KeyHandle1: HANDLE; KeyHandle2: HANDLE; FileHandle: HANDLE): NTSTATUS; stdcall;
  7680. TFNNtSecureConnectPort = function (PortHandle: PHANDLE; PortName: PUNICODE_STRING; SecurityQos: PSECURITY_QUALITY_OF_SERVICE; WriteSection: PPORT_SECTION_WRITE; ServerSid: PSID; ReadSection: PPORT_SECTION_READ; MaxMessageSize: PULONG;
  7681. ConnectData: PVOID; ConnectDataLength: PULONG): NTSTATUS; stdcall;
  7682. TFNNtSendWaitReplyChannel = function (x: PVOID; y: PVOID; z: PVOID; z2: PVOID): NTSTATUS; stdcall;
  7683. TFNNtSetContextChannel = function (x: PVOID): NTSTATUS; stdcall;
  7684. TFNNtSetContextThread = function (ThreadHandle: HANDLE; Context: PCONTEXT): NTSTATUS; stdcall;
  7685. TFNNtSetDefaultHardErrorPort = function (PortHandle: HANDLE): NTSTATUS; stdcall;
  7686. TFNNtSetDefaultLocale = function (ThreadOrSystem: BOOLEAN; Locale: LCID): NTSTATUS; stdcall;
  7687. TFNNtSetDefaultUILanguage = function (LanguageId: LANGID): NTSTATUS; stdcall;
  7688. TFNNtSetEaFile = function (FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_FULL_EA_INFORMATION; BufferLength: ULONG): NTSTATUS; stdcall;
  7689. TFNNtSetEvent = function (EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall;
  7690. TFNNtSetHighEventPair = function (EventPairHandle: HANDLE): NTSTATUS; stdcall;
  7691. TFNNtSetHighWaitLowEventPair = function (EventPairHandle: HANDLE): NTSTATUS; stdcall;
  7692. TFNNtSetHighWaitLowThread = function (): NTSTATUS; stdcall;
  7693. TFNNtSetInformationFile = function (FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG; FileInformationClass: FILE_INFORMATION_CLASS): NTSTATUS; stdcall;
  7694. TFNNtSetInformationJobObject = function (JobHandle: HANDLE; JobInformationClass: JOBOBJECTINFOCLASS; JobInformation: PVOID; JobInformationLength: ULONG): NTSTATUS; stdcall;
  7695. TFNNtSetInformationKey = function (KeyHandle: HANDLE; KeyInformationClass: KEY_SET_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG): NTSTATUS; stdcall;
  7696. TFNNtSetInformationObject = function (ObjectHandle: HANDLE; ObjectInformationClass: OBJECT_INFORMATION_CLASS; ObjectInformation: PVOID; ObjectInformationLength: ULONG): NTSTATUS; stdcall;
  7697. TFNNtSetInformationProcess = function (ProcessHandle: HANDLE; ProcessInformationClass: PROCESSINFOCLASS; ProcessInformation: PVOID; ProcessInformationLength: ULONG): NTSTATUS; stdcall;
  7698. TFNNtSetInformationThread = function (ThreadHandle: HANDLE; ThreadInformationClass: THREADINFOCLASS; ThreadInformation: PVOID; ThreadInformationLength: ULONG): NTSTATUS; stdcall;
  7699. TFNNtSetInformationToken = function (TokenHandle: HANDLE; TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: PVOID; TokenInformationLength: ULONG): NTSTATUS; stdcall;
  7700. TFNNtSetIntervalProfile = function (Interval: ULONG; Source: KPROFILE_SOURCE): NTSTATUS; stdcall;
  7701. TFNNtSetIoCompletion = function (IoCompletionHandle: HANDLE; CompletionKey: ULONG; CompletionValue: ULONG; Status: NTSTATUS; Information: ULONG): NTSTATUS; stdcall;
  7702. TFNNtSetLdtEntries = function (Selector1: ULONG; LdtEntry1: LDT_ENTRY; Selector2: ULONG; LdtEntry2: LDT_ENTRY): NTSTATUS; stdcall;
  7703. TFNNtSetLowEventPair = function (EventPairHandle: HANDLE): NTSTATUS; stdcall;
  7704. TFNNtSetLowWaitHighEventPair = function (EventPairHandle: HANDLE): NTSTATUS; stdcall;
  7705. TFNNtSetLowWaitHighThread = function (): NTSTATUS; stdcall;
  7706. TFNNtSetQuotaInformationFile = function (FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_USER_QUOTA_INFORMATION; BufferLength: ULONG): NTSTATUS; stdcall;
  7707. TFNNtSetSecurityObject = function (Handle: HANDLE; SecurityInformation: SECURITY_INFORMATION; SecurityDescriptor: PSECURITY_DESCRIPTOR): NTSTATUS; stdcall;
  7708. TFNNtSetSystemEnvironmentValue = function (Name: PUNICODE_STRING; Value: PUNICODE_STRING): NTSTATUS; stdcall;
  7709. TFNNtSetSystemInformation = function (SystemInformationClass: SYSTEM_INFORMATION_CLASS; SystemInformation: PVOID; SystemInformationLength: ULONG): NTSTATUS; stdcall;
  7710. TFNNtSetSystemPowerState = function (SystemAction: POWER_ACTION; MinSystemState: SYSTEM_POWER_STATE; Flags: ULONG): NTSTATUS; stdcall;
  7711. TFNNtSetSystemTime = function (NewTime: PLARGE_INTEGER; OldTime: PLARGE_INTEGER): NTSTATUS; stdcall;
  7712. TFNNtSetThreadExecutionState = function (ExecutionState: EXECUTION_STATE; PreviousExecutionState: PEXECUTION_STATE): NTSTATUS; stdcall;
  7713. TFNNtSetTimer = function (TimerHandle: HANDLE; DueTime: PLARGE_INTEGER; TimerApcRoutine: PTIMER_APC_ROUTINE; TimerContext: PVOID; Resume: BOOLEAN; Period: LONG; PreviousState: PBOOLEAN): NTSTATUS; stdcall;
  7714. TFNNtSetTimerResolution = function (RequestedResolution: ULONG; Set_: BOOLEAN; ActualResolution: PULONG): NTSTATUS; stdcall;
  7715. TFNNtSetUuidSeed = function (UuidSeed: PUCHAR): NTSTATUS; stdcall;
  7716. TFNNtSetValueKey = function (KeyHandle: HANDLE; ValueName: PUNICODE_STRING; TitleIndex: ULONG; Type_: ULONG; Data: PVOID; DataSize: ULONG): NTSTATUS; stdcall;
  7717. TFNNtSetVolumeInformationFile = function (FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PVOID; BufferLength: ULONG; VolumeInformationClass: FS_INFORMATION_CLASS): NTSTATUS; stdcall;
  7718. TFNNtShutdownSystem = function (Action: SHUTDOWN_ACTION): NTSTATUS; stdcall;
  7719. TFNNtSignalAndWaitForSingleObject = function (HandleToSignal: HANDLE; HandleToWait: HANDLE; Alertable: BOOLEAN; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall;
  7720. TFNNtStartProfile = function (ProfileHandle: HANDLE): NTSTATUS; stdcall;
  7721. TFNNtStopProfile = function (ProfileHandle: HANDLE): NTSTATUS; stdcall;
  7722. TFNNtSuspendProcess = function (hProcess: HANDLE): NTSTATUS; stdcall;
  7723. TFNNtSuspendThread = function (hThread: HANDLE; dwLastResumeCount: PULONG): NTSTATUS; stdcall;
  7724. TFNNtSystemDebugControl = function (ControlCode: DEBUG_CONTROL_CODE; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7725. TFNNtTerminateJobObject = function (JobHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall;
  7726. TFNNtTerminateProcess = function (ProcessHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall;
  7727. TFNNtTerminateThread = function (ThreadHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall;
  7728. TFNNtTestAlert = function (): NTSTATUS; stdcall;
  7729. TFNNtUnloadDriver = function (DriverServiceName: PUNICODE_STRING): NTSTATUS; stdcall;
  7730. TFNNtUnloadKey = function (KeyObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall;
  7731. TFNNtUnlockFile = function (FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; LockOffset: PULARGE_INTEGER; LockLength: PULARGE_INTEGER; Key: ULONG): NTSTATUS; stdcall;
  7732. TFNNtUnlockVirtualMemory = function (ProcessHandle: HANDLE; BaseAddress: PPVOID; LockSize: PULONG; LockType: ULONG): NTSTATUS; stdcall;
  7733. TFNNtUnmapViewOfSection = function (ProcessHandle: HANDLE; BaseAddress: PVOID): NTSTATUS; stdcall;
  7734. TFNNtVdmControl = function (ControlCode: ULONG; ControlData: PVOID): NTSTATUS; stdcall;
  7735. TFNNtW32Call = function (RoutineIndex: ULONG; Argument: PVOID; ArgumentLength: ULONG; Result_: PPVOID; ResultLength: PULONG): NTSTATUS; stdcall;
  7736. TFNNtWaitForMultipleObjects = function (HandleCount: ULONG; Handles: PHANDLE; WaitType: WAIT_TYPE; Alertable: BOOLEAN; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall;
  7737. TFNNtWaitForSingleObject = function (Handle: HANDLE; Alertable: BOOLEAN; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall;
  7738. TFNNtWaitHighEventPair = function (EventPairHandle: HANDLE): NTSTATUS; stdcall;
  7739. TFNNtWaitLowEventPair = function (EventPairHandle: HANDLE): NTSTATUS; stdcall;
  7740. TFNNtWriteFile = function (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;
  7741. TFNNtWriteFileGather = function (FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_SEGMENT_ELEMENT; Length: ULONG; ByteOffset: PLARGE_INTEGER;
  7742. Key: PULONG): NTSTATUS; stdcall;
  7743. TFNNtWriteRequestData = function (PortHandle: HANDLE; Message: PPORT_MESSAGE; Index: ULONG; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7744. TFNNtWriteVirtualMemory = function (ProcessHandle: HANDLE; BaseAddress: PVOID; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;
  7745. TFNNtYieldExecution = function (): NTSTATUS; stdcall;
  7746. TFNRtlAbsoluteToSelfRelativeSD = function (pAbsoluteSD: PSECURITY_DESCRIPTOR; pSelfRelativeSD: PSECURITY_DESCRIPTOR; lpdwBufferLength: LPDWORD): NTSTATUS; stdcall;
  7747. TFNRtlAcquirePebLock = procedure(); stdcall;
  7748. TFNRtlAddAccessAllowedAce = function (pAcl: PACL; dwAceRevision: DWORD; AccessMask: ACCESS_MASK; pSid: PSID): NTSTATUS; stdcall;
  7749. TFNRtlAddAccessAllowedAceEx = function (pAcl: PACL; dwAceRevision: DWORD; AceFlags: DWORD; AccessMask: ACCESS_MASK; pSid: PSID): NTSTATUS; stdcall;
  7750. TFNRtlAddAccessDeniedAce = function (pAcl: PACL; dwAceRevision: DWORD; AccessMask: ACCESS_MASK; pSid: PSID): NTSTATUS; stdcall;
  7751. TFNRtlAddAccessDeniedAceEx = function (pAcl: PACL; dwAceRevision: DWORD; AceFlags: DWORD; AccessMask: ACCESS_MASK; pSid: PSID): NTSTATUS; stdcall;
  7752. TFNRtlAddAce = function (pAcl: PACL; dwAceRevision: DWORD; dwStartingAceIndex: DWORD; pAceList: PVOID; nAceListLength: DWORD): NTSTATUS; stdcall;
  7753. TFNRtlAddAuditAccessAce = function (pAcl: PACL; dwAceRevision: DWORD; AccessMask: ACCESS_MASK; pSid: PSID; bAuditSuccess: BOOLEAN; bAuditFailure: BOOLEAN): NTSTATUS; stdcall;
  7754. TFNRtlAddAuditAccessAceEx = function (pAcl: PACL; dwAceRevision: DWORD; AceFlags: DWORD; AccessMask: ACCESS_MASK; pSid: PSID; bAuditSuccess: BOOLEAN; bAuditFailure: BOOLEAN): NTSTATUS; stdcall;
  7755. TFNRtlAddRange = function (RangeList: PRTL_RANGE_LIST; Start: ULONGLONG; End_: ULONGLONG; Attributes: UCHAR; Flags: ULONG; UserData: PVOID; Owner: PVOID): NTSTATUS; stdcall;
  7756. TFNRtlAddVectoredExceptionHandler = function (FirstHandler: ULONG; VectoredHandler: PVECTORED_EXCEPTION_HANDLER): PVOID; stdcall;
  7757. TFNRtlAdjustPrivilege = function (Privilege: ULONG; Enable: BOOLEAN; CurrentThread: BOOLEAN; Enabled: PBOOLEAN): NTSTATUS; stdcall;
  7758. TFNRtlAllocateAndInitializeSid = function (pIdentifierAuthority: PSID_IDENTIFIER_AUTHORITY; SubAuthorityCount: BYTE; nSubAuthority0: DWORD; nSubAuthority1: DWORD; nSubAuthority2: DWORD; nSubAuthority3: DWORD; nSubAuthority4: DWORD;
  7759. nSubAuthority5: DWORD; nSubAuthority6: DWORD; nSubAuthority7: DWORD; var pSid: PSID): BOOL; stdcall;
  7760. TFNRtlAllocateHeap = function (hHeap: HANDLE; dwFlags: ULONG; Size: ULONG): PVOID; stdcall;
  7761. TFNRtlAnsiCharToUnicodeChar = function (AnsiChar: CHAR): WCHAR; stdcall;
  7762. TFNRtlAnsiStringToUnicodeSize = function (AnsiString: PANSI_STRING): ULONG; stdcall;
  7763. TFNRtlAnsiStringToUnicodeString = function (DestinationString: PUNICODE_STRING; SourceString: PANSI_STRING; AllocateDestinationString: BOOLEAN): NTSTATUS; stdcall;
  7764. TFNRtlAppendAsciizToString = function (DestinationString: PSTRING; AppendThisString: LPCSTR): NTSTATUS; stdcall;
  7765. TFNRtlAppendStringToString = function (DestinationString: PSTRING; AppendThisString: PSTRING): NTSTATUS; stdcall;
  7766. TFNRtlAppendUnicodeStringToString = function (DestinationString: PUNICODE_STRING; SourceString: PUNICODE_STRING): NTSTATUS; stdcall;
  7767. TFNRtlAppendUnicodeToString = function (Destination: PUNICODE_STRING; Source: LPCWSTR): NTSTATUS; stdcall;
  7768. TFNRtlAreAllAccessesGranted = function (GrantedAccess: ACCESS_MASK; WantedAccess: ACCESS_MASK): BOOLEAN; stdcall;
  7769. TFNRtlAreAnyAccessesGranted = function (GrantedAccess: ACCESS_MASK; WantedAccess: ACCESS_MASK): BOOLEAN; stdcall;
  7770. TFNRtlAreBitsClear = function (BitMapHeader: PRTL_BITMAP; StartingIndex: ULONG; Length: ULONG): BOOLEAN; stdcall;
  7771. TFNRtlAreBitsSet = function (BitMapHeader: PRTL_BITMAP; StartingIndex: ULONG; Length: ULONG): BOOLEAN; stdcall;
  7772. TFNRtlAssert = procedure(FailedAssertion: PVOID; FileName: PVOID; LineNumber: ULONG; Message: PCHAR); stdcall;
  7773. TFNRtlCaptureContext = procedure(ContextRecord: PCONTEXT); stdcall;
  7774. TFNRtlCharToInteger = function (Str: PCSZ; Base: ULONG; Value: PULONG): NTSTATUS; stdcall;
  7775. TFNRtlCheckForOrphanedCriticalSections = procedure(hThread: HANDLE); stdcall;
  7776. TFNRtlCheckRegistryKey = function (RelativeTo: ULONG; Path: PWSTR): NTSTATUS; stdcall;
  7777. TFNRtlClearAllBits = procedure(BitMapHeader: PRTL_BITMAP); stdcall;
  7778. TFNRtlClearBits = procedure(BitMapHeader: PRTL_BITMAP; StartingIndex: ULONG; NumberToClear: ULONG); stdcall;
  7779. TFNRtlCompactHeap = function (hHeap: HANDLE; dwFlags: ULONG): ULONG; stdcall;
  7780. TFNRtlCompareMemory = function (Source1: PVOID; Source2: PVOID; Length: SIZE_T): SIZE_T; stdcall;
  7781. TFNRtlCompareMemoryUlong = function (Source: PVOID; Length: ULONG; Value: ULONG): ULONG; stdcall;
  7782. TFNRtlCompareString = function (String1: PSTRING; String2: PSTRING; CaseInsensitive: BOOLEAN): LONG; stdcall;
  7783. TFNRtlCompareUnicodeString = function (String1: PUNICODE_STRING; String2: PUNICODE_STRING; CaseInsensitive: BOOLEAN): LONG; stdcall;
  7784. TFNRtlConvertLongToLargeInteger = function (SignedInteger: LONG): LARGE_INTEGER; stdcall;
  7785. TFNRtlConvertSidToUnicodeString = function (UnicodeString: PUNICODE_STRING; Sid: PSID; AllocateDestinationString: BOOLEAN): NTSTATUS; stdcall;
  7786. TFNRtlConvertUlongToLargeInteger = function (UnsignedInteger: ULONG): LARGE_INTEGER; stdcall;
  7787. TFNRtlCopyLuid = procedure(Destination: PLUID; Source: PLUID); stdcall;
  7788. TFNRtlCopyRangeList = function (CopyRangeList: PRTL_RANGE_LIST; RangeList: PRTL_RANGE_LIST): NTSTATUS; stdcall;
  7789. TFNRtlCopySecurityDescriptor = function (Source: PSECURITY_DESCRIPTOR; var Destination: PSECURITY_DESCRIPTOR): NTSTATUS; stdcall;
  7790. TFNRtlCopySid = function (DestinationLength: ULONG; Destination: PSID; Source: PSID): NTSTATUS; stdcall;
  7791. TFNRtlCopyString = procedure(DestinationString: PSTRING; SourceString: PSTRING); stdcall;
  7792. TFNRtlCopyUnicodeString = procedure(DestinationString: PUNICODE_STRING; SourceString: PUNICODE_STRING); stdcall;
  7793. TFNRtlCreateAcl = function (pAcl: PACL; nAclLength: DWORD; dwAclRevision: DWORD): NTSTATUS; stdcall;
  7794. TFNRtlCreateHeap = function (dwOptions: ULONG; Base: PVOID; dwMaximumSize: SIZE_T; dwInitialSize: SIZE_T; UnknownOptional1: PVOID; UnknownOptional2: PVOID): HANDLE; stdcall;
  7795. TFNRtlCreateProcessParameters = function (ProcessParameters: PPRTL_USER_PROCESS_PARAMETERS; ImageFile: PUNICODE_STRING; DllPath: PUNICODE_STRING; CurrentDirectory: PUNICODE_STRING; CommandLine: PUNICODE_STRING; CreationFlags: ULONG;
  7796. WindowTitle: PUNICODE_STRING; Desktop: PUNICODE_STRING; Reserved: PUNICODE_STRING; Reserved2: PUNICODE_STRING): NTSTATUS; stdcall;
  7797. TFNRtlCreateQueryDebugBuffer = function (Size: ULONG; EventPair: BOOLEAN): PDEBUG_BUFFER; stdcall;
  7798. TFNRtlCreateRegistryKey = function (RelativeTo: ULONG; Path: PWSTR): NTSTATUS; stdcall;
  7799. TFNRtlCreateSecurityDescriptor = function (SecurityDescriptor: PSECURITY_DESCRIPTOR; Revision: ULONG): NTSTATUS; stdcall;
  7800. TFNRtlCreateUnicodeString = function (DestinationString: PUNICODE_STRING; SourceString: PWSTR): BOOLEAN; stdcall;
  7801. TFNRtlCreateUnicodeStringFromAsciiz = function (DestinationString: PUNICODE_STRING; SourceString: PCHAR): BOOLEAN; stdcall;
  7802. TFNRtlCreateUserProcess = function (ImageFileName: PUNICODE_STRING; Attributes: ULONG; ProcessParameters: PRTL_USER_PROCESS_PARAMETERS; ProcessSecurityDescriptor: PSECURITY_DESCRIPTOR; ThreadSecurityDescriptor: PSECURITY_DESCRIPTOR;
  7803. ParentProcess: HANDLE; InheritHandles: BOOLEAN; DebugPort: HANDLE; ExceptionPort: HANDLE; ProcessInfo: PRTL_PROCESS_INFORMATION): NTSTATUS; stdcall;
  7804. TFNRtlCreateUserThread = function (hProcess: HANDLE; SecurityDescriptor: PSECURITY_DESCRIPTOR; CreateSuspended: BOOLEAN; StackZeroBits: ULONG; StackReserve: ULONG; StackCommit: ULONG; lpStartAddress: PTHREAD_START_ROUTINE;
  7805. lpParameter: PVOID; phThread: PHANDLE; ClientId: PCLIENT_ID): NTSTATUS; stdcall;
  7806. TFNRtlCutoverTimeToSystemTime = function (TargetTimeFields: PTIME_FIELDS; Time: PLARGE_INTEGER; CurrentTime: PLARGE_INTEGER; bUnknown: BOOLEAN): BOOLEAN; stdcall;
  7807. TFNRtlDeNormalizeProcessParams = function (ProcessParameters: PRTL_USER_PROCESS_PARAMETERS): PRTL_USER_PROCESS_PARAMETERS; stdcall;
  7808. TFNRtlDeleteAce = function (pAcl: PACL; dwAceIndex: DWORD): NTSTATUS; stdcall;
  7809. TFNRtlDeleteCriticalSection = procedure(lpCriticalSection: PRTL_CRITICAL_SECTION); stdcall;
  7810. TFNRtlDeleteOwnersRanges = function (RangeList: PRTL_RANGE_LIST; Owner: PVOID): NTSTATUS; stdcall;
  7811. TFNRtlDeleteRange = function (RangeList: PRTL_RANGE_LIST; Start: ULONGLONG; End_: ULONGLONG; Owner: PVOID): NTSTATUS; stdcall;
  7812. TFNRtlDeleteRegistryValue = function (RelativeTo: ULONG; Path: LPCWSTR; ValueName: LPCWSTR): NTSTATUS; stdcall;
  7813. TFNRtlDestroyHeap = function (HeapHandle: HANDLE): HANDLE; stdcall;
  7814. TFNRtlDestroyProcessParameters = function (ProcessParameters: PRTL_USER_PROCESS_PARAMETERS): NTSTATUS; stdcall;
  7815. TFNRtlDestroyQueryDebugBuffer = function (DebugBuffer: PDEBUG_BUFFER): NTSTATUS; stdcall;
  7816. TFNRtlDetermineDosPathNameType_U = function (wcsPathNameType: PWSTR): ULONG; stdcall;
  7817. TFNRtlDnsHostNameToComputerName = function (ComputerName: PUNICODE_STRING; DnsName: PUNICODE_STRING; AllocateComputerNameString: BOOLEAN): NTSTATUS; stdcall;
  7818. TFNRtlDoesFileExists_U = function (FileName: PWSTR): BOOLEAN; stdcall;
  7819. TFNRtlDosPathNameToNtPathName_U = function (DosName: PWSTR; var NtName: UNICODE_STRING; DosFilePath: PPWSTR; NtFilePath: PUNICODE_STRING): BOOLEAN; stdcall;
  7820. TFNRtlDosSearchPath_U = function (SearchPath: PWSTR; Name: PWSTR; Ext: PWSTR; cbBuf: ULONG; Buffer: PWSTR; var Shortname: PWSTR): ULONG; stdcall;
  7821. TFNRtlDowncaseUnicodeChar = function (Source: WCHAR): WCHAR; stdcall;
  7822. TFNRtlDowncaseUnicodeString = function (DestinationString: PUNICODE_STRING; SourceString: PUNICODE_STRING; AllocateDestinationString: BOOLEAN): NTSTATUS; stdcall;
  7823. TFNRtlDuplicateUnicodeString = function (AddTerminatingZero: ULONG; Source: PUNICODE_STRING; Destination: PUNICODE_STRING): NTSTATUS; stdcall;
  7824. TFNRtlEnableEarlyCriticalSectionEventCreation = procedure(); stdcall;
  7825. TFNRtlEnlargedIntegerMultiply = function (Multiplicand: LONG; Multiplier: LONG): LARGE_INTEGER; stdcall;
  7826. TFNRtlEnlargedUnsignedDivide = function (Dividend: ULARGE_INTEGER; Divisor: ULONG; Remainder: PULONG): ULONG; stdcall;
  7827. TFNRtlEnlargedUnsignedMultiply = function (Multiplicand: ULONG; Multiplier: ULONG): LARGE_INTEGER; stdcall;
  7828. TFNRtlEnterCriticalSection = procedure(lpCriticalSection: PRTL_CRITICAL_SECTION); stdcall;
  7829. TFNRtlEqualComputerName = function (String1: PUNICODE_STRING; String2: PUNICODE_STRING): BOOLEAN; stdcall;
  7830. TFNRtlEqualDomainName = function (String1: PUNICODE_STRING; String2: PUNICODE_STRING): BOOLEAN; stdcall;
  7831. TFNRtlEqualLuid = function (Luid1: PLUID; Luid2: PLUID): BOOLEAN; stdcall;
  7832. TFNRtlEqualPrefixSid = function (pSid1: PSID; pSid2: PSID): BOOLEAN; stdcall;
  7833. TFNRtlEqualSid = function (pSid1: PSID; pSid2: PSID): BOOLEAN; stdcall;
  7834. TFNRtlEqualString = function (String1: PSTRING; String2: PSTRING; CaseInsensitive: BOOLEAN): BOOLEAN; stdcall;
  7835. TFNRtlEqualUnicodeString = function (String1: PUNICODE_STRING; String2: PUNICODE_STRING; CaseInsensitive: BOOLEAN): BOOLEAN; stdcall;
  7836. TFNRtlEraseUnicodeString = procedure(Str: PUNICODE_STRING); stdcall;
  7837. TFNRtlExpandEnvironmentStrings_U = function (Environment: PVOID; Source: PUNICODE_STRING; Destination: PUNICODE_STRING; ReturnedLength: PULONG): NTSTATUS; stdcall;
  7838. TFNRtlExtendedIntegerMultiply = function (Multiplicand: LARGE_INTEGER; Multiplier: LONG): LARGE_INTEGER; stdcall;
  7839. TFNRtlExtendedLargeIntegerDivide = function (Dividend: LARGE_INTEGER; Divisor: ULONG; Remainder: PULONG): LARGE_INTEGER; stdcall;
  7840. TFNRtlExtendedMagicDivide = function (Dividend: LARGE_INTEGER; MagicDivisor: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall;
  7841. TFNRtlFillMemory = procedure(Destination: PVOID; Length: SIZE_T; Fill: UCHAR); stdcall;
  7842. TFNRtlFillMemoryUlong = procedure(Destination: PVOID; Length: ULONG; Fill: ULONG); stdcall;
  7843. TFNRtlFindCharInUnicodeString = function (dwFlags: ULONG; UnicodeString: PUNICODE_STRING; CharactersToFind: PUNICODE_STRING; Positions: PUSHORT): NTSTATUS; stdcall;
  7844. TFNRtlFindClearBits = function (BitMapHeader: PRTL_BITMAP; NumberToFind: ULONG; HintIndex: ULONG): ULONG; stdcall;
  7845. TFNRtlFindClearBitsAndSet = function (BitMapHeader: PRTL_BITMAP; NumberToFind: ULONG; HintIndex: ULONG): ULONG; stdcall;
  7846. TFNRtlFindLastBackwardRunClear = function (BitMapHeader: PRTL_BITMAP; FromIndex: ULONG; StartingRunIndex: PULONG): ULONG; stdcall;
  7847. TFNRtlFindLeastSignificantBit = function (Set_: ULONGLONG): CCHAR; stdcall;
  7848. TFNRtlFindLongestRunClear = function (BitMapHeader: PRTL_BITMAP; StartingIndex: PULONG): ULONG; stdcall;
  7849. TFNRtlFindMostSignificantBit = function (Set_: ULONGLONG): CCHAR; stdcall;
  7850. TFNRtlFindNextForwardRunClear = function (BitMapHeader: PRTL_BITMAP; FromIndex: ULONG; StartingRunIndex: PULONG): ULONG; stdcall;
  7851. TFNRtlFindRange = function (RangeList: PRTL_RANGE_LIST; Minimum: ULONGLONG; Maximum: ULONGLONG; Length: ULONG; Alignment: ULONG; Flags: ULONG; AttributeAvailableMask: UCHAR; Context: PVOID; Callback: PRTL_CONFLICT_RANGE_CALLBACK;
  7852. Start: PULONGLONG): NTSTATUS; stdcall;
  7853. TFNRtlFindSetBits = function (BitMapHeader: PRTL_BITMAP; NumberToFind: ULONG; HintIndex: ULONG): ULONG; stdcall;
  7854. TFNRtlFindSetBitsAndClear = function (BitMapHeader: PRTL_BITMAP; NumberToFind: ULONG; HintIndex: ULONG): ULONG; stdcall;
  7855. TFNRtlFirstFreeAce = function (pAcl: PACL; var pAce: PVOID): BOOLEAN; stdcall;
  7856. TFNRtlFormatCurrentUserKeyPath = function (CurrentUserKeyPath: PUNICODE_STRING): NTSTATUS; stdcall;
  7857. TFNRtlFreeAnsiString = procedure(AnsiString: PANSI_STRING); stdcall;
  7858. TFNRtlFreeHeap = function (hHeap: HANDLE; dwFlags: ULONG; MemoryPointer: PVOID): BOOLEAN; stdcall;
  7859. TFNRtlFreeOemString = procedure(OemString: POEM_STRING); stdcall;
  7860. TFNRtlFreeRangeList = procedure(RangeList: PRTL_RANGE_LIST); stdcall;
  7861. TFNRtlFreeSid = function (pSid: PSID): PVOID; stdcall;
  7862. TFNRtlFreeUnicodeString = procedure(UnicodeString: PUNICODE_STRING); stdcall;
  7863. TFNRtlGUIDFromString = function (GuidString: PUNICODE_STRING; Guid: LPGUID): NTSTATUS; stdcall;
  7864. TFNRtlGetAce = function (pAcl: PACL; dwAceIndex: DWORD; var pAce: PVOID): NTSTATUS; stdcall;
  7865. TFNRtlGetCallersAddress = procedure(CallersAddress: PPVOID; CallersCaller: PPVOID); stdcall;
  7866. TFNRtlGetControlSecurityDescriptor = function (pSecurityDescriptor: PSECURITY_DESCRIPTOR; var Control: SECURITY_DESCRIPTOR_CONTROL; var dwRevision: DWORD): NTSTATUS; stdcall;
  7867. TFNRtlGetCurrentDirectory_U = function (MaximumLength: ULONG; Buffer: PWSTR): ULONG; stdcall;
  7868. TFNRtlGetCurrentPeb = function (): PPEB; stdcall;
  7869. TFNRtlGetDaclSecurityDescriptor = function (pSecurityDescriptor: PSECURITY_DESCRIPTOR; var bDaclPresent: BOOLEAN; var Dacl: PACL; var bDaclDefaulted: BOOLEAN): NTSTATUS; stdcall;
  7870. TFNRtlGetFirstRange = function (RangeList: PRTL_RANGE_LIST; Iterator: PRTL_RANGE_LIST_ITERATOR; var Range: PRTL_RANGE): NTSTATUS; stdcall;
  7871. TFNRtlGetFullPathName_U = function (DosName: PWSTR; Size: ULONG; Buf: PWSTR; var Shortname: PWSTR): ULONG; stdcall;
  7872. TFNRtlGetGroupSecurityDescriptor = function (pSecurityDescriptor: PSECURITY_DESCRIPTOR; var pGroup: PSID; var bGroupDefaulted: BOOLEAN): NTSTATUS; stdcall;
  7873. TFNRtlGetLastNtStatus = function (): NTSTATUS; stdcall;
  7874. TFNRtlGetLongestNtPathLength = function (): ULONG; stdcall;
  7875. TFNRtlGetNextRange = function (Iterator: PRTL_RANGE_LIST_ITERATOR; var Range: PRTL_RANGE; MoveForwards: BOOLEAN): NTSTATUS; stdcall;
  7876. TFNRtlGetNtGlobalFlags = function (): ULONG; stdcall;
  7877. TFNRtlGetNtProductType = function (var ProductType: ULONG): BOOLEAN; stdcall;
  7878. TFNRtlGetNtVersionNumbers = procedure(var dwMajorVersion: ULONG; var dwMinorVersion: ULONG; UnknownCanBeNull: PDWORD); stdcall;
  7879. TFNRtlGetOwnerSecurityDescriptor = function (pSecurityDescriptor: PSECURITY_DESCRIPTOR; var pOwner: PSID; var OwnerDefaulted: BOOLEAN): NTSTATUS; stdcall;
  7880. TFNRtlGetProcessHeaps = function (ArraySize: ULONG; HeapArray: PHANDLE): ULONG; stdcall;
  7881. TFNRtlGetSaclSecurityDescriptor = function (pSecurityDescriptor: PSECURITY_DESCRIPTOR; var bSaclPresent: BOOLEAN; var Sacl: PACL; var bSaclDefaulted: BOOLEAN): NTSTATUS; stdcall;
  7882. TFNRtlGetVersion = function (lpVersionInformation: PRTL_OSVERSIONINFOW): NTSTATUS; stdcall;
  7883. TFNRtlIdentifierAuthoritySid = function (Sid: PSID): PSID_IDENTIFIER_AUTHORITY; stdcall;
  7884. TFNRtlImageDirectoryEntryToData = function (ImageBase: HMODULE; MappedAsImage: BOOLEAN; DirectoryEntry: USHORT; Size: PULONG): PVOID; stdcall;
  7885. TFNRtlImageNtHeader = function (ImageBase: HMODULE): PIMAGE_NT_HEADERS; stdcall;
  7886. TFNRtlImageNtHeaderEx = function (dwFlags: DWORD; ImageBase: HMODULE): PIMAGE_NT_HEADERS; stdcall;
  7887. TFNRtlImageRvaToSection = function (NtHeaders: PIMAGE_NT_HEADERS; ImageBase: HMODULE; Rva: ULONG): PIMAGE_SECTION_HEADER; stdcall;
  7888. TFNRtlImageRvaToVa = function (NtHeaders: PIMAGE_NT_HEADERS; ImageBase: HMODULE; Rva: ULONG; var LastRvaSection: PIMAGE_SECTION_HEADER): PVOID; stdcall;
  7889. TFNRtlImpersonateSelf = function (ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL): NTSTATUS; stdcall;
  7890. TFNRtlInitAnsiString = procedure(DestinationString: PANSI_STRING; SourceString: PCSZ); stdcall;
  7891. TFNRtlInitAnsiStringEx = function (DestinationString: PANSI_STRING; SourceString: PCSZ): NTSTATUS; stdcall;
  7892. TFNRtlInitString = procedure(DestinationString: PSTRING; SourceString: PCSZ); stdcall;
  7893. TFNRtlInitUnicodeString = procedure(DestinationString: PUNICODE_STRING; SourceString: LPCWSTR); stdcall;
  7894. TFNRtlInitUnicodeStringEx = function (DestinationString: PUNICODE_STRING; SourceString: LPCWSTR): NTSTATUS; stdcall;
  7895. TFNRtlInitializeBitMap = procedure(BitMapHeader: PRTL_BITMAP; BitMapBuffer: PULONG; SizeOfBitMap: ULONG); stdcall;
  7896. TFNRtlInitializeCriticalSection = function (lpCriticalSection: PRTL_CRITICAL_SECTION): NTSTATUS; stdcall;
  7897. TFNRtlInitializeCriticalSectionAndSpinCount = function (lpCriticalSection: PRTL_CRITICAL_SECTION; dwSpinCount: ULONG): NTSTATUS; stdcall;
  7898. TFNRtlInitializeRangeList = procedure(RangeList: PRTL_RANGE_LIST); stdcall;
  7899. TFNRtlInitializeSListHead = procedure(ListHead: PSLIST_HEADER); stdcall;
  7900. TFNRtlInitializeSid = function (pSid: PSID; pIdentifierAuthority: PSID_IDENTIFIER_AUTHORITY; nSubAuthorityCount: UCHAR): NTSTATUS; stdcall;
  7901. TFNRtlInt64ToUnicodeString = function (Value: ULONGLONG; Base: ULONG; Str: PUNICODE_STRING): NTSTATUS; stdcall;
  7902. TFNRtlIntegerToChar = function (Value: ULONG; Base: ULONG; Length: ULONG; Str: PCHAR): NTSTATUS; stdcall;
  7903. TFNRtlIntegerToUnicodeString = function (Value: ULONG; Base: ULONG; Str: PUNICODE_STRING): NTSTATUS; stdcall;
  7904. TFNRtlInterlockedFlushSList = function (ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
  7905. TFNRtlInterlockedPopEntrySList = function (ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
  7906. TFNRtlInterlockedPushEntrySList = function (ListHead: PSLIST_HEADER; ListEntry: PSLIST_ENTRY): PSLIST_ENTRY; stdcall;
  7907. TFNRtlInvertRangeList = function (InvertedRangeList: PRTL_RANGE_LIST; RangeList: PRTL_RANGE_LIST): NTSTATUS; stdcall;
  7908. TFNRtlIpv4AddressToStringA = function (IP: PULONG; Buffer: LPSTR): LPSTR; stdcall;
  7909. TFNRtlIpv4AddressToStringW = function (IP: PULONG; Buffer: LPWSTR): LPWSTR; stdcall;
  7910. TFNRtlIsDosDeviceName_U = function (TestString: LPCWSTR): ULONG; stdcall;
  7911. TFNRtlIsNameLegalDOS8Dot3 = function (Name: PUNICODE_STRING; OemName: POEM_STRING; NameContainsSpaces: PBOOLEAN): BOOLEAN; stdcall;
  7912. TFNRtlIsRangeAvailable = function (RangeList: PRTL_RANGE_LIST; Start: ULONGLONG; End_: ULONGLONG; Flags: ULONG; AttributeAvailableMask: UCHAR; Context: PVOID; Callback: PRTL_CONFLICT_RANGE_CALLBACK; Available: PBOOLEAN): NTSTATUS;
  7913. stdcall;
  7914. TFNRtlIsTextUnicode = function (lpBuffer: PVOID; cb: Integer; lpi: LPINT): BOOLEAN; stdcall;
  7915. TFNRtlLargeIntegerAdd = function (Addend1: LARGE_INTEGER; Addend2: LARGE_INTEGER): LARGE_INTEGER; stdcall;
  7916. TFNRtlLargeIntegerArithmeticShift = function (LargeInteger: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall;
  7917. TFNRtlLargeIntegerDivide = function (Dividend: LARGE_INTEGER; Divisor: LARGE_INTEGER; Remainder: PLARGE_INTEGER): LARGE_INTEGER; stdcall;
  7918. TFNRtlLargeIntegerNegate = function (NegateThis: LARGE_INTEGER): LARGE_INTEGER; stdcall;
  7919. TFNRtlLargeIntegerShiftLeft = function (LargeInteger: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall;
  7920. TFNRtlLargeIntegerShiftRight = function (LargeInteger: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall;
  7921. TFNRtlLargeIntegerSubtract = function (Number: LARGE_INTEGER; Subtrahend: LARGE_INTEGER): LARGE_INTEGER; stdcall;
  7922. TFNRtlLargeIntegerToChar = function (Value: PLARGE_INTEGER; Base: ULONG; BufferLength: ULONG; Buffer: PCHAR): NTSTATUS; stdcall;
  7923. TFNRtlLeaveCriticalSection = procedure(lpCriticalSection: PRTL_CRITICAL_SECTION); stdcall;
  7924. TFNRtlLengthRequiredSid = function (nSubAuthorityCount: ULONG): ULONG; stdcall;
  7925. TFNRtlLengthSecurityDescriptor = function (SecurityDescriptor: PSECURITY_DESCRIPTOR): ULONG; stdcall;
  7926. TFNRtlLengthSid = function (pSid: PSID): ULONG; stdcall;
  7927. TFNRtlLocalTimeToSystemTime = function (LocalTime: PLARGE_INTEGER; SystemTime: PLARGE_INTEGER): NTSTATUS; stdcall;
  7928. TFNRtlLockHeap = function (hHeap: PVOID): BOOLEAN; stdcall;
  7929. TFNRtlMakeSelfRelativeSD = function (pAbsoluteSD: PSECURITY_DESCRIPTOR; pSelfRelativeSD: PSECURITY_DESCRIPTOR; lpdwBufferLength: LPDWORD): NTSTATUS; stdcall;
  7930. TFNRtlMapGenericMask = procedure(AccessMask: PACCESS_MASK; GenericMapping: PGENERIC_MAPPING); stdcall;
  7931. TFNRtlMapSecurityErrorToNtStatus = function (SecurityError: DWORD): NTSTATUS; stdcall;
  7932. TFNRtlMergeRangeLists = function (MergedRangeList: PRTL_RANGE_LIST; RangeList1: PRTL_RANGE_LIST; RangeList2: PRTL_RANGE_LIST; Flags: ULONG): NTSTATUS; stdcall;
  7933. TFNRtlMoveMemory = procedure(Destination: PVOID; Source: PVOID; Length: SIZE_T); stdcall;
  7934. TFNRtlNormalizeProcessParams = function (ProcessParameters: PRTL_USER_PROCESS_PARAMETERS): PRTL_USER_PROCESS_PARAMETERS; stdcall;
  7935. TFNRtlNtStatusToDosError = function (Status: NTSTATUS): ULONG; stdcall;
  7936. TFNRtlNtStatusToDosErrorNoTeb = function (Status: NTSTATUS): ULONG; stdcall;
  7937. TFNRtlNumberOfClearBits = function (BitMapHeader: PRTL_BITMAP): ULONG; stdcall;
  7938. TFNRtlNumberOfSetBits = function (BitMapHeader: PRTL_BITMAP): ULONG; stdcall;
  7939. TFNRtlOemStringToUnicodeSize = function (AnsiString: POEM_STRING): ULONG; stdcall;
  7940. TFNRtlOemStringToUnicodeString = function (DestinationString: PUNICODE_STRING; SourceString: POEM_STRING; AllocateDestinationString: BOOLEAN): NTSTATUS; stdcall;
  7941. TFNRtlOemToUnicodeN = function (UnicodeString: PWSTR; UnicodeSize: ULONG; var ResultSize: ULONG; OemString: PCHAR; OemSize: ULONG): NTSTATUS; stdcall;
  7942. TFNRtlOpenCurrentUser = function (samDesired: ACCESS_MASK; phkResult: PHKEY): NTSTATUS; stdcall;
  7943. TFNRtlPrefixString = function (String1: PANSI_STRING; String2: PANSI_STRING; CaseInsensitive: BOOLEAN): BOOLEAN; stdcall;
  7944. TFNRtlPrefixUnicodeString = function (String1: PUNICODE_STRING; String2: PUNICODE_STRING; CaseInsensitive: BOOLEAN): BOOLEAN; stdcall;
  7945. TFNRtlQueryDepthSList = function (ListHead: PSLIST_HEADER): USHORT; stdcall;
  7946. TFNRtlQueryEnvironmentVariable_U = function (Environment: PVOID; VarName: PUNICODE_STRING; VarValue: PUNICODE_STRING): NTSTATUS; stdcall;
  7947. TFNRtlQueryInformationAcl = function (pAcl: PACL; pAclInformation: PVOID; nAclInformationLength: DWORD; dwAclInformationClass: ACL_INFORMATION_CLASS): NTSTATUS; stdcall;
  7948. TFNRtlQueryProcessDebugInformation = function (ProcessId: ULONG; DebugInfoClassMask: ULONG; DebugBuffer: PDEBUG_BUFFER): NTSTATUS; stdcall;
  7949. TFNRtlQueryRegistryValues = function (RelativeTo: ULONG; Path: LPCWSTR; QueryTable: PRTL_QUERY_REGISTRY_TABLE; Context: PVOID; Environment: PVOID): NTSTATUS; stdcall;
  7950. TFNRtlRaiseStatus = procedure(Status: NTSTATUS); stdcall;
  7951. TFNRtlRandom = function (Seed: PULONG): ULONG; stdcall;
  7952. TFNRtlRandomEx = function (Seed: PULONG): ULONG; stdcall;
  7953. TFNRtlReAllocateHeap = function (hHeap: HANDLE; dwFlags: ULONG; lpMem: PVOID; dwBytes: SIZE_T): PVOID; stdcall;
  7954. TFNRtlReleasePebLock = procedure(); stdcall;
  7955. TFNRtlRemoveVectoredExceptionHandler = function (VectoredHandlerHandle: PVOID): ULONG; stdcall;
  7956. TFNRtlRestoreLastWin32Error = procedure(dwErrCode: DWORD); stdcall;
  7957. TFNRtlRunDecodeUnicodeString = procedure(CodeSeed: UCHAR; StringToDecode: PUNICODE_STRING); stdcall;
  7958. TFNRtlRunEncodeUnicodeString = procedure(var CodeSeed: UCHAR; StringToEncode: PUNICODE_STRING); stdcall;
  7959. TFNRtlSecondsSince1970ToTime = procedure(SecondsSince1970: ULONG; Time: PLARGE_INTEGER); stdcall;
  7960. TFNRtlSecondsSince1980ToTime = procedure(SecondsSince1980: ULONG; Time: PLARGE_INTEGER); stdcall;
  7961. TFNRtlSelfRelativeToAbsoluteSD = function (pSelfRelativeSD: PSECURITY_DESCRIPTOR; pAbsoluteSD: PSECURITY_DESCRIPTOR; lpdwAbsoluteSDSize: LPDWORD; pDacl: PACL; lpdwDaclSize: LPDWORD; pSacl: PACL; lpdwSaclSize: LPDWORD; pOwner: PSID;
  7962. lpdwOwnerSize: LPDWORD; pPrimaryGroup: PSID; lpdwPrimaryGroupSize: LPDWORD): NTSTATUS; stdcall;
  7963. TFNRtlSetAllBits = procedure(BitMapHeader: PRTL_BITMAP); stdcall;
  7964. TFNRtlSetBits = procedure(BitMapHeader: PRTL_BITMAP; StartingIndex: ULONG; NumberToSet: ULONG); stdcall;
  7965. TFNRtlSetControlSecurityDescriptor = function (pSecurityDescriptor: PSECURITY_DESCRIPTOR; ControlBitsOfInterest: SECURITY_DESCRIPTOR_CONTROL; ControlBitsToSet: SECURITY_DESCRIPTOR_CONTROL): NTSTATUS; stdcall;
  7966. TFNRtlSetCriticalSectionSpinCount = function (lpCriticalSection: PRTL_CRITICAL_SECTION; dwSpinCount: ULONG): DWORD; stdcall;
  7967. TFNRtlSetCurrentDirectory_U = function (NewCurrentDirectory: PUNICODE_STRING): NTSTATUS; stdcall;
  7968. TFNRtlSetDaclSecurityDescriptor = function (SecurityDescriptor: PSECURITY_DESCRIPTOR; DaclPresent: BOOLEAN; Dacl: PACL; DaclDefaulted: BOOLEAN): NTSTATUS; stdcall;
  7969. TFNRtlSetGroupSecurityDescriptor = function (pSecurityDescriptor: PSECURITY_DESCRIPTOR; pGroup: PSID; bGroupDefaulted: BOOLEAN): NTSTATUS; stdcall;
  7970. TFNRtlSetInformationAcl = function (pAcl: PACL; pAclInformation: PVOID; nInformationLength: DWORD; dwAclInformationClass: ACL_INFORMATION_CLASS): NTSTATUS; stdcall;
  7971. TFNRtlSetLastWin32ErrorAndNtStatusFromNtStatus = function (Status: NTSTATUS): ULONG; stdcall;
  7972. TFNRtlSetOwnerSecurityDescriptor = function (pSecurityDescriptor: PSECURITY_DESCRIPTOR; pOwner: PSID; bOwnerDefaulted: BOOLEAN): NTSTATUS; stdcall;
  7973. TFNRtlSetProcessIsCritical = function (bIsCritical: BOOLEAN; pbOldIsCriticalValue: PBOOLEAN; bUnknownCanBeFalse: BOOLEAN): NTSTATUS; stdcall;
  7974. TFNRtlSetSaclSecurityDescriptor = function (pSecurityDescriptor: PSECURITY_DESCRIPTOR; bSaclPresent: BOOLEAN; pSacl: PACL; SaclDefaulted: BOOLEAN): NTSTATUS; stdcall;
  7975. TFNRtlSetThreadIsCritical = function (bIsCritical: BOOLEAN; pbOldIsCriticalValue: PBOOLEAN; bUnknownCanBeFalse: BOOLEAN): NTSTATUS; stdcall;
  7976. TFNRtlSizeHeap = function (hHeap: HANDLE; dwFlags: ULONG; lpMem: PVOID): SIZE_T; stdcall;
  7977. TFNRtlStringFromGUID = function (Guid: REFGUID; GuidString: PUNICODE_STRING): NTSTATUS; stdcall;
  7978. TFNRtlSubAuthorityCountSid = function (pSid: PSID): PUCHAR; stdcall;
  7979. TFNRtlSubAuthoritySid = function (pSid: PSID; nSubAuthority: DWORD): PDWORD; stdcall;
  7980. TFNRtlSystemTimeToLocalTime = function (SystemTime: PLARGE_INTEGER; LocalTime: PLARGE_INTEGER): NTSTATUS; stdcall;
  7981. TFNRtlTimeFieldsToTime = function (TimeFields: PTIME_FIELDS; Time: PLARGE_INTEGER): BOOLEAN; stdcall;
  7982. TFNRtlTimeToElapsedTimeFields = procedure(Time: PLARGE_INTEGER; TimeFields: PTIME_FIELDS); stdcall;
  7983. TFNRtlTimeToSecondsSince1970 = function (Time: PLARGE_INTEGER; ElapsedSeconds: PULONG): BOOLEAN; stdcall;
  7984. TFNRtlTimeToSecondsSince1980 = function (Time: PLARGE_INTEGER; ElapsedSeconds: PULONG): BOOLEAN; stdcall;
  7985. TFNRtlTimeToTimeFields = procedure(Time: PLARGE_INTEGER; TimeFields: PTIME_FIELDS); stdcall;
  7986. TFNRtlTryEnterCriticalSection = function (lpCriticalSection: PRTL_CRITICAL_SECTION): BOOL; stdcall;
  7987. TFNRtlUnicodeStringToAnsiSize = function (UnicodeString: PUNICODE_STRING): ULONG; stdcall;
  7988. TFNRtlUnicodeStringToAnsiString = function (DestinationString: PANSI_STRING; SourceString: PUNICODE_STRING; AllocateDestinationString: BOOLEAN): NTSTATUS; stdcall;
  7989. TFNRtlUnicodeStringToCountedOemString = function (DestinationString: POEM_STRING; SourceString: PUNICODE_STRING; AllocateDestinationString: BOOLEAN): NTSTATUS; stdcall;
  7990. TFNRtlUnicodeStringToInteger = function (Str: PUNICODE_STRING; Base: ULONG; Value: PULONG): NTSTATUS; stdcall;
  7991. TFNRtlUnicodeStringToOemSize = function (UnicodeString: PUNICODE_STRING): ULONG; stdcall;
  7992. TFNRtlUnicodeStringToOemString = function (DestinationString: POEM_STRING; SourceString: PCUNICODE_STRING; AllocateDestinationString: BOOLEAN): NTSTATUS; stdcall;
  7993. TFNRtlUnicodeToMultiByteSize = function (BytesInMultiByteString: PULONG; UnicodeString: PWSTR; BytesInUnicodeString: ULONG): NTSTATUS; stdcall;
  7994. TFNRtlUniform = function (Seed: PULONG): ULONG; stdcall;
  7995. TFNRtlUnwind = procedure(TargetFrame: PVOID; TargetIp: PVOID; ExceptionRecord: PEXCEPTION_RECORD; ReturnValue: PVOID); stdcall;
  7996. TFNRtlUpcaseUnicodeChar = function (SourceCharacter: WCHAR): WCHAR; stdcall;
  7997. TFNRtlUpcaseUnicodeString = function (DestinationString: PUNICODE_STRING; SourceString: PUNICODE_STRING; AllocateDestinationString: BOOLEAN): NTSTATUS; stdcall;
  7998. TFNRtlUpcaseUnicodeStringToAnsiString = function (DestinationString: PSTRING; SourceString: PUNICODE_STRING; AllocateDestinationString: BOOLEAN): NTSTATUS; stdcall;
  7999. TFNRtlUpcaseUnicodeStringToCountedOemString = function (DestinationString: PSTRING; SourceString: PUNICODE_STRING; AllocateDestinationString: BOOLEAN): NTSTATUS; stdcall;
  8000. TFNRtlUpcaseUnicodeStringToOemString = function (DestinationString: PSTRING; SourceString: PUNICODE_STRING; AllocateDestinationString: BOOLEAN): NTSTATUS; stdcall;
  8001. TFNRtlUpcaseUnicodeToMultiByteN = function (MbString: PCHAR; MbSize: ULONG; var ResultSize: ULONG; UnicodeString: PWSTR; UnicodeSize: ULONG): NTSTATUS; stdcall;
  8002. TFNRtlUpcaseUnicodeToOemN = function (OemString: PCHAR; OemSize: ULONG; var ResultSize: ULONG; UnicodeString: PWSTR; UnicodeSize: ULONG): NTSTATUS; stdcall;
  8003. TFNRtlUpperChar = function (Character: CHAR): CHAR; stdcall;
  8004. TFNRtlUpperString = procedure(DestinationString: PSTRING; SourceString: PSTRING); stdcall;
  8005. TFNRtlValidAcl = function (Acl: PACL): BOOLEAN; stdcall;
  8006. TFNRtlValidRelativeSecurityDescriptor = function (SecurityDescriptorInput: PSECURITY_DESCRIPTOR; SecurityDescriptorLength: ULONG; RequiredInformation: SECURITY_INFORMATION): BOOLEAN; stdcall;
  8007. TFNRtlValidSecurityDescriptor = function (SecurityDescriptor: PSECURITY_DESCRIPTOR): BOOLEAN; stdcall;
  8008. TFNRtlValidSid = function (pSid: PSID): BOOLEAN; stdcall;
  8009. TFNRtlValidateHeap = function (hHeap: HANDLE; dwFlags: ULONG; lpMem: LPCVOID): BOOL; stdcall;
  8010. TFNRtlValidateUnicodeString = function (dwMustBeNull: ULONG; ValidateThis: PUNICODE_STRING): NTSTATUS; stdcall;
  8011. TFNRtlVerifyVersionInfo = function (VersionInfo: PRTL_OSVERSIONINFOEXW; TypeMask: ULONG; ConditionMask: ULONGLONG): NTSTATUS; stdcall;
  8012. TFNRtlVolumeDeviceToDosName = function (VolumeDeviceObject: PVOID; DosName: PUNICODE_STRING): NTSTATUS; stdcall;
  8013. TFNRtlWriteRegistryValue = function (RelativeTo: ULONG; Path: LPCWSTR; ValueName: LPCWSTR; ValueType: ULONG; ValueData: PVOID; ValueLength: ULONG): NTSTATUS; stdcall;
  8014. TFNRtlZeroHeap = function (hHeap: HANDLE; dwFlags: ULONG): BOOLEAN; stdcall;
  8015. TFNRtlZeroMemory = procedure(Destination: PVOID; Length: SIZE_T); stdcall;
  8016. TFNRtlpNotOwnerCriticalSection = function (lpCriticalSection: PRTL_CRITICAL_SECTION): BOOLEAN; stdcall;
  8017. TFNRtlpNtCreateKey = function (KeyHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; Unused1: ULONG; Unused2: ULONG; Disposition: PULONG): NTSTATUS; stdcall;
  8018. TFNRtlpNtEnumerateSubKey = function (KeyHandle: HANDLE; SubKeyName: PUNICODE_STRING; Index: ULONG; Unused1: ULONG): NTSTATUS; stdcall;
  8019. TFNRtlpNtMakeTemporaryKey = function (KeyHandle: HANDLE): NTSTATUS; stdcall;
  8020. TFNRtlpNtOpenKey = function (KeyHandle: HANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; Unused: ULONG): NTSTATUS; stdcall;
  8021. TFNRtlpNtQueryValueKey = function (KeyHandle: HANDLE; Type_: PULONG; Data: PVOID; DataSize: PULONG; Unused: ULONG): NTSTATUS; stdcall;
  8022. TFNRtlpNtSetValueKey = function (KeyHandle: HANDLE; Type_: ULONG; Data: PVOID; DataSize: ULONG): NTSTATUS; stdcall;
  8023. TFNRtlxAnsiStringToUnicodeSize = function (AnsiString: PANSI_STRING): ULONG; stdcall;
  8024. TFNRtlxOemStringToUnicodeSize = function (AnsiString: POEM_STRING): ULONG; stdcall;
  8025. TFNRtlxUnicodeStringToAnsiSize = function (UnicodeString: PUNICODE_STRING): ULONG; stdcall;
  8026. TFNRtlxUnicodeStringToOemSize = function (UnicodeString: PUNICODE_STRING): ULONG; stdcall;
  8027. TFNVerSetConditionMask = function (ConditionMask: ULONGLONG; dwTypeMask: DWORD; Condition: BYTE): ULONGLONG; stdcall;
  8028. TFNZwAcceptConnectPort = TFNNtAcceptConnectPort;
  8029. TFNZwAccessCheck = TFNNtAccessCheck;
  8030. TFNZwAccessCheckAndAuditAlarm = TFNNtAccessCheckAndAuditAlarm;
  8031. TFNZwAccessCheckByType = TFNNtAccessCheckByType;
  8032. TFNZwAccessCheckByTypeAndAuditAlarm = TFNNtAccessCheckByTypeAndAuditAlarm;
  8033. TFNZwAccessCheckByTypeResultList = TFNNtAccessCheckByTypeResultList;
  8034. TFNZwAccessCheckByTypeResultListAndAuditAlarm = TFNNtAccessCheckByTypeResultListAndAuditAlarm;
  8035. TFNZwAccessCheckByTypeResultListAndAuditAlarmByHandle = TFNNtAccessCheckByTypeResultListAndAuditAlarmByHandle;
  8036. TFNZwAddAtom = TFNNtAddAtom;
  8037. TFNZwAdjustGroupsToken = TFNNtAdjustGroupsToken;
  8038. TFNZwAdjustPrivilegesToken = TFNNtAdjustPrivilegesToken;
  8039. TFNZwAlertResumeThread = TFNNtAlertResumeThread;
  8040. TFNZwAlertThread = TFNNtAlertThread;
  8041. TFNZwAllocateLocallyUniqueId = TFNNtAllocateLocallyUniqueId;
  8042. TFNZwAllocateUserPhysicalPages = TFNNtAllocateUserPhysicalPages;
  8043. TFNZwAllocateUuids = TFNNtAllocateUuids;
  8044. TFNZwAllocateVirtualMemory = TFNNtAllocateVirtualMemory;
  8045. TFNZwAreMappedFilesTheSame = TFNNtAreMappedFilesTheSame;
  8046. TFNZwAssignProcessToJobObject = TFNNtAssignProcessToJobObject;
  8047. TFNZwCallbackReturn = TFNNtCallbackReturn;
  8048. TFNZwCancelDeviceWakeupRequest = TFNNtCancelDeviceWakeupRequest;
  8049. TFNZwCancelIoFile = TFNNtCancelIoFile;
  8050. TFNZwCancelTimer = TFNNtCancelTimer;
  8051. TFNZwClearEvent = TFNNtClearEvent;
  8052. TFNZwClose = TFNNtClose;
  8053. TFNZwCloseObjectAuditAlarm = TFNNtCloseObjectAuditAlarm;
  8054. TFNZwCompleteConnectPort = TFNNtCompleteConnectPort;
  8055. TFNZwConnectPort = TFNNtConnectPort;
  8056. TFNZwContinue = TFNNtContinue;
  8057. TFNZwCreateChannel = TFNNtCreateChannel;
  8058. TFNZwCreateDirectoryObject = TFNNtCreateDirectoryObject;
  8059. TFNZwCreateEvent = TFNNtCreateEvent;
  8060. TFNZwCreateEventPair = TFNNtCreateEventPair;
  8061. TFNZwCreateFile = TFNNtCreateFile;
  8062. TFNZwCreateIoCompletion = TFNNtCreateIoCompletion;
  8063. TFNZwCreateJobObject = TFNNtCreateJobObject;
  8064. TFNZwCreateKey = TFNNtCreateKey;
  8065. TFNZwCreateMailslotFile = TFNNtCreateMailslotFile;
  8066. TFNZwCreateMutant = TFNNtCreateMutant;
  8067. TFNZwCreateNamedPipeFile = TFNNtCreateNamedPipeFile;
  8068. TFNZwCreatePagingFile = TFNNtCreatePagingFile;
  8069. TFNZwCreatePort = TFNNtCreatePort;
  8070. TFNZwCreateProcess = TFNNtCreateProcess;
  8071. TFNZwCreateProfile = TFNNtCreateProfile;
  8072. TFNZwCreateSection = TFNNtCreateSection;
  8073. TFNZwCreateSemaphore = TFNNtCreateSemaphore;
  8074. TFNZwCreateSymbolicLinkObject = TFNNtCreateSymbolicLinkObject;
  8075. TFNZwCreateThread = TFNNtCreateThread;
  8076. TFNZwCreateTimer = TFNNtCreateTimer;
  8077. TFNZwCreateToken = TFNNtCreateToken;
  8078. TFNZwCreateWaitablePort = TFNNtCreateWaitablePort;
  8079. TFNZwCurrentTeb = TFNNtCurrentTeb;
  8080. TFNZwDebugActiveProcess = TFNNtDebugActiveProcess;
  8081. TFNZwDelayExecution = TFNNtDelayExecution;
  8082. TFNZwDeleteAtom = TFNNtDeleteAtom;
  8083. TFNZwDeleteFile = TFNNtDeleteFile;
  8084. TFNZwDeleteKey = TFNNtDeleteKey;
  8085. TFNZwDeleteObjectAuditAlarm = TFNNtDeleteObjectAuditAlarm;
  8086. TFNZwDeleteValueKey = TFNNtDeleteValueKey;
  8087. TFNZwDeviceIoControlFile = TFNNtDeviceIoControlFile;
  8088. TFNZwDisplayString = TFNNtDisplayString;
  8089. TFNZwDuplicateObject = TFNNtDuplicateObject;
  8090. TFNZwDuplicateToken = TFNNtDuplicateToken;
  8091. TFNZwEnumerateKey = TFNNtEnumerateKey;
  8092. TFNZwEnumerateValueKey = TFNNtEnumerateValueKey;
  8093. TFNZwExtendSection = TFNNtExtendSection;
  8094. TFNZwFilterToken = TFNNtFilterToken;
  8095. TFNZwFindAtom = TFNNtFindAtom;
  8096. TFNZwFlushBuffersFile = TFNNtFlushBuffersFile;
  8097. TFNZwFlushInstructionCache = TFNNtFlushInstructionCache;
  8098. TFNZwFlushKey = TFNNtFlushKey;
  8099. TFNZwFlushVirtualMemory = TFNNtFlushVirtualMemory;
  8100. TFNZwFlushWriteBuffer = TFNNtFlushWriteBuffer;
  8101. TFNZwFreeUserPhysicalPages = TFNNtFreeUserPhysicalPages;
  8102. TFNZwFreeVirtualMemory = TFNNtFreeVirtualMemory;
  8103. TFNZwFsControlFile = TFNNtFsControlFile;
  8104. TFNZwGetContextThread = TFNNtGetContextThread;
  8105. TFNZwGetCurrentProcessorNumber = TFNNtGetCurrentProcessorNumber;
  8106. TFNZwGetDevicePowerState = TFNNtGetDevicePowerState;
  8107. TFNZwGetPlugPlayEvent = TFNNtGetPlugPlayEvent;
  8108. TFNZwGetTickCount = TFNNtGetTickCount;
  8109. TFNZwGetWriteWatch = TFNNtGetWriteWatch;
  8110. TFNZwImpersonateAnonymousToken = TFNNtImpersonateAnonymousToken;
  8111. TFNZwImpersonateClientOfPort = TFNNtImpersonateClientOfPort;
  8112. TFNZwImpersonateThread = TFNNtImpersonateThread;
  8113. TFNZwInitializeRegistry = TFNNtInitializeRegistry;
  8114. TFNZwInitiatePowerAction = TFNNtInitiatePowerAction;
  8115. TFNZwIsSystemResumeAutomatic = TFNNtIsSystemResumeAutomatic;
  8116. TFNZwListenChannel = TFNNtListenChannel;
  8117. TFNZwListenPort = TFNNtListenPort;
  8118. TFNZwLoadDriver = TFNNtLoadDriver;
  8119. TFNZwLoadKey = TFNNtLoadKey;
  8120. TFNZwLoadKey2 = TFNNtLoadKey2;
  8121. TFNZwLockFile = TFNNtLockFile;
  8122. TFNZwLockVirtualMemory = TFNNtLockVirtualMemory;
  8123. TFNZwMakePermanentObject = TFNNtMakePermanentObject;
  8124. TFNZwMakeTemporaryObject = TFNNtMakeTemporaryObject;
  8125. TFNZwMapUserPhysicalPages = TFNNtMapUserPhysicalPages;
  8126. TFNZwMapUserPhysicalPagesScatter = TFNNtMapUserPhysicalPagesScatter;
  8127. TFNZwMapViewOfSection = TFNNtMapViewOfSection;
  8128. TFNZwNotifyChangeDirectoryFile = TFNNtNotifyChangeDirectoryFile;
  8129. TFNZwNotifyChangeKey = TFNNtNotifyChangeKey;
  8130. TFNZwNotifyChangeMultipleKeys = TFNNtNotifyChangeMultipleKeys;
  8131. TFNZwOpenChannel = TFNNtOpenChannel;
  8132. TFNZwOpenDirectoryObject = TFNNtOpenDirectoryObject;
  8133. TFNZwOpenEvent = TFNNtOpenEvent;
  8134. TFNZwOpenEventPair = TFNNtOpenEventPair;
  8135. TFNZwOpenFile = TFNNtOpenFile;
  8136. TFNZwOpenIoCompletion = TFNNtOpenIoCompletion;
  8137. TFNZwOpenJobObject = TFNNtOpenJobObject;
  8138. TFNZwOpenKey = TFNNtOpenKey;
  8139. TFNZwOpenMutant = TFNNtOpenMutant;
  8140. TFNZwOpenObjectAuditAlarm = TFNNtOpenObjectAuditAlarm;
  8141. TFNZwOpenProcess = TFNNtOpenProcess;
  8142. TFNZwOpenProcessToken = TFNNtOpenProcessToken;
  8143. TFNZwOpenSection = TFNNtOpenSection;
  8144. TFNZwOpenSemaphore = TFNNtOpenSemaphore;
  8145. TFNZwOpenSymbolicLinkObject = TFNNtOpenSymbolicLinkObject;
  8146. TFNZwOpenThread = TFNNtOpenThread;
  8147. TFNZwOpenThreadToken = TFNNtOpenThreadToken;
  8148. TFNZwOpenTimer = TFNNtOpenTimer;
  8149. TFNZwPlugPlayControl = TFNNtPlugPlayControl;
  8150. TFNZwPowerInformation = TFNNtPowerInformation;
  8151. TFNZwPrivilegeCheck = TFNNtPrivilegeCheck;
  8152. TFNZwPrivilegeObjectAuditAlarm = TFNNtPrivilegeObjectAuditAlarm;
  8153. TFNZwPrivilegedServiceAuditAlarm = TFNNtPrivilegedServiceAuditAlarm;
  8154. TFNZwProtectVirtualMemory = TFNNtProtectVirtualMemory;
  8155. TFNZwPulseEvent = TFNNtPulseEvent;
  8156. TFNZwQueryAttributesFile = TFNNtQueryAttributesFile;
  8157. TFNZwQueryDefaultLocale = TFNNtQueryDefaultLocale;
  8158. TFNZwQueryDefaultUILanguage = TFNNtQueryDefaultUILanguage;
  8159. TFNZwQueryDirectoryFile = TFNNtQueryDirectoryFile;
  8160. TFNZwQueryDirectoryObject = TFNNtQueryDirectoryObject;
  8161. TFNZwQueryEaFile = TFNNtQueryEaFile;
  8162. TFNZwQueryEvent = TFNNtQueryEvent;
  8163. TFNZwQueryFullAttributesFile = TFNNtQueryFullAttributesFile;
  8164. TFNZwQueryInformationAtom = TFNNtQueryInformationAtom;
  8165. TFNZwQueryInformationFile = TFNNtQueryInformationFile;
  8166. TFNZwQueryInformationJobObject = TFNNtQueryInformationJobObject;
  8167. TFNZwQueryInformationPort = TFNNtQueryInformationPort;
  8168. TFNZwQueryInformationProcess = TFNNtQueryInformationProcess;
  8169. TFNZwQueryInformationThread = TFNNtQueryInformationThread;
  8170. TFNZwQueryInformationToken = TFNNtQueryInformationToken;
  8171. TFNZwQueryInstallUILanguage = TFNNtQueryInstallUILanguage;
  8172. TFNZwQueryIntervalProfile = TFNNtQueryIntervalProfile;
  8173. TFNZwQueryIoCompletion = TFNNtQueryIoCompletion;
  8174. TFNZwQueryKey = TFNNtQueryKey;
  8175. TFNZwQueryMultipleValueKey = TFNNtQueryMultipleValueKey;
  8176. TFNZwQueryMutant = TFNNtQueryMutant;
  8177. TFNZwQueryObject = TFNNtQueryObject;
  8178. TFNZwQueryOpenSubKeys = TFNNtQueryOpenSubKeys;
  8179. TFNZwQueryPerformanceCounter = TFNNtQueryPerformanceCounter;
  8180. TFNZwQueryPortInformationProcess = TFNNtQueryPortInformationProcess;
  8181. TFNZwQueryQuotaInformationFile = TFNNtQueryQuotaInformationFile;
  8182. TFNZwQuerySection = TFNNtQuerySection;
  8183. TFNZwQuerySecurityObject = TFNNtQuerySecurityObject;
  8184. TFNZwQuerySemaphore = TFNNtQuerySemaphore;
  8185. TFNZwQuerySymbolicLinkObject = TFNNtQuerySymbolicLinkObject;
  8186. TFNZwQuerySystemEnvironmentValue = TFNNtQuerySystemEnvironmentValue;
  8187. TFNZwQuerySystemInformation = TFNNtQuerySystemInformation;
  8188. TFNZwQuerySystemTime = TFNNtQuerySystemTime;
  8189. TFNZwQueryTimer = TFNNtQueryTimer;
  8190. TFNZwQueryTimerResolution = TFNNtQueryTimerResolution;
  8191. TFNZwQueryValueKey = TFNNtQueryValueKey;
  8192. TFNZwQueryVirtualMemory = TFNNtQueryVirtualMemory;
  8193. TFNZwQueryVolumeInformationFile = TFNNtQueryVolumeInformationFile;
  8194. TFNZwQueueApcThread = TFNNtQueueApcThread;
  8195. TFNZwRaiseException = TFNNtRaiseException;
  8196. TFNZwRaiseHardError = TFNNtRaiseHardError;
  8197. TFNZwReadFile = TFNNtReadFile;
  8198. TFNZwReadFileScatter = TFNNtReadFileScatter;
  8199. TFNZwReadRequestData = TFNNtReadRequestData;
  8200. TFNZwReadVirtualMemory = TFNNtReadVirtualMemory;
  8201. TFNZwRegisterThreadTerminatePort = TFNNtRegisterThreadTerminatePort;
  8202. TFNZwReleaseMutant = TFNNtReleaseMutant;
  8203. TFNZwReleaseSemaphore = TFNNtReleaseSemaphore;
  8204. TFNZwRemoveIoCompletion = TFNNtRemoveIoCompletion;
  8205. TFNZwRemoveProcessDebug = TFNNtRemoveProcessDebug;
  8206. TFNZwReplaceKey = TFNNtReplaceKey;
  8207. TFNZwReplyPort = TFNNtReplyPort;
  8208. TFNZwReplyWaitReceivePort = TFNNtReplyWaitReceivePort;
  8209. TFNZwReplyWaitReceivePortEx = TFNNtReplyWaitReceivePortEx;
  8210. TFNZwReplyWaitReplyPort = TFNNtReplyWaitReplyPort;
  8211. TFNZwReplyWaitSendChannel = TFNNtReplyWaitSendChannel;
  8212. TFNZwRequestDeviceWakeup = TFNNtRequestDeviceWakeup;
  8213. TFNZwRequestPort = TFNNtRequestPort;
  8214. TFNZwRequestWaitReplyPort = TFNNtRequestWaitReplyPort;
  8215. TFNZwRequestWakeupLatency = TFNNtRequestWakeupLatency;
  8216. TFNZwResetEvent = TFNNtResetEvent;
  8217. TFNZwResetWriteWatch = TFNNtResetWriteWatch;
  8218. TFNZwRestoreKey = TFNNtRestoreKey;
  8219. TFNZwResumeProcess = TFNNtResumeProcess;
  8220. TFNZwResumeThread = TFNNtResumeThread;
  8221. TFNZwSaveKey = TFNNtSaveKey;
  8222. TFNZwSaveKeyEx = TFNNtSaveKeyEx;
  8223. TFNZwSaveMergedKeys = TFNNtSaveMergedKeys;
  8224. TFNZwSecureConnectPort = TFNNtSecureConnectPort;
  8225. TFNZwSendWaitReplyChannel = TFNNtSendWaitReplyChannel;
  8226. TFNZwSetContextChannel = TFNNtSetContextChannel;
  8227. TFNZwSetContextThread = TFNNtSetContextThread;
  8228. TFNZwSetDefaultHardErrorPort = TFNNtSetDefaultHardErrorPort;
  8229. TFNZwSetDefaultLocale = TFNNtSetDefaultLocale;
  8230. TFNZwSetDefaultUILanguage = TFNNtSetDefaultUILanguage;
  8231. TFNZwSetEaFile = TFNNtSetEaFile;
  8232. TFNZwSetEvent = TFNNtSetEvent;
  8233. TFNZwSetHighEventPair = TFNNtSetHighEventPair;
  8234. TFNZwSetHighWaitLowEventPair = TFNNtSetHighWaitLowEventPair;
  8235. TFNZwSetHighWaitLowThread = TFNNtSetHighWaitLowThread;
  8236. TFNZwSetInformationFile = TFNNtSetInformationFile;
  8237. TFNZwSetInformationJobObject = TFNNtSetInformationJobObject;
  8238. TFNZwSetInformationKey = TFNNtSetInformationKey;
  8239. TFNZwSetInformationObject = TFNNtSetInformationObject;
  8240. TFNZwSetInformationProcess = TFNNtSetInformationProcess;
  8241. TFNZwSetInformationThread = TFNNtSetInformationThread;
  8242. TFNZwSetInformationToken = TFNNtSetInformationToken;
  8243. TFNZwSetIntervalProfile = TFNNtSetIntervalProfile;
  8244. TFNZwSetIoCompletion = TFNNtSetIoCompletion;
  8245. TFNZwSetLdtEntries = TFNNtSetLdtEntries;
  8246. TFNZwSetLowEventPair = TFNNtSetLowEventPair;
  8247. TFNZwSetLowWaitHighEventPair = TFNNtSetLowWaitHighEventPair;
  8248. TFNZwSetLowWaitHighThread = TFNNtSetLowWaitHighThread;
  8249. TFNZwSetQuotaInformationFile = TFNNtSetQuotaInformationFile;
  8250. TFNZwSetSecurityObject = TFNNtSetSecurityObject;
  8251. TFNZwSetSystemEnvironmentValue = TFNNtSetSystemEnvironmentValue;
  8252. TFNZwSetSystemInformation = TFNNtSetSystemInformation;
  8253. TFNZwSetSystemPowerState = TFNNtSetSystemPowerState;
  8254. TFNZwSetSystemTime = TFNNtSetSystemTime;
  8255. TFNZwSetThreadExecutionState = TFNNtSetThreadExecutionState;
  8256. TFNZwSetTimer = TFNNtSetTimer;
  8257. TFNZwSetTimerResolution = TFNNtSetTimerResolution;
  8258. TFNZwSetUuidSeed = TFNNtSetUuidSeed;
  8259. TFNZwSetValueKey = TFNNtSetValueKey;
  8260. TFNZwSetVolumeInformationFile = TFNNtSetVolumeInformationFile;
  8261. TFNZwShutdownSystem = TFNNtShutdownSystem;
  8262. TFNZwSignalAndWaitForSingleObject = TFNNtSignalAndWaitForSingleObject;
  8263. TFNZwStartProfile = TFNNtStartProfile;
  8264. TFNZwStopProfile = TFNNtStopProfile;
  8265. TFNZwSuspendProcess = TFNNtSuspendProcess;
  8266. TFNZwSuspendThread = TFNNtSuspendThread;
  8267. TFNZwSystemDebugControl = TFNNtSystemDebugControl;
  8268. TFNZwTerminateJobObject = TFNNtTerminateJobObject;
  8269. TFNZwTerminateProcess = TFNNtTerminateProcess;
  8270. TFNZwTerminateThread = TFNNtTerminateThread;
  8271. TFNZwTestAlert = TFNNtTestAlert;
  8272. TFNZwUnloadDriver = TFNNtUnloadDriver;
  8273. TFNZwUnloadKey = TFNNtUnloadKey;
  8274. TFNZwUnlockFile = TFNNtUnlockFile;
  8275. TFNZwUnlockVirtualMemory = TFNNtUnlockVirtualMemory;
  8276. TFNZwUnmapViewOfSection = TFNNtUnmapViewOfSection;
  8277. TFNZwVdmControl = TFNNtVdmControl;
  8278. TFNZwW32Call = TFNNtW32Call;
  8279. TFNZwWaitForMultipleObjects = TFNNtWaitForMultipleObjects;
  8280. TFNZwWaitForSingleObject = TFNNtWaitForSingleObject;
  8281. TFNZwWaitHighEventPair = TFNNtWaitHighEventPair;
  8282. TFNZwWaitLowEventPair = TFNNtWaitLowEventPair;
  8283. TFNZwWriteFile = TFNNtWriteFile;
  8284. TFNZwWriteFileGather = TFNNtWriteFileGather;
  8285. TFNZwWriteRequestData = TFNNtWriteRequestData;
  8286. TFNZwWriteVirtualMemory = TFNNtWriteVirtualMemory;
  8287. TFNZwYieldExecution = TFNNtYieldExecution;
  8288. /// (Global) function pointers
  8289. var
  8290. _CsrGetProcessId : Pointer = nil;
  8291. _DbgQueryDebugFilterState : Pointer = nil;
  8292. _DbgSetDebugFilterState : Pointer = nil;
  8293. _KiRaiseUserExceptionDispatcher : Pointer = nil;
  8294. _LdrAccessResource : Pointer = nil;
  8295. _LdrAlternateResourcesEnabled : Pointer = nil;
  8296. _LdrDisableThreadCalloutsForDll : Pointer = nil;
  8297. _LdrGetDllHandle : Pointer = nil;
  8298. _LdrGetProcedureAddress : Pointer = nil;
  8299. _LdrLoadDll : Pointer = nil;
  8300. _LdrQueryImageFileExecutionOptions : Pointer = nil;
  8301. _LdrQueryProcessModuleInformation : Pointer = nil;
  8302. _LdrShutdownProcess : Pointer = nil;
  8303. _LdrShutdownThread : Pointer = nil;
  8304. _LdrUnloadDll : Pointer = nil;
  8305. _NtAcceptConnectPort : Pointer = nil;
  8306. _NtAccessCheck : Pointer = nil;
  8307. _NtAccessCheckAndAuditAlarm : Pointer = nil;
  8308. _NtAccessCheckByType : Pointer = nil;
  8309. _NtAccessCheckByTypeAndAuditAlarm : Pointer = nil;
  8310. _NtAccessCheckByTypeResultList : Pointer = nil;
  8311. _NtAccessCheckByTypeResultListAndAuditAlarm : Pointer = nil;
  8312. _NtAccessCheckByTypeResultListAndAuditAlarmByHandle : Pointer = nil;
  8313. _NtAddAtom : Pointer = nil;
  8314. _NtAdjustGroupsToken : Pointer = nil;
  8315. _NtAdjustPrivilegesToken : Pointer = nil;
  8316. _NtAlertResumeThread : Pointer = nil;
  8317. _NtAlertThread : Pointer = nil;
  8318. _NtAllocateLocallyUniqueId : Pointer = nil;
  8319. _NtAllocateUserPhysicalPages : Pointer = nil;
  8320. _NtAllocateUuids : Pointer = nil;
  8321. _NtAllocateVirtualMemory : Pointer = nil;
  8322. _NtAreMappedFilesTheSame : Pointer = nil;
  8323. _NtAssignProcessToJobObject : Pointer = nil;
  8324. _NtCallbackReturn : Pointer = nil;
  8325. _NtCancelDeviceWakeupRequest : Pointer = nil;
  8326. _NtCancelIoFile : Pointer = nil;
  8327. _NtCancelTimer : Pointer = nil;
  8328. _NtClearEvent : Pointer = nil;
  8329. _NtClose : Pointer = nil;
  8330. _NtCloseObjectAuditAlarm : Pointer = nil;
  8331. _NtCompleteConnectPort : Pointer = nil;
  8332. _NtConnectPort : Pointer = nil;
  8333. _NtContinue : Pointer = nil;
  8334. _NtCreateChannel : Pointer = nil;
  8335. _NtCreateDirectoryObject : Pointer = nil;
  8336. _NtCreateEvent : Pointer = nil;
  8337. _NtCreateEventPair : Pointer = nil;
  8338. _NtCreateFile : Pointer = nil;
  8339. _NtCreateIoCompletion : Pointer = nil;
  8340. _NtCreateJobObject : Pointer = nil;
  8341. _NtCreateKey : Pointer = nil;
  8342. _NtCreateMailslotFile : Pointer = nil;
  8343. _NtCreateMutant : Pointer = nil;
  8344. _NtCreateNamedPipeFile : Pointer = nil;
  8345. _NtCreatePagingFile : Pointer = nil;
  8346. _NtCreatePort : Pointer = nil;
  8347. _NtCreateProcess : Pointer = nil;
  8348. _NtCreateProfile : Pointer = nil;
  8349. _NtCreateSection : Pointer = nil;
  8350. _NtCreateSemaphore : Pointer = nil;
  8351. _NtCreateSymbolicLinkObject : Pointer = nil;
  8352. _NtCreateThread : Pointer = nil;
  8353. _NtCreateTimer : Pointer = nil;
  8354. _NtCreateToken : Pointer = nil;
  8355. _NtCreateWaitablePort : Pointer = nil;
  8356. _NtCurrentTeb : Pointer = nil;
  8357. _NtDebugActiveProcess : Pointer = nil;
  8358. _NtDelayExecution : Pointer = nil;
  8359. _NtDeleteAtom : Pointer = nil;
  8360. _NtDeleteFile : Pointer = nil;
  8361. _NtDeleteKey : Pointer = nil;
  8362. _NtDeleteObjectAuditAlarm : Pointer = nil;
  8363. _NtDeleteValueKey : Pointer = nil;
  8364. _NtDeviceIoControlFile : Pointer = nil;
  8365. _NtDisplayString : Pointer = nil;
  8366. _NtDuplicateObject : Pointer = nil;
  8367. _NtDuplicateToken : Pointer = nil;
  8368. _NtEnumerateKey : Pointer = nil;
  8369. _NtEnumerateValueKey : Pointer = nil;
  8370. _NtExtendSection : Pointer = nil;
  8371. _NtFilterToken : Pointer = nil;
  8372. _NtFindAtom : Pointer = nil;
  8373. _NtFlushBuffersFile : Pointer = nil;
  8374. _NtFlushInstructionCache : Pointer = nil;
  8375. _NtFlushKey : Pointer = nil;
  8376. _NtFlushVirtualMemory : Pointer = nil;
  8377. _NtFlushWriteBuffer : Pointer = nil;
  8378. _NtFreeUserPhysicalPages : Pointer = nil;
  8379. _NtFreeVirtualMemory : Pointer = nil;
  8380. _NtFsControlFile : Pointer = nil;
  8381. _NtGetContextThread : Pointer = nil;
  8382. _NtGetCurrentProcessorNumber : Pointer = nil;
  8383. _NtGetDevicePowerState : Pointer = nil;
  8384. _NtGetPlugPlayEvent : Pointer = nil;
  8385. _NtGetTickCount : Pointer = nil;
  8386. _NtGetWriteWatch : Pointer = nil;
  8387. _NtImpersonateAnonymousToken : Pointer = nil;
  8388. _NtImpersonateClientOfPort : Pointer = nil;
  8389. _NtImpersonateThread : Pointer = nil;
  8390. _NtInitializeRegistry : Pointer = nil;
  8391. _NtInitiatePowerAction : Pointer = nil;
  8392. _NtIsSystemResumeAutomatic : Pointer = nil;
  8393. _NtListenChannel : Pointer = nil;
  8394. _NtListenPort : Pointer = nil;
  8395. _NtLoadDriver : Pointer = nil;
  8396. _NtLoadKey : Pointer = nil;
  8397. _NtLoadKey2 : Pointer = nil;
  8398. _NtLockFile : Pointer = nil;
  8399. _NtLockVirtualMemory : Pointer = nil;
  8400. _NtMakePermanentObject : Pointer = nil;
  8401. _NtMakeTemporaryObject : Pointer = nil;
  8402. _NtMapUserPhysicalPages : Pointer = nil;
  8403. _NtMapUserPhysicalPagesScatter : Pointer = nil;
  8404. _NtMapViewOfSection : Pointer = nil;
  8405. _NtNotifyChangeDirectoryFile : Pointer = nil;
  8406. _NtNotifyChangeKey : Pointer = nil;
  8407. _NtNotifyChangeMultipleKeys : Pointer = nil;
  8408. _NtOpenChannel : Pointer = nil;
  8409. _NtOpenDirectoryObject : Pointer = nil;
  8410. _NtOpenEvent : Pointer = nil;
  8411. _NtOpenEventPair : Pointer = nil;
  8412. _NtOpenFile : Pointer = nil;
  8413. _NtOpenIoCompletion : Pointer = nil;
  8414. _NtOpenJobObject : Pointer = nil;
  8415. _NtOpenKey : Pointer = nil;
  8416. _NtOpenMutant : Pointer = nil;
  8417. _NtOpenObjectAuditAlarm : Pointer = nil;
  8418. _NtOpenProcess : Pointer = nil;
  8419. _NtOpenProcessToken : Pointer = nil;
  8420. _NtOpenSection : Pointer = nil;
  8421. _NtOpenSemaphore : Pointer = nil;
  8422. _NtOpenSymbolicLinkObject : Pointer = nil;
  8423. _NtOpenThread : Pointer = nil;
  8424. _NtOpenThreadToken : Pointer = nil;
  8425. _NtOpenTimer : Pointer = nil;
  8426. _NtPlugPlayControl : Pointer = nil;
  8427. _NtPowerInformation : Pointer = nil;
  8428. _NtPrivilegeCheck : Pointer = nil;
  8429. _NtPrivilegeObjectAuditAlarm : Pointer = nil;
  8430. _NtPrivilegedServiceAuditAlarm : Pointer = nil;
  8431. _NtProtectVirtualMemory : Pointer = nil;
  8432. _NtPulseEvent : Pointer = nil;
  8433. _NtQueryAttributesFile : Pointer = nil;
  8434. _NtQueryDefaultLocale : Pointer = nil;
  8435. _NtQueryDefaultUILanguage : Pointer = nil;
  8436. _NtQueryDirectoryFile : Pointer = nil;
  8437. _NtQueryDirectoryObject : Pointer = nil;
  8438. _NtQueryEaFile : Pointer = nil;
  8439. _NtQueryEvent : Pointer = nil;
  8440. _NtQueryFullAttributesFile : Pointer = nil;
  8441. _NtQueryInformationAtom : Pointer = nil;
  8442. _NtQueryInformationFile : Pointer = nil;
  8443. _NtQueryInformationJobObject : Pointer = nil;
  8444. _NtQueryInformationPort : Pointer = nil;
  8445. _NtQueryInformationProcess : Pointer = nil;
  8446. _NtQueryInformationThread : Pointer = nil;
  8447. _NtQueryInformationToken : Pointer = nil;
  8448. _NtQueryInstallUILanguage : Pointer = nil;
  8449. _NtQueryIntervalProfile : Pointer = nil;
  8450. _NtQueryIoCompletion : Pointer = nil;
  8451. _NtQueryKey : Pointer = nil;
  8452. _NtQueryMultipleValueKey : Pointer = nil;
  8453. _NtQueryMutant : Pointer = nil;
  8454. _NtQueryObject : Pointer = nil;
  8455. _NtQueryOpenSubKeys : Pointer = nil;
  8456. _NtQueryPerformanceCounter : Pointer = nil;
  8457. _NtQueryPortInformationProcess : Pointer = nil;
  8458. _NtQueryQuotaInformationFile : Pointer = nil;
  8459. _NtQuerySection : Pointer = nil;
  8460. _NtQuerySecurityObject : Pointer = nil;
  8461. _NtQuerySemaphore : Pointer = nil;
  8462. _NtQuerySymbolicLinkObject : Pointer = nil;
  8463. _NtQuerySystemEnvironmentValue : Pointer = nil;
  8464. _NtQuerySystemInformation : Pointer = nil;
  8465. _NtQuerySystemTime : Pointer = nil;
  8466. _NtQueryTimer : Pointer = nil;
  8467. _NtQueryTimerResolution : Pointer = nil;
  8468. _NtQueryValueKey : Pointer = nil;
  8469. _NtQueryVirtualMemory : Pointer = nil;
  8470. _NtQueryVolumeInformationFile : Pointer = nil;
  8471. _NtQueueApcThread : Pointer = nil;
  8472. _NtRaiseException : Pointer = nil;
  8473. _NtRaiseHardError : Pointer = nil;
  8474. _NtReadFile : Pointer = nil;
  8475. _NtReadFileScatter : Pointer = nil;
  8476. _NtReadRequestData : Pointer = nil;
  8477. _NtReadVirtualMemory : Pointer = nil;
  8478. _NtRegisterThreadTerminatePort : Pointer = nil;
  8479. _NtReleaseMutant : Pointer = nil;
  8480. _NtReleaseSemaphore : Pointer = nil;
  8481. _NtRemoveIoCompletion : Pointer = nil;
  8482. _NtRemoveProcessDebug : Pointer = nil;
  8483. _NtReplaceKey : Pointer = nil;
  8484. _NtReplyPort : Pointer = nil;
  8485. _NtReplyWaitReceivePort : Pointer = nil;
  8486. _NtReplyWaitReceivePortEx : Pointer = nil;
  8487. _NtReplyWaitReplyPort : Pointer = nil;
  8488. _NtReplyWaitSendChannel : Pointer = nil;
  8489. _NtRequestDeviceWakeup : Pointer = nil;
  8490. _NtRequestPort : Pointer = nil;
  8491. _NtRequestWaitReplyPort : Pointer = nil;
  8492. _NtRequestWakeupLatency : Pointer = nil;
  8493. _NtResetEvent : Pointer = nil;
  8494. _NtResetWriteWatch : Pointer = nil;
  8495. _NtRestoreKey : Pointer = nil;
  8496. _NtResumeProcess : Pointer = nil;
  8497. _NtResumeThread : Pointer = nil;
  8498. _NtSaveKey : Pointer = nil;
  8499. _NtSaveKeyEx : Pointer = nil;
  8500. _NtSaveMergedKeys : Pointer = nil;
  8501. _NtSecureConnectPort : Pointer = nil;
  8502. _NtSendWaitReplyChannel : Pointer = nil;
  8503. _NtSetContextChannel : Pointer = nil;
  8504. _NtSetContextThread : Pointer = nil;
  8505. _NtSetDefaultHardErrorPort : Pointer = nil;
  8506. _NtSetDefaultLocale : Pointer = nil;
  8507. _NtSetDefaultUILanguage : Pointer = nil;
  8508. _NtSetEaFile : Pointer = nil;
  8509. _NtSetEvent : Pointer = nil;
  8510. _NtSetHighEventPair : Pointer = nil;
  8511. _NtSetHighWaitLowEventPair : Pointer = nil;
  8512. _NtSetHighWaitLowThread : Pointer = nil;
  8513. _NtSetInformationFile : Pointer = nil;
  8514. _NtSetInformationJobObject : Pointer = nil;
  8515. _NtSetInformationKey : Pointer = nil;
  8516. _NtSetInformationObject : Pointer = nil;
  8517. _NtSetInformationProcess : Pointer = nil;
  8518. _NtSetInformationThread : Pointer = nil;
  8519. _NtSetInformationToken : Pointer = nil;
  8520. _NtSetIntervalProfile : Pointer = nil;
  8521. _NtSetIoCompletion : Pointer = nil;
  8522. _NtSetLdtEntries : Pointer = nil;
  8523. _NtSetLowEventPair : Pointer = nil;
  8524. _NtSetLowWaitHighEventPair : Pointer = nil;
  8525. _NtSetLowWaitHighThread : Pointer = nil;
  8526. _NtSetQuotaInformationFile : Pointer = nil;
  8527. _NtSetSecurityObject : Pointer = nil;
  8528. _NtSetSystemEnvironmentValue : Pointer = nil;
  8529. _NtSetSystemInformation : Pointer = nil;
  8530. _NtSetSystemPowerState : Pointer = nil;
  8531. _NtSetSystemTime : Pointer = nil;
  8532. _NtSetThreadExecutionState : Pointer = nil;
  8533. _NtSetTimer : Pointer = nil;
  8534. _NtSetTimerResolution : Pointer = nil;
  8535. _NtSetUuidSeed : Pointer = nil;
  8536. _NtSetValueKey : Pointer = nil;
  8537. _NtSetVolumeInformationFile : Pointer = nil;
  8538. _NtShutdownSystem : Pointer = nil;
  8539. _NtSignalAndWaitForSingleObject : Pointer = nil;
  8540. _NtStartProfile : Pointer = nil;
  8541. _NtStopProfile : Pointer = nil;
  8542. _NtSuspendProcess : Pointer = nil;
  8543. _NtSuspendThread : Pointer = nil;
  8544. _NtSystemDebugControl : Pointer = nil;
  8545. _NtTerminateJobObject : Pointer = nil;
  8546. _NtTerminateProcess : Pointer = nil;
  8547. _NtTerminateThread : Pointer = nil;
  8548. _NtTestAlert : Pointer = nil;
  8549. _NtUnloadDriver : Pointer = nil;
  8550. _NtUnloadKey : Pointer = nil;
  8551. _NtUnlockFile : Pointer = nil;
  8552. _NtUnlockVirtualMemory : Pointer = nil;
  8553. _NtUnmapViewOfSection : Pointer = nil;
  8554. _NtVdmControl : Pointer = nil;
  8555. _NtW32Call : Pointer = nil;
  8556. _NtWaitForMultipleObjects : Pointer = nil;
  8557. _NtWaitForSingleObject : Pointer = nil;
  8558. _NtWaitHighEventPair : Pointer = nil;
  8559. _NtWaitLowEventPair : Pointer = nil;
  8560. _NtWriteFile : Pointer = nil;
  8561. _NtWriteFileGather : Pointer = nil;
  8562. _NtWriteRequestData : Pointer = nil;
  8563. _NtWriteVirtualMemory : Pointer = nil;
  8564. _NtYieldExecution : Pointer = nil;
  8565. _RtlAbsoluteToSelfRelativeSD : Pointer = nil;
  8566. _RtlAcquirePebLock : Pointer = nil;
  8567. _RtlAddAccessAllowedAce : Pointer = nil;
  8568. _RtlAddAccessAllowedAceEx : Pointer = nil;
  8569. _RtlAddAccessDeniedAce : Pointer = nil;
  8570. _RtlAddAccessDeniedAceEx : Pointer = nil;
  8571. _RtlAddAce : Pointer = nil;
  8572. _RtlAddAuditAccessAce : Pointer = nil;
  8573. _RtlAddAuditAccessAceEx : Pointer = nil;
  8574. _RtlAddRange : Pointer = nil;
  8575. _RtlAddVectoredExceptionHandler : Pointer = nil;
  8576. _RtlAdjustPrivilege : Pointer = nil;
  8577. _RtlAllocateAndInitializeSid : Pointer = nil;
  8578. _RtlAllocateHeap : Pointer = nil;
  8579. _RtlAnsiCharToUnicodeChar : Pointer = nil;
  8580. _RtlAnsiStringToUnicodeSize : Pointer = nil;
  8581. _RtlAnsiStringToUnicodeString : Pointer = nil;
  8582. _RtlAppendAsciizToString : Pointer = nil;
  8583. _RtlAppendStringToString : Pointer = nil;
  8584. _RtlAppendUnicodeStringToString : Pointer = nil;
  8585. _RtlAppendUnicodeToString : Pointer = nil;
  8586. _RtlAreAllAccessesGranted : Pointer = nil;
  8587. _RtlAreAnyAccessesGranted : Pointer = nil;
  8588. _RtlAreBitsClear : Pointer = nil;
  8589. _RtlAreBitsSet : Pointer = nil;
  8590. _RtlAssert : Pointer = nil;
  8591. _RtlCaptureContext : Pointer = nil;
  8592. _RtlCharToInteger : Pointer = nil;
  8593. _RtlCheckForOrphanedCriticalSections : Pointer = nil;
  8594. _RtlCheckRegistryKey : Pointer = nil;
  8595. _RtlClearAllBits : Pointer = nil;
  8596. _RtlClearBits : Pointer = nil;
  8597. _RtlCompactHeap : Pointer = nil;
  8598. _RtlCompareMemory : Pointer = nil;
  8599. _RtlCompareMemoryUlong : Pointer = nil;
  8600. _RtlCompareString : Pointer = nil;
  8601. _RtlCompareUnicodeString : Pointer = nil;
  8602. _RtlConvertLongToLargeInteger : Pointer = nil;
  8603. _RtlConvertSidToUnicodeString : Pointer = nil;
  8604. _RtlConvertUlongToLargeInteger : Pointer = nil;
  8605. _RtlCopyLuid : Pointer = nil;
  8606. _RtlCopyRangeList : Pointer = nil;
  8607. _RtlCopySecurityDescriptor : Pointer = nil;
  8608. _RtlCopySid : Pointer = nil;
  8609. _RtlCopyString : Pointer = nil;
  8610. _RtlCopyUnicodeString : Pointer = nil;
  8611. _RtlCreateAcl : Pointer = nil;
  8612. _RtlCreateHeap : Pointer = nil;
  8613. _RtlCreateProcessParameters : Pointer = nil;
  8614. _RtlCreateQueryDebugBuffer : Pointer = nil;
  8615. _RtlCreateRegistryKey : Pointer = nil;
  8616. _RtlCreateSecurityDescriptor : Pointer = nil;
  8617. _RtlCreateUnicodeString : Pointer = nil;
  8618. _RtlCreateUnicodeStringFromAsciiz : Pointer = nil;
  8619. _RtlCreateUserProcess : Pointer = nil;
  8620. _RtlCreateUserThread : Pointer = nil;
  8621. _RtlCutoverTimeToSystemTime : Pointer = nil;
  8622. _RtlDeNormalizeProcessParams : Pointer = nil;
  8623. _RtlDeleteAce : Pointer = nil;
  8624. _RtlDeleteCriticalSection : Pointer = nil;
  8625. _RtlDeleteOwnersRanges : Pointer = nil;
  8626. _RtlDeleteRange : Pointer = nil;
  8627. _RtlDeleteRegistryValue : Pointer = nil;
  8628. _RtlDestroyHeap : Pointer = nil;
  8629. _RtlDestroyProcessParameters : Pointer = nil;
  8630. _RtlDestroyQueryDebugBuffer : Pointer = nil;
  8631. _RtlDetermineDosPathNameType_U : Pointer = nil;
  8632. _RtlDnsHostNameToComputerName : Pointer = nil;
  8633. _RtlDoesFileExists_U : Pointer = nil;
  8634. _RtlDosPathNameToNtPathName_U : Pointer = nil;
  8635. _RtlDosSearchPath_U : Pointer = nil;
  8636. _RtlDowncaseUnicodeChar : Pointer = nil;
  8637. _RtlDowncaseUnicodeString : Pointer = nil;
  8638. _RtlDuplicateUnicodeString : Pointer = nil;
  8639. _RtlEnableEarlyCriticalSectionEventCreation : Pointer = nil;
  8640. _RtlEnlargedIntegerMultiply : Pointer = nil;
  8641. _RtlEnlargedUnsignedDivide : Pointer = nil;
  8642. _RtlEnlargedUnsignedMultiply : Pointer = nil;
  8643. _RtlEnterCriticalSection : Pointer = nil;
  8644. _RtlEqualComputerName : Pointer = nil;
  8645. _RtlEqualDomainName : Pointer = nil;
  8646. _RtlEqualLuid : Pointer = nil;
  8647. _RtlEqualPrefixSid : Pointer = nil;
  8648. _RtlEqualSid : Pointer = nil;
  8649. _RtlEqualString : Pointer = nil;
  8650. _RtlEqualUnicodeString : Pointer = nil;
  8651. _RtlEraseUnicodeString : Pointer = nil;
  8652. _RtlExpandEnvironmentStrings_U : Pointer = nil;
  8653. _RtlExtendedIntegerMultiply : Pointer = nil;
  8654. _RtlExtendedLargeIntegerDivide : Pointer = nil;
  8655. _RtlExtendedMagicDivide : Pointer = nil;
  8656. _RtlFillMemory : Pointer = nil;
  8657. _RtlFillMemoryUlong : Pointer = nil;
  8658. _RtlFindCharInUnicodeString : Pointer = nil;
  8659. _RtlFindClearBits : Pointer = nil;
  8660. _RtlFindClearBitsAndSet : Pointer = nil;
  8661. _RtlFindLastBackwardRunClear : Pointer = nil;
  8662. _RtlFindLeastSignificantBit : Pointer = nil;
  8663. _RtlFindLongestRunClear : Pointer = nil;
  8664. _RtlFindMostSignificantBit : Pointer = nil;
  8665. _RtlFindNextForwardRunClear : Pointer = nil;
  8666. _RtlFindRange : Pointer = nil;
  8667. _RtlFindSetBits : Pointer = nil;
  8668. _RtlFindSetBitsAndClear : Pointer = nil;
  8669. _RtlFirstFreeAce : Pointer = nil;
  8670. _RtlFormatCurrentUserKeyPath : Pointer = nil;
  8671. _RtlFreeAnsiString : Pointer = nil;
  8672. _RtlFreeHeap : Pointer = nil;
  8673. _RtlFreeOemString : Pointer = nil;
  8674. _RtlFreeRangeList : Pointer = nil;
  8675. _RtlFreeSid : Pointer = nil;
  8676. _RtlFreeUnicodeString : Pointer = nil;
  8677. _RtlGUIDFromString : Pointer = nil;
  8678. _RtlGetAce : Pointer = nil;
  8679. _RtlGetCallersAddress : Pointer = nil;
  8680. _RtlGetControlSecurityDescriptor : Pointer = nil;
  8681. _RtlGetCurrentDirectory_U : Pointer = nil;
  8682. _RtlGetCurrentPeb : Pointer = nil;
  8683. _RtlGetDaclSecurityDescriptor : Pointer = nil;
  8684. _RtlGetFirstRange : Pointer = nil;
  8685. _RtlGetFullPathName_U : Pointer = nil;
  8686. _RtlGetGroupSecurityDescriptor : Pointer = nil;
  8687. _RtlGetLastNtStatus : Pointer = nil;
  8688. _RtlGetLongestNtPathLength : Pointer = nil;
  8689. _RtlGetNextRange : Pointer = nil;
  8690. _RtlGetNtGlobalFlags : Pointer = nil;
  8691. _RtlGetNtProductType : Pointer = nil;
  8692. _RtlGetNtVersionNumbers : Pointer = nil;
  8693. _RtlGetOwnerSecurityDescriptor : Pointer = nil;
  8694. _RtlGetProcessHeaps : Pointer = nil;
  8695. _RtlGetSaclSecurityDescriptor : Pointer = nil;
  8696. _RtlGetVersion : Pointer = nil;
  8697. _RtlIdentifierAuthoritySid : Pointer = nil;
  8698. _RtlImageDirectoryEntryToData : Pointer = nil;
  8699. _RtlImageNtHeader : Pointer = nil;
  8700. _RtlImageNtHeaderEx : Pointer = nil;
  8701. _RtlImageRvaToSection : Pointer = nil;
  8702. _RtlImageRvaToVa : Pointer = nil;
  8703. _RtlImpersonateSelf : Pointer = nil;
  8704. _RtlInitAnsiString : Pointer = nil;
  8705. _RtlInitAnsiStringEx : Pointer = nil;
  8706. _RtlInitString : Pointer = nil;
  8707. _RtlInitUnicodeString : Pointer = nil;
  8708. _RtlInitUnicodeStringEx : Pointer = nil;
  8709. _RtlInitializeBitMap : Pointer = nil;
  8710. _RtlInitializeCriticalSection : Pointer = nil;
  8711. _RtlInitializeCriticalSectionAndSpinCount : Pointer = nil;
  8712. _RtlInitializeRangeList : Pointer = nil;
  8713. _RtlInitializeSListHead : Pointer = nil;
  8714. _RtlInitializeSid : Pointer = nil;
  8715. _RtlInt64ToUnicodeString : Pointer = nil;
  8716. _RtlIntegerToChar : Pointer = nil;
  8717. _RtlIntegerToUnicodeString : Pointer = nil;
  8718. _RtlInterlockedFlushSList : Pointer = nil;
  8719. _RtlInterlockedPopEntrySList : Pointer = nil;
  8720. _RtlInterlockedPushEntrySList : Pointer = nil;
  8721. _RtlInvertRangeList : Pointer = nil;
  8722. _RtlIpv4AddressToStringA : Pointer = nil;
  8723. _RtlIpv4AddressToStringW : Pointer = nil;
  8724. _RtlIsDosDeviceName_U : Pointer = nil;
  8725. _RtlIsNameLegalDOS8Dot3 : Pointer = nil;
  8726. _RtlIsRangeAvailable : Pointer = nil;
  8727. _RtlIsTextUnicode : Pointer = nil;
  8728. _RtlLargeIntegerAdd : Pointer = nil;
  8729. _RtlLargeIntegerArithmeticShift : Pointer = nil;
  8730. _RtlLargeIntegerDivide : Pointer = nil;
  8731. _RtlLargeIntegerNegate : Pointer = nil;
  8732. _RtlLargeIntegerShiftLeft : Pointer = nil;
  8733. _RtlLargeIntegerShiftRight : Pointer = nil;
  8734. _RtlLargeIntegerSubtract : Pointer = nil;
  8735. _RtlLargeIntegerToChar : Pointer = nil;
  8736. _RtlLeaveCriticalSection : Pointer = nil;
  8737. _RtlLengthRequiredSid : Pointer = nil;
  8738. _RtlLengthSecurityDescriptor : Pointer = nil;
  8739. _RtlLengthSid : Pointer = nil;
  8740. _RtlLocalTimeToSystemTime : Pointer = nil;
  8741. _RtlLockHeap : Pointer = nil;
  8742. _RtlMakeSelfRelativeSD : Pointer = nil;
  8743. _RtlMapGenericMask : Pointer = nil;
  8744. _RtlMapSecurityErrorToNtStatus : Pointer = nil;
  8745. _RtlMergeRangeLists : Pointer = nil;
  8746. _RtlMoveMemory : Pointer = nil;
  8747. _RtlNormalizeProcessParams : Pointer = nil;
  8748. _RtlNtStatusToDosError : Pointer = nil;
  8749. _RtlNtStatusToDosErrorNoTeb : Pointer = nil;
  8750. _RtlNumberOfClearBits : Pointer = nil;
  8751. _RtlNumberOfSetBits : Pointer = nil;
  8752. _RtlOemStringToUnicodeSize : Pointer = nil;
  8753. _RtlOemStringToUnicodeString : Pointer = nil;
  8754. _RtlOemToUnicodeN : Pointer = nil;
  8755. _RtlOpenCurrentUser : Pointer = nil;
  8756. _RtlPrefixString : Pointer = nil;
  8757. _RtlPrefixUnicodeString : Pointer = nil;
  8758. _RtlQueryDepthSList : Pointer = nil;
  8759. _RtlQueryEnvironmentVariable_U : Pointer = nil;
  8760. _RtlQueryInformationAcl : Pointer = nil;
  8761. _RtlQueryProcessDebugInformation : Pointer = nil;
  8762. _RtlQueryRegistryValues : Pointer = nil;
  8763. _RtlRaiseStatus : Pointer = nil;
  8764. _RtlRandom : Pointer = nil;
  8765. _RtlRandomEx : Pointer = nil;
  8766. _RtlReAllocateHeap : Pointer = nil;
  8767. _RtlReleasePebLock : Pointer = nil;
  8768. _RtlRemoveVectoredExceptionHandler : Pointer = nil;
  8769. _RtlRestoreLastWin32Error : Pointer = nil;
  8770. _RtlRunDecodeUnicodeString : Pointer = nil;
  8771. _RtlRunEncodeUnicodeString : Pointer = nil;
  8772. _RtlSecondsSince1970ToTime : Pointer = nil;
  8773. _RtlSecondsSince1980ToTime : Pointer = nil;
  8774. _RtlSelfRelativeToAbsoluteSD : Pointer = nil;
  8775. _RtlSetAllBits : Pointer = nil;
  8776. _RtlSetBits : Pointer = nil;
  8777. _RtlSetControlSecurityDescriptor : Pointer = nil;
  8778. _RtlSetCriticalSectionSpinCount : Pointer = nil;
  8779. _RtlSetCurrentDirectory_U : Pointer = nil;
  8780. _RtlSetDaclSecurityDescriptor : Pointer = nil;
  8781. _RtlSetGroupSecurityDescriptor : Pointer = nil;
  8782. _RtlSetInformationAcl : Pointer = nil;
  8783. _RtlSetLastWin32ErrorAndNtStatusFromNtStatus : Pointer = nil;
  8784. _RtlSetOwnerSecurityDescriptor : Pointer = nil;
  8785. _RtlSetProcessIsCritical : Pointer = nil;
  8786. _RtlSetSaclSecurityDescriptor : Pointer = nil;
  8787. _RtlSetThreadIsCritical : Pointer = nil;
  8788. _RtlSizeHeap : Pointer = nil;
  8789. _RtlStringFromGUID : Pointer = nil;
  8790. _RtlSubAuthorityCountSid : Pointer = nil;
  8791. _RtlSubAuthoritySid : Pointer = nil;
  8792. _RtlSystemTimeToLocalTime : Pointer = nil;
  8793. _RtlTimeFieldsToTime : Pointer = nil;
  8794. _RtlTimeToElapsedTimeFields : Pointer = nil;
  8795. _RtlTimeToSecondsSince1970 : Pointer = nil;
  8796. _RtlTimeToSecondsSince1980 : Pointer = nil;
  8797. _RtlTimeToTimeFields : Pointer = nil;
  8798. _RtlTryEnterCriticalSection : Pointer = nil;
  8799. _RtlUnicodeStringToAnsiSize : Pointer = nil;
  8800. _RtlUnicodeStringToAnsiString : Pointer = nil;
  8801. _RtlUnicodeStringToCountedOemString : Pointer = nil;
  8802. _RtlUnicodeStringToInteger : Pointer = nil;
  8803. _RtlUnicodeStringToOemSize : Pointer = nil;
  8804. _RtlUnicodeStringToOemString : Pointer = nil;
  8805. _RtlUnicodeToMultiByteSize : Pointer = nil;
  8806. _RtlUniform : Pointer = nil;
  8807. _RtlUnwind : Pointer = nil;
  8808. _RtlUpcaseUnicodeChar : Pointer = nil;
  8809. _RtlUpcaseUnicodeString : Pointer = nil;
  8810. _RtlUpcaseUnicodeStringToAnsiString : Pointer = nil;
  8811. _RtlUpcaseUnicodeStringToCountedOemString : Pointer = nil;
  8812. _RtlUpcaseUnicodeStringToOemString : Pointer = nil;
  8813. _RtlUpcaseUnicodeToMultiByteN : Pointer = nil;
  8814. _RtlUpcaseUnicodeToOemN : Pointer = nil;
  8815. _RtlUpperChar : Pointer = nil;
  8816. _RtlUpperString : Pointer = nil;
  8817. _RtlValidAcl : Pointer = nil;
  8818. _RtlValidRelativeSecurityDescriptor : Pointer = nil;
  8819. _RtlValidSecurityDescriptor : Pointer = nil;
  8820. _RtlValidSid : Pointer = nil;
  8821. _RtlValidateHeap : Pointer = nil;
  8822. _RtlValidateUnicodeString : Pointer = nil;
  8823. _RtlVerifyVersionInfo : Pointer = nil;
  8824. _RtlVolumeDeviceToDosName : Pointer = nil;
  8825. _RtlWriteRegistryValue : Pointer = nil;
  8826. _RtlZeroHeap : Pointer = nil;
  8827. _RtlZeroMemory : Pointer = nil;
  8828. _RtlpNotOwnerCriticalSection : Pointer = nil;
  8829. _RtlpNtCreateKey : Pointer = nil;
  8830. _RtlpNtEnumerateSubKey : Pointer = nil;
  8831. _RtlpNtMakeTemporaryKey : Pointer = nil;
  8832. _RtlpNtOpenKey : Pointer = nil;
  8833. _RtlpNtQueryValueKey : Pointer = nil;
  8834. _RtlpNtSetValueKey : Pointer = nil;
  8835. _RtlxAnsiStringToUnicodeSize : Pointer = nil;
  8836. _RtlxOemStringToUnicodeSize : Pointer = nil;
  8837. _RtlxUnicodeStringToAnsiSize : Pointer = nil;
  8838. _RtlxUnicodeStringToOemSize : Pointer = nil;
  8839. _VerSetConditionMask : Pointer = nil;
  8840. // Dynamic version of CsrGetProcessId
  8841. function CsrGetProcessId(): DWORD; stdcall;
  8842. begin
  8843. GetProcedureAddress(_CsrGetProcessId, ntdll, 'CsrGetProcessId');
  8844. Result := TFNCsrGetProcessId(_CsrGetProcessId)();
  8845. end;
  8846. // Dynamic version of DbgQueryDebugFilterState
  8847. function DbgQueryDebugFilterState(
  8848. ComponentId : ULONG;
  8849. Level : ULONG
  8850. ): NTSTATUS; stdcall;
  8851. begin
  8852. GetProcedureAddress(_DbgQueryDebugFilterState, ntdll, 'DbgQueryDebugFilterState');
  8853. Result := TFNDbgQueryDebugFilterState(_DbgQueryDebugFilterState)(
  8854. ComponentId, Level
  8855. );
  8856. end;
  8857. // Dynamic version of DbgSetDebugFilterState
  8858. function DbgSetDebugFilterState(
  8859. ComponentId : ULONG;
  8860. Level : ULONG;
  8861. State : BOOLEAN
  8862. ): NTSTATUS; stdcall;
  8863. begin
  8864. GetProcedureAddress(_DbgSetDebugFilterState, ntdll, 'DbgSetDebugFilterState');
  8865. Result := TFNDbgSetDebugFilterState(_DbgSetDebugFilterState)(
  8866. ComponentId, Level, State
  8867. );
  8868. end;
  8869. // Dynamic version of KiRaiseUserExceptionDispatcher
  8870. function KiRaiseUserExceptionDispatcher(): ULONG; stdcall;
  8871. begin
  8872. GetProcedureAddress(_KiRaiseUserExceptionDispatcher, ntdll, 'KiRaiseUserExceptionDispatcher');
  8873. Result := TFNKiRaiseUserExceptionDispatcher(_KiRaiseUserExceptionDispatcher)();
  8874. end;
  8875. // Dynamic version of LdrAccessResource
  8876. function LdrAccessResource(
  8877. hModule : HANDLE;
  8878. ResourceDataEntry : PIMAGE_RESOURCE_DATA_ENTRY;
  8879. Address : PPVOID;
  8880. dwSize : PULONG
  8881. ): NTSTATUS; stdcall;
  8882. begin
  8883. GetProcedureAddress(_LdrAccessResource, ntdll, 'LdrAccessResource');
  8884. Result := TFNLdrAccessResource(_LdrAccessResource)(
  8885. hModule, ResourceDataEntry, Address, dwSize
  8886. );
  8887. end;
  8888. // Dynamic version of LdrAlternateResourcesEnabled
  8889. function LdrAlternateResourcesEnabled(): BOOLEAN; stdcall;
  8890. begin
  8891. GetProcedureAddress(_LdrAlternateResourcesEnabled, ntdll, 'LdrAlternateResourcesEnabled');
  8892. Result := TFNLdrAlternateResourcesEnabled(_LdrAlternateResourcesEnabled)();
  8893. end;
  8894. // Dynamic version of LdrDisableThreadCalloutsForDll
  8895. function LdrDisableThreadCalloutsForDll(
  8896. hModule : HANDLE
  8897. ): NTSTATUS; stdcall;
  8898. begin
  8899. GetProcedureAddress(_LdrDisableThreadCalloutsForDll, ntdll, 'LdrDisableThreadCalloutsForDll');
  8900. Result := TFNLdrDisableThreadCalloutsForDll(_LdrDisableThreadCalloutsForDll)(
  8901. hModule
  8902. );
  8903. end;
  8904. // Dynamic version of LdrGetDllHandle
  8905. function LdrGetDllHandle(
  8906. pwPath : PWORD;
  8907. pReserved : PVOID;
  8908. pusPath : PUNICODE_STRING;
  8909. var phModule : HANDLE
  8910. ): NTSTATUS; stdcall;
  8911. begin
  8912. GetProcedureAddress(_LdrGetDllHandle, ntdll, 'LdrGetDllHandle');
  8913. Result := TFNLdrGetDllHandle(_LdrGetDllHandle)(
  8914. pwPath, pReserved, pusPath, phModule
  8915. );
  8916. end;
  8917. // Dynamic version of LdrGetProcedureAddress
  8918. function LdrGetProcedureAddress(
  8919. hModule : HANDLE;
  8920. dwOrdinal : ULONG;
  8921. psName : PSTRING;
  8922. var pProcedure : PVOID
  8923. ): NTSTATUS; stdcall;
  8924. begin
  8925. GetProcedureAddress(_LdrGetProcedureAddress, ntdll, 'LdrGetProcedureAddress');
  8926. Result := TFNLdrGetProcedureAddress(_LdrGetProcedureAddress)(
  8927. hModule, dwOrdinal, psName, pProcedure
  8928. );
  8929. end;
  8930. // Dynamic version of LdrLoadDll
  8931. function LdrLoadDll(
  8932. pwPath : PWORD;
  8933. pdwFlags : PDWORD;
  8934. pusPath : PUNICODE_STRING;
  8935. var phModule : HANDLE
  8936. ): NTSTATUS; stdcall;
  8937. begin
  8938. GetProcedureAddress(_LdrLoadDll, ntdll, 'LdrLoadDll');
  8939. Result := TFNLdrLoadDll(_LdrLoadDll)(
  8940. pwPath, pdwFlags, pusPath, phModule
  8941. );
  8942. end;
  8943. // Dynamic version of LdrQueryImageFileExecutionOptions
  8944. function LdrQueryImageFileExecutionOptions(
  8945. pusImagePath : PUNICODE_STRING;
  8946. pwOptionName : PWORD;
  8947. dwRequestedType : DWORD;
  8948. pData : PVOID;
  8949. dwSize : DWORD;
  8950. pdwSize : PDWORD
  8951. ): NTSTATUS; stdcall;
  8952. begin
  8953. GetProcedureAddress(_LdrQueryImageFileExecutionOptions, ntdll, 'LdrQueryImageFileExecutionOptions');
  8954. Result := TFNLdrQueryImageFileExecutionOptions(_LdrQueryImageFileExecutionOptions)(
  8955. pusImagePath, pwOptionName, dwRequestedType, pData, dwSize, pdwSize
  8956. );
  8957. end;
  8958. // Dynamic version of LdrQueryProcessModuleInformation
  8959. function LdrQueryProcessModuleInformation(
  8960. psmi : PSYSTEM_MODULE_INFORMATION;
  8961. dwSize : DWORD;
  8962. pdwSize : PDWORD
  8963. ): NTSTATUS; stdcall;
  8964. begin
  8965. GetProcedureAddress(_LdrQueryProcessModuleInformation, ntdll, 'LdrQueryProcessModuleInformation');
  8966. Result := TFNLdrQueryProcessModuleInformation(_LdrQueryProcessModuleInformation)(
  8967. psmi, dwSize, pdwSize
  8968. );
  8969. end;
  8970. // Dynamic version of LdrShutdownProcess
  8971. procedure LdrShutdownProcess(); stdcall;
  8972. begin
  8973. GetProcedureAddress(_LdrShutdownProcess, ntdll, 'LdrShutdownProcess');
  8974. TFNLdrShutdownProcess(_LdrShutdownProcess)();
  8975. end;
  8976. // Dynamic version of LdrShutdownThread
  8977. procedure LdrShutdownThread(); stdcall;
  8978. begin
  8979. GetProcedureAddress(_LdrShutdownThread, ntdll, 'LdrShutdownThread');
  8980. TFNLdrShutdownThread(_LdrShutdownThread)();
  8981. end;
  8982. // Dynamic version of LdrUnloadDll
  8983. function LdrUnloadDll(
  8984. hModule : HANDLE
  8985. ): NTSTATUS; stdcall;
  8986. begin
  8987. GetProcedureAddress(_LdrUnloadDll, ntdll, 'LdrUnloadDll');
  8988. Result := TFNLdrUnloadDll(_LdrUnloadDll)(
  8989. hModule
  8990. );
  8991. end;
  8992. // Dynamic version of NtAcceptConnectPort
  8993. function NtAcceptConnectPort(
  8994. PortHandle : PHANDLE;
  8995. PortIdentifier : ULONG;
  8996. Message : PPORT_MESSAGE;
  8997. Accept : BOOLEAN;
  8998. WriteSection : PPORT_SECTION_WRITE;
  8999. ReadSection : PPORT_SECTION_READ
  9000. ): NTSTATUS; stdcall;
  9001. begin
  9002. GetProcedureAddress(_NtAcceptConnectPort, ntdll, 'NtAcceptConnectPort');
  9003. Result := TFNNtAcceptConnectPort(_NtAcceptConnectPort)(
  9004. PortHandle, PortIdentifier, Message, Accept, WriteSection, ReadSection
  9005. );
  9006. end;
  9007. // Dynamic version of NtAcceptConnectPort
  9008. function ZwAcceptConnectPort(
  9009. PortHandle : PHANDLE;
  9010. PortIdentifier : ULONG;
  9011. Message : PPORT_MESSAGE;
  9012. Accept : BOOLEAN;
  9013. WriteSection : PPORT_SECTION_WRITE;
  9014. ReadSection : PPORT_SECTION_READ
  9015. ): NTSTATUS; stdcall;
  9016. begin
  9017. GetProcedureAddress(_NtAcceptConnectPort, ntdll, 'NtAcceptConnectPort');
  9018. Result := TFNNtAcceptConnectPort(_NtAcceptConnectPort)(
  9019. PortHandle, PortIdentifier, Message, Accept, WriteSection, ReadSection
  9020. );
  9021. end;
  9022. // Dynamic version of NtAccessCheck
  9023. function NtAccessCheck(
  9024. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9025. TokenHandle : HANDLE;
  9026. DesiredAccess : ACCESS_MASK;
  9027. GenericMapping : PGENERIC_MAPPING;
  9028. PrivilegeSet : PPRIVILEGE_SET;
  9029. PrivilegeSetLength : PULONG;
  9030. GrantedAccess : PACCESS_MASK;
  9031. AccessStatus : PBOOLEAN
  9032. ): NTSTATUS; stdcall;
  9033. begin
  9034. GetProcedureAddress(_NtAccessCheck, ntdll, 'NtAccessCheck');
  9035. Result := TFNNtAccessCheck(_NtAccessCheck)(
  9036. SecurityDescriptor, TokenHandle, DesiredAccess, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus
  9037. );
  9038. end;
  9039. // Dynamic version of NtAccessCheck
  9040. function ZwAccessCheck(
  9041. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9042. TokenHandle : HANDLE;
  9043. DesiredAccess : ACCESS_MASK;
  9044. GenericMapping : PGENERIC_MAPPING;
  9045. PrivilegeSet : PPRIVILEGE_SET;
  9046. PrivilegeSetLength : PULONG;
  9047. GrantedAccess : PACCESS_MASK;
  9048. AccessStatus : PBOOLEAN
  9049. ): NTSTATUS; stdcall;
  9050. begin
  9051. GetProcedureAddress(_NtAccessCheck, ntdll, 'NtAccessCheck');
  9052. Result := TFNNtAccessCheck(_NtAccessCheck)(
  9053. SecurityDescriptor, TokenHandle, DesiredAccess, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus
  9054. );
  9055. end;
  9056. // Dynamic version of NtAccessCheckAndAuditAlarm
  9057. function NtAccessCheckAndAuditAlarm(
  9058. SubsystemName : PUNICODE_STRING;
  9059. HandleId : PVOID;
  9060. ObjectTypeName : PUNICODE_STRING;
  9061. ObjectName : PUNICODE_STRING;
  9062. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9063. DesiredAccess : ACCESS_MASK;
  9064. GenericMapping : PGENERIC_MAPPING;
  9065. ObjectCreation : BOOLEAN;
  9066. GrantedAccess : PACCESS_MASK;
  9067. AccessStatus : PBOOLEAN;
  9068. GenerateOnClose : PBOOLEAN
  9069. ): NTSTATUS; stdcall;
  9070. begin
  9071. GetProcedureAddress(_NtAccessCheckAndAuditAlarm, ntdll, 'NtAccessCheckAndAuditAlarm');
  9072. Result := TFNNtAccessCheckAndAuditAlarm(_NtAccessCheckAndAuditAlarm)(
  9073. SubsystemName, HandleId, ObjectTypeName, ObjectName, SecurityDescriptor, DesiredAccess, GenericMapping, ObjectCreation, GrantedAccess, AccessStatus, GenerateOnClose
  9074. );
  9075. end;
  9076. // Dynamic version of NtAccessCheckAndAuditAlarm
  9077. function ZwAccessCheckAndAuditAlarm(
  9078. SubsystemName : PUNICODE_STRING;
  9079. HandleId : PVOID;
  9080. ObjectTypeName : PUNICODE_STRING;
  9081. ObjectName : PUNICODE_STRING;
  9082. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9083. DesiredAccess : ACCESS_MASK;
  9084. GenericMapping : PGENERIC_MAPPING;
  9085. ObjectCreation : BOOLEAN;
  9086. GrantedAccess : PACCESS_MASK;
  9087. AccessStatus : PBOOLEAN;
  9088. GenerateOnClose : PBOOLEAN
  9089. ): NTSTATUS; stdcall;
  9090. begin
  9091. GetProcedureAddress(_NtAccessCheckAndAuditAlarm, ntdll, 'NtAccessCheckAndAuditAlarm');
  9092. Result := TFNNtAccessCheckAndAuditAlarm(_NtAccessCheckAndAuditAlarm)(
  9093. SubsystemName, HandleId, ObjectTypeName, ObjectName, SecurityDescriptor, DesiredAccess, GenericMapping, ObjectCreation, GrantedAccess, AccessStatus, GenerateOnClose
  9094. );
  9095. end;
  9096. // Dynamic version of NtAccessCheckByType
  9097. function NtAccessCheckByType(
  9098. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9099. PrincipalSelfSid : PSID;
  9100. TokenHandle : HANDLE;
  9101. DesiredAccess : ACCESS_MASK;
  9102. ObjectTypeList : POBJECT_TYPE_LIST;
  9103. ObjectTypeListLength : ULONG;
  9104. GenericMapping : PGENERIC_MAPPING;
  9105. PrivilegeSet : PPRIVILEGE_SET;
  9106. PrivilegeSetLength : PULONG;
  9107. GrantedAccess : PACCESS_MASK;
  9108. AccessStatus : PULONG
  9109. ): NTSTATUS; stdcall;
  9110. begin
  9111. GetProcedureAddress(_NtAccessCheckByType, ntdll, 'NtAccessCheckByType');
  9112. Result := TFNNtAccessCheckByType(_NtAccessCheckByType)(
  9113. SecurityDescriptor, PrincipalSelfSid, TokenHandle, DesiredAccess, ObjectTypeList, ObjectTypeListLength, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus
  9114. );
  9115. end;
  9116. // Dynamic version of NtAccessCheckByType
  9117. function ZwAccessCheckByType(
  9118. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9119. PrincipalSelfSid : PSID;
  9120. TokenHandle : HANDLE;
  9121. DesiredAccess : ACCESS_MASK;
  9122. ObjectTypeList : POBJECT_TYPE_LIST;
  9123. ObjectTypeListLength : ULONG;
  9124. GenericMapping : PGENERIC_MAPPING;
  9125. PrivilegeSet : PPRIVILEGE_SET;
  9126. PrivilegeSetLength : PULONG;
  9127. GrantedAccess : PACCESS_MASK;
  9128. AccessStatus : PULONG
  9129. ): NTSTATUS; stdcall;
  9130. begin
  9131. GetProcedureAddress(_NtAccessCheckByType, ntdll, 'NtAccessCheckByType');
  9132. Result := TFNNtAccessCheckByType(_NtAccessCheckByType)(
  9133. SecurityDescriptor, PrincipalSelfSid, TokenHandle, DesiredAccess, ObjectTypeList, ObjectTypeListLength, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus
  9134. );
  9135. end;
  9136. // Dynamic version of NtAccessCheckByTypeAndAuditAlarm
  9137. function NtAccessCheckByTypeAndAuditAlarm(
  9138. SubsystemName : PUNICODE_STRING;
  9139. HandleId : PVOID;
  9140. ObjectTypeName : PUNICODE_STRING;
  9141. ObjectName : PUNICODE_STRING;
  9142. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9143. PrincipalSelfSid : PSID;
  9144. DesiredAccess : ACCESS_MASK;
  9145. AuditType : AUDIT_EVENT_TYPE;
  9146. Flags : ULONG;
  9147. ObjectTypeList : POBJECT_TYPE_LIST;
  9148. ObjectTypeListLength : ULONG;
  9149. GenericMapping : PGENERIC_MAPPING;
  9150. ObjectCreation : BOOLEAN;
  9151. GrantedAccess : PACCESS_MASK;
  9152. AccessStatus : PULONG;
  9153. GenerateOnClose : PBOOLEAN
  9154. ): NTSTATUS; stdcall;
  9155. begin
  9156. GetProcedureAddress(_NtAccessCheckByTypeAndAuditAlarm, ntdll, 'NtAccessCheckByTypeAndAuditAlarm');
  9157. Result := TFNNtAccessCheckByTypeAndAuditAlarm(_NtAccessCheckByTypeAndAuditAlarm)(
  9158. SubsystemName, HandleId, ObjectTypeName, ObjectName, SecurityDescriptor, PrincipalSelfSid, DesiredAccess, AuditType, Flags, ObjectTypeList, ObjectTypeListLength, GenericMapping, ObjectCreation, GrantedAccess, AccessStatus,
  9159. GenerateOnClose
  9160. );
  9161. end;
  9162. // Dynamic version of NtAccessCheckByTypeAndAuditAlarm
  9163. function ZwAccessCheckByTypeAndAuditAlarm(
  9164. SubsystemName : PUNICODE_STRING;
  9165. HandleId : PVOID;
  9166. ObjectTypeName : PUNICODE_STRING;
  9167. ObjectName : PUNICODE_STRING;
  9168. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9169. PrincipalSelfSid : PSID;
  9170. DesiredAccess : ACCESS_MASK;
  9171. AuditType : AUDIT_EVENT_TYPE;
  9172. Flags : ULONG;
  9173. ObjectTypeList : POBJECT_TYPE_LIST;
  9174. ObjectTypeListLength : ULONG;
  9175. GenericMapping : PGENERIC_MAPPING;
  9176. ObjectCreation : BOOLEAN;
  9177. GrantedAccess : PACCESS_MASK;
  9178. AccessStatus : PULONG;
  9179. GenerateOnClose : PBOOLEAN
  9180. ): NTSTATUS; stdcall;
  9181. begin
  9182. GetProcedureAddress(_NtAccessCheckByTypeAndAuditAlarm, ntdll, 'NtAccessCheckByTypeAndAuditAlarm');
  9183. Result := TFNNtAccessCheckByTypeAndAuditAlarm(_NtAccessCheckByTypeAndAuditAlarm)(
  9184. SubsystemName, HandleId, ObjectTypeName, ObjectName, SecurityDescriptor, PrincipalSelfSid, DesiredAccess, AuditType, Flags, ObjectTypeList, ObjectTypeListLength, GenericMapping, ObjectCreation, GrantedAccess, AccessStatus,
  9185. GenerateOnClose
  9186. );
  9187. end;
  9188. // Dynamic version of NtAccessCheckByTypeResultList
  9189. function NtAccessCheckByTypeResultList(
  9190. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9191. PrincipalSelfSid : PSID;
  9192. TokenHandle : HANDLE;
  9193. DesiredAccess : ACCESS_MASK;
  9194. ObjectTypeList : POBJECT_TYPE_LIST;
  9195. ObjectTypeListLength : ULONG;
  9196. GenericMapping : PGENERIC_MAPPING;
  9197. PrivilegeSet : PPRIVILEGE_SET;
  9198. PrivilegeSetLength : PULONG;
  9199. GrantedAccessList : PACCESS_MASK;
  9200. AccessStatusList : PULONG
  9201. ): NTSTATUS; stdcall;
  9202. begin
  9203. GetProcedureAddress(_NtAccessCheckByTypeResultList, ntdll, 'NtAccessCheckByTypeResultList');
  9204. Result := TFNNtAccessCheckByTypeResultList(_NtAccessCheckByTypeResultList)(
  9205. SecurityDescriptor, PrincipalSelfSid, TokenHandle, DesiredAccess, ObjectTypeList, ObjectTypeListLength, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccessList, AccessStatusList
  9206. );
  9207. end;
  9208. // Dynamic version of NtAccessCheckByTypeResultList
  9209. function ZwAccessCheckByTypeResultList(
  9210. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9211. PrincipalSelfSid : PSID;
  9212. TokenHandle : HANDLE;
  9213. DesiredAccess : ACCESS_MASK;
  9214. ObjectTypeList : POBJECT_TYPE_LIST;
  9215. ObjectTypeListLength : ULONG;
  9216. GenericMapping : PGENERIC_MAPPING;
  9217. PrivilegeSet : PPRIVILEGE_SET;
  9218. PrivilegeSetLength : PULONG;
  9219. GrantedAccessList : PACCESS_MASK;
  9220. AccessStatusList : PULONG
  9221. ): NTSTATUS; stdcall;
  9222. begin
  9223. GetProcedureAddress(_NtAccessCheckByTypeResultList, ntdll, 'NtAccessCheckByTypeResultList');
  9224. Result := TFNNtAccessCheckByTypeResultList(_NtAccessCheckByTypeResultList)(
  9225. SecurityDescriptor, PrincipalSelfSid, TokenHandle, DesiredAccess, ObjectTypeList, ObjectTypeListLength, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccessList, AccessStatusList
  9226. );
  9227. end;
  9228. // Dynamic version of NtAccessCheckByTypeResultListAndAuditAlarm
  9229. function NtAccessCheckByTypeResultListAndAuditAlarm(
  9230. SubsystemName : PUNICODE_STRING;
  9231. HandleId : PVOID;
  9232. ObjectTypeName : PUNICODE_STRING;
  9233. ObjectName : PUNICODE_STRING;
  9234. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9235. PrincipalSelfSid : PSID;
  9236. DesiredAccess : ACCESS_MASK;
  9237. AuditType : AUDIT_EVENT_TYPE;
  9238. Flags : ULONG;
  9239. ObjectTypeList : POBJECT_TYPE_LIST;
  9240. ObjectTypeListLength : ULONG;
  9241. GenericMapping : PGENERIC_MAPPING;
  9242. ObjectCreation : BOOLEAN;
  9243. GrantedAccessList : PACCESS_MASK;
  9244. AccessStatusList : PULONG;
  9245. GenerateOnClose : PULONG
  9246. ): NTSTATUS; stdcall;
  9247. begin
  9248. GetProcedureAddress(_NtAccessCheckByTypeResultListAndAuditAlarm, ntdll, 'NtAccessCheckByTypeResultListAndAuditAlarm');
  9249. Result := TFNNtAccessCheckByTypeResultListAndAuditAlarm(_NtAccessCheckByTypeResultListAndAuditAlarm)(
  9250. SubsystemName, HandleId, ObjectTypeName, ObjectName, SecurityDescriptor, PrincipalSelfSid, DesiredAccess, AuditType, Flags, ObjectTypeList, ObjectTypeListLength, GenericMapping, ObjectCreation, GrantedAccessList, AccessStatusList,
  9251. GenerateOnClose
  9252. );
  9253. end;
  9254. // Dynamic version of NtAccessCheckByTypeResultListAndAuditAlarm
  9255. function ZwAccessCheckByTypeResultListAndAuditAlarm(
  9256. SubsystemName : PUNICODE_STRING;
  9257. HandleId : PVOID;
  9258. ObjectTypeName : PUNICODE_STRING;
  9259. ObjectName : PUNICODE_STRING;
  9260. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9261. PrincipalSelfSid : PSID;
  9262. DesiredAccess : ACCESS_MASK;
  9263. AuditType : AUDIT_EVENT_TYPE;
  9264. Flags : ULONG;
  9265. ObjectTypeList : POBJECT_TYPE_LIST;
  9266. ObjectTypeListLength : ULONG;
  9267. GenericMapping : PGENERIC_MAPPING;
  9268. ObjectCreation : BOOLEAN;
  9269. GrantedAccessList : PACCESS_MASK;
  9270. AccessStatusList : PULONG;
  9271. GenerateOnClose : PULONG
  9272. ): NTSTATUS; stdcall;
  9273. begin
  9274. GetProcedureAddress(_NtAccessCheckByTypeResultListAndAuditAlarm, ntdll, 'NtAccessCheckByTypeResultListAndAuditAlarm');
  9275. Result := TFNNtAccessCheckByTypeResultListAndAuditAlarm(_NtAccessCheckByTypeResultListAndAuditAlarm)(
  9276. SubsystemName, HandleId, ObjectTypeName, ObjectName, SecurityDescriptor, PrincipalSelfSid, DesiredAccess, AuditType, Flags, ObjectTypeList, ObjectTypeListLength, GenericMapping, ObjectCreation, GrantedAccessList, AccessStatusList,
  9277. GenerateOnClose
  9278. );
  9279. end;
  9280. // Dynamic version of NtAccessCheckByTypeResultListAndAuditAlarmByHandle
  9281. function NtAccessCheckByTypeResultListAndAuditAlarmByHandle(
  9282. SubsystemName : PUNICODE_STRING;
  9283. HandleId : PVOID;
  9284. TokenHandle : HANDLE;
  9285. ObjectTypeName : PUNICODE_STRING;
  9286. ObjectName : PUNICODE_STRING;
  9287. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9288. PrincipalSelfSid : PSID;
  9289. DesiredAccess : ACCESS_MASK;
  9290. AuditType : AUDIT_EVENT_TYPE;
  9291. Flags : ULONG;
  9292. ObjectTypeList : POBJECT_TYPE_LIST;
  9293. ObjectTypeListLength : ULONG;
  9294. GenericMapping : PGENERIC_MAPPING;
  9295. ObjectCreation : BOOLEAN;
  9296. GrantedAccessList : PACCESS_MASK;
  9297. AccessStatusList : PULONG;
  9298. GenerateOnClose : PULONG
  9299. ): NTSTATUS; stdcall;
  9300. begin
  9301. GetProcedureAddress(_NtAccessCheckByTypeResultListAndAuditAlarmByHandle, ntdll, 'NtAccessCheckByTypeResultListAndAuditAlarmByHandle');
  9302. Result := TFNNtAccessCheckByTypeResultListAndAuditAlarmByHandle(_NtAccessCheckByTypeResultListAndAuditAlarmByHandle)(
  9303. SubsystemName, HandleId, TokenHandle, ObjectTypeName, ObjectName, SecurityDescriptor, PrincipalSelfSid, DesiredAccess, AuditType, Flags, ObjectTypeList, ObjectTypeListLength, GenericMapping, ObjectCreation, GrantedAccessList,
  9304. AccessStatusList, GenerateOnClose
  9305. );
  9306. end;
  9307. // Dynamic version of NtAccessCheckByTypeResultListAndAuditAlarmByHandle
  9308. function ZwAccessCheckByTypeResultListAndAuditAlarmByHandle(
  9309. SubsystemName : PUNICODE_STRING;
  9310. HandleId : PVOID;
  9311. TokenHandle : HANDLE;
  9312. ObjectTypeName : PUNICODE_STRING;
  9313. ObjectName : PUNICODE_STRING;
  9314. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  9315. PrincipalSelfSid : PSID;
  9316. DesiredAccess : ACCESS_MASK;
  9317. AuditType : AUDIT_EVENT_TYPE;
  9318. Flags : ULONG;
  9319. ObjectTypeList : POBJECT_TYPE_LIST;
  9320. ObjectTypeListLength : ULONG;
  9321. GenericMapping : PGENERIC_MAPPING;
  9322. ObjectCreation : BOOLEAN;
  9323. GrantedAccessList : PACCESS_MASK;
  9324. AccessStatusList : PULONG;
  9325. GenerateOnClose : PULONG
  9326. ): NTSTATUS; stdcall;
  9327. begin
  9328. GetProcedureAddress(_NtAccessCheckByTypeResultListAndAuditAlarmByHandle, ntdll, 'NtAccessCheckByTypeResultListAndAuditAlarmByHandle');
  9329. Result := TFNNtAccessCheckByTypeResultListAndAuditAlarmByHandle(_NtAccessCheckByTypeResultListAndAuditAlarmByHandle)(
  9330. SubsystemName, HandleId, TokenHandle, ObjectTypeName, ObjectName, SecurityDescriptor, PrincipalSelfSid, DesiredAccess, AuditType, Flags, ObjectTypeList, ObjectTypeListLength, GenericMapping, ObjectCreation, GrantedAccessList,
  9331. AccessStatusList, GenerateOnClose
  9332. );
  9333. end;
  9334. // Dynamic version of NtAddAtom
  9335. function NtAddAtom(
  9336. Str : PWSTR;
  9337. StringLength : ULONG;
  9338. Atom : PUSHORT
  9339. ): NTSTATUS; stdcall;
  9340. begin
  9341. GetProcedureAddress(_NtAddAtom, ntdll, 'NtAddAtom');
  9342. Result := TFNNtAddAtom(_NtAddAtom)(
  9343. Str, StringLength, Atom
  9344. );
  9345. end;
  9346. // Dynamic version of NtAddAtom
  9347. function ZwAddAtom(
  9348. Str : PWSTR;
  9349. StringLength : ULONG;
  9350. Atom : PUSHORT
  9351. ): NTSTATUS; stdcall;
  9352. begin
  9353. GetProcedureAddress(_NtAddAtom, ntdll, 'NtAddAtom');
  9354. Result := TFNNtAddAtom(_NtAddAtom)(
  9355. Str, StringLength, Atom
  9356. );
  9357. end;
  9358. // Dynamic version of NtAdjustGroupsToken
  9359. function NtAdjustGroupsToken(
  9360. TokenHandle : HANDLE;
  9361. ResetToDefault : BOOLEAN;
  9362. NewState : PTOKEN_GROUPS;
  9363. BufferLength : ULONG;
  9364. PreviousState : PTOKEN_GROUPS;
  9365. ReturnLength : PULONG
  9366. ): NTSTATUS; stdcall;
  9367. begin
  9368. GetProcedureAddress(_NtAdjustGroupsToken, ntdll, 'NtAdjustGroupsToken');
  9369. Result := TFNNtAdjustGroupsToken(_NtAdjustGroupsToken)(
  9370. TokenHandle, ResetToDefault, NewState, BufferLength, PreviousState, ReturnLength
  9371. );
  9372. end;
  9373. // Dynamic version of NtAdjustGroupsToken
  9374. function ZwAdjustGroupsToken(
  9375. TokenHandle : HANDLE;
  9376. ResetToDefault : BOOLEAN;
  9377. NewState : PTOKEN_GROUPS;
  9378. BufferLength : ULONG;
  9379. PreviousState : PTOKEN_GROUPS;
  9380. ReturnLength : PULONG
  9381. ): NTSTATUS; stdcall;
  9382. begin
  9383. GetProcedureAddress(_NtAdjustGroupsToken, ntdll, 'NtAdjustGroupsToken');
  9384. Result := TFNNtAdjustGroupsToken(_NtAdjustGroupsToken)(
  9385. TokenHandle, ResetToDefault, NewState, BufferLength, PreviousState, ReturnLength
  9386. );
  9387. end;
  9388. // Dynamic version of NtAdjustPrivilegesToken
  9389. function NtAdjustPrivilegesToken(
  9390. TokenHandle : HANDLE;
  9391. DisableAllPrivileges : BOOLEAN;
  9392. NewState : PTOKEN_PRIVILEGES;
  9393. BufferLength : ULONG;
  9394. PreviousState : PTOKEN_PRIVILEGES;
  9395. ReturnLength : PULONG
  9396. ): NTSTATUS; stdcall;
  9397. begin
  9398. GetProcedureAddress(_NtAdjustPrivilegesToken, ntdll, 'NtAdjustPrivilegesToken');
  9399. Result := TFNNtAdjustPrivilegesToken(_NtAdjustPrivilegesToken)(
  9400. TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength
  9401. );
  9402. end;
  9403. // Dynamic version of NtAdjustPrivilegesToken
  9404. function ZwAdjustPrivilegesToken(
  9405. TokenHandle : HANDLE;
  9406. DisableAllPrivileges : BOOLEAN;
  9407. NewState : PTOKEN_PRIVILEGES;
  9408. BufferLength : ULONG;
  9409. PreviousState : PTOKEN_PRIVILEGES;
  9410. ReturnLength : PULONG
  9411. ): NTSTATUS; stdcall;
  9412. begin
  9413. GetProcedureAddress(_NtAdjustPrivilegesToken, ntdll, 'NtAdjustPrivilegesToken');
  9414. Result := TFNNtAdjustPrivilegesToken(_NtAdjustPrivilegesToken)(
  9415. TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength
  9416. );
  9417. end;
  9418. // Dynamic version of NtAlertResumeThread
  9419. function NtAlertResumeThread(
  9420. ThreadHandle : HANDLE;
  9421. PreviousSuspendCount : PULONG
  9422. ): NTSTATUS; stdcall;
  9423. begin
  9424. GetProcedureAddress(_NtAlertResumeThread, ntdll, 'NtAlertResumeThread');
  9425. Result := TFNNtAlertResumeThread(_NtAlertResumeThread)(
  9426. ThreadHandle, PreviousSuspendCount
  9427. );
  9428. end;
  9429. // Dynamic version of NtAlertResumeThread
  9430. function ZwAlertResumeThread(
  9431. ThreadHandle : HANDLE;
  9432. PreviousSuspendCount : PULONG
  9433. ): NTSTATUS; stdcall;
  9434. begin
  9435. GetProcedureAddress(_NtAlertResumeThread, ntdll, 'NtAlertResumeThread');
  9436. Result := TFNNtAlertResumeThread(_NtAlertResumeThread)(
  9437. ThreadHandle, PreviousSuspendCount
  9438. );
  9439. end;
  9440. // Dynamic version of NtAlertThread
  9441. function NtAlertThread(
  9442. ThreadHandle : HANDLE
  9443. ): NTSTATUS; stdcall;
  9444. begin
  9445. GetProcedureAddress(_NtAlertThread, ntdll, 'NtAlertThread');
  9446. Result := TFNNtAlertThread(_NtAlertThread)(
  9447. ThreadHandle
  9448. );
  9449. end;
  9450. // Dynamic version of NtAlertThread
  9451. function ZwAlertThread(
  9452. ThreadHandle : HANDLE
  9453. ): NTSTATUS; stdcall;
  9454. begin
  9455. GetProcedureAddress(_NtAlertThread, ntdll, 'NtAlertThread');
  9456. Result := TFNNtAlertThread(_NtAlertThread)(
  9457. ThreadHandle
  9458. );
  9459. end;
  9460. // Dynamic version of NtAllocateLocallyUniqueId
  9461. function NtAllocateLocallyUniqueId(
  9462. Luid : PLUID
  9463. ): NTSTATUS; stdcall;
  9464. begin
  9465. GetProcedureAddress(_NtAllocateLocallyUniqueId, ntdll, 'NtAllocateLocallyUniqueId');
  9466. Result := TFNNtAllocateLocallyUniqueId(_NtAllocateLocallyUniqueId)(
  9467. Luid
  9468. );
  9469. end;
  9470. // Dynamic version of NtAllocateLocallyUniqueId
  9471. function ZwAllocateLocallyUniqueId(
  9472. Luid : PLUID
  9473. ): NTSTATUS; stdcall;
  9474. begin
  9475. GetProcedureAddress(_NtAllocateLocallyUniqueId, ntdll, 'NtAllocateLocallyUniqueId');
  9476. Result := TFNNtAllocateLocallyUniqueId(_NtAllocateLocallyUniqueId)(
  9477. Luid
  9478. );
  9479. end;
  9480. // Dynamic version of NtAllocateUserPhysicalPages
  9481. function NtAllocateUserPhysicalPages(
  9482. ProcessHandle : HANDLE;
  9483. NumberOfPages : PULONG;
  9484. PageFrameNumbers : PULONG
  9485. ): NTSTATUS; stdcall;
  9486. begin
  9487. GetProcedureAddress(_NtAllocateUserPhysicalPages, ntdll, 'NtAllocateUserPhysicalPages');
  9488. Result := TFNNtAllocateUserPhysicalPages(_NtAllocateUserPhysicalPages)(
  9489. ProcessHandle, NumberOfPages, PageFrameNumbers
  9490. );
  9491. end;
  9492. // Dynamic version of NtAllocateUserPhysicalPages
  9493. function ZwAllocateUserPhysicalPages(
  9494. ProcessHandle : HANDLE;
  9495. NumberOfPages : PULONG;
  9496. PageFrameNumbers : PULONG
  9497. ): NTSTATUS; stdcall;
  9498. begin
  9499. GetProcedureAddress(_NtAllocateUserPhysicalPages, ntdll, 'NtAllocateUserPhysicalPages');
  9500. Result := TFNNtAllocateUserPhysicalPages(_NtAllocateUserPhysicalPages)(
  9501. ProcessHandle, NumberOfPages, PageFrameNumbers
  9502. );
  9503. end;
  9504. // Dynamic version of NtAllocateUuids
  9505. function NtAllocateUuids(
  9506. UuidLastTimeAllocated : PLARGE_INTEGER;
  9507. UuidDeltaTime : PULONG;
  9508. UuidSequenceNumber : PULONG;
  9509. UuidSeed : PUCHAR
  9510. ): NTSTATUS; stdcall;
  9511. begin
  9512. GetProcedureAddress(_NtAllocateUuids, ntdll, 'NtAllocateUuids');
  9513. Result := TFNNtAllocateUuids(_NtAllocateUuids)(
  9514. UuidLastTimeAllocated, UuidDeltaTime, UuidSequenceNumber, UuidSeed
  9515. );
  9516. end;
  9517. // Dynamic version of NtAllocateUuids
  9518. function ZwAllocateUuids(
  9519. UuidLastTimeAllocated : PLARGE_INTEGER;
  9520. UuidDeltaTime : PULONG;
  9521. UuidSequenceNumber : PULONG;
  9522. UuidSeed : PUCHAR
  9523. ): NTSTATUS; stdcall;
  9524. begin
  9525. GetProcedureAddress(_NtAllocateUuids, ntdll, 'NtAllocateUuids');
  9526. Result := TFNNtAllocateUuids(_NtAllocateUuids)(
  9527. UuidLastTimeAllocated, UuidDeltaTime, UuidSequenceNumber, UuidSeed
  9528. );
  9529. end;
  9530. // Dynamic version of NtAllocateVirtualMemory
  9531. function NtAllocateVirtualMemory(
  9532. ProcessHandle : HANDLE;
  9533. BaseAddress : PPVOID;
  9534. ZeroBits : ULONG;
  9535. AllocationSize : PULONG;
  9536. AllocationType : ULONG;
  9537. Protect : ULONG
  9538. ): NTSTATUS; stdcall;
  9539. begin
  9540. GetProcedureAddress(_NtAllocateVirtualMemory, ntdll, 'NtAllocateVirtualMemory');
  9541. Result := TFNNtAllocateVirtualMemory(_NtAllocateVirtualMemory)(
  9542. ProcessHandle, BaseAddress, ZeroBits, AllocationSize, AllocationType, Protect
  9543. );
  9544. end;
  9545. // Dynamic version of NtAllocateVirtualMemory
  9546. function ZwAllocateVirtualMemory(
  9547. ProcessHandle : HANDLE;
  9548. BaseAddress : PPVOID;
  9549. ZeroBits : ULONG;
  9550. AllocationSize : PULONG;
  9551. AllocationType : ULONG;
  9552. Protect : ULONG
  9553. ): NTSTATUS; stdcall;
  9554. begin
  9555. GetProcedureAddress(_NtAllocateVirtualMemory, ntdll, 'NtAllocateVirtualMemory');
  9556. Result := TFNNtAllocateVirtualMemory(_NtAllocateVirtualMemory)(
  9557. ProcessHandle, BaseAddress, ZeroBits, AllocationSize, AllocationType, Protect
  9558. );
  9559. end;
  9560. // Dynamic version of NtAreMappedFilesTheSame
  9561. function NtAreMappedFilesTheSame(
  9562. Address1 : PVOID;
  9563. Address2 : PVOID
  9564. ): NTSTATUS; stdcall;
  9565. begin
  9566. GetProcedureAddress(_NtAreMappedFilesTheSame, ntdll, 'NtAreMappedFilesTheSame');
  9567. Result := TFNNtAreMappedFilesTheSame(_NtAreMappedFilesTheSame)(
  9568. Address1, Address2
  9569. );
  9570. end;
  9571. // Dynamic version of NtAreMappedFilesTheSame
  9572. function ZwAreMappedFilesTheSame(
  9573. Address1 : PVOID;
  9574. Address2 : PVOID
  9575. ): NTSTATUS; stdcall;
  9576. begin
  9577. GetProcedureAddress(_NtAreMappedFilesTheSame, ntdll, 'NtAreMappedFilesTheSame');
  9578. Result := TFNNtAreMappedFilesTheSame(_NtAreMappedFilesTheSame)(
  9579. Address1, Address2
  9580. );
  9581. end;
  9582. // Dynamic version of NtAssignProcessToJobObject
  9583. function NtAssignProcessToJobObject(
  9584. JobHandle : HANDLE;
  9585. ProcessHandle : HANDLE
  9586. ): NTSTATUS; stdcall;
  9587. begin
  9588. GetProcedureAddress(_NtAssignProcessToJobObject, ntdll, 'NtAssignProcessToJobObject');
  9589. Result := TFNNtAssignProcessToJobObject(_NtAssignProcessToJobObject)(
  9590. JobHandle, ProcessHandle
  9591. );
  9592. end;
  9593. // Dynamic version of NtAssignProcessToJobObject
  9594. function ZwAssignProcessToJobObject(
  9595. JobHandle : HANDLE;
  9596. ProcessHandle : HANDLE
  9597. ): NTSTATUS; stdcall;
  9598. begin
  9599. GetProcedureAddress(_NtAssignProcessToJobObject, ntdll, 'NtAssignProcessToJobObject');
  9600. Result := TFNNtAssignProcessToJobObject(_NtAssignProcessToJobObject)(
  9601. JobHandle, ProcessHandle
  9602. );
  9603. end;
  9604. // Dynamic version of NtCallbackReturn
  9605. function NtCallbackReturn(
  9606. Result_ : PVOID;
  9607. ResultLength : ULONG;
  9608. Status : NTSTATUS
  9609. ): NTSTATUS; stdcall;
  9610. begin
  9611. GetProcedureAddress(_NtCallbackReturn, ntdll, 'NtCallbackReturn');
  9612. Result := TFNNtCallbackReturn(_NtCallbackReturn)(
  9613. Result_, ResultLength, Status
  9614. );
  9615. end;
  9616. // Dynamic version of NtCallbackReturn
  9617. function ZwCallbackReturn(
  9618. Result_ : PVOID;
  9619. ResultLength : ULONG;
  9620. Status : NTSTATUS
  9621. ): NTSTATUS; stdcall;
  9622. begin
  9623. GetProcedureAddress(_NtCallbackReturn, ntdll, 'NtCallbackReturn');
  9624. Result := TFNNtCallbackReturn(_NtCallbackReturn)(
  9625. Result_, ResultLength, Status
  9626. );
  9627. end;
  9628. // Dynamic version of NtCancelDeviceWakeupRequest
  9629. function NtCancelDeviceWakeupRequest(
  9630. DeviceHandle : HANDLE
  9631. ): NTSTATUS; stdcall;
  9632. begin
  9633. GetProcedureAddress(_NtCancelDeviceWakeupRequest, ntdll, 'NtCancelDeviceWakeupRequest');
  9634. Result := TFNNtCancelDeviceWakeupRequest(_NtCancelDeviceWakeupRequest)(
  9635. DeviceHandle
  9636. );
  9637. end;
  9638. // Dynamic version of NtCancelDeviceWakeupRequest
  9639. function ZwCancelDeviceWakeupRequest(
  9640. DeviceHandle : HANDLE
  9641. ): NTSTATUS; stdcall;
  9642. begin
  9643. GetProcedureAddress(_NtCancelDeviceWakeupRequest, ntdll, 'NtCancelDeviceWakeupRequest');
  9644. Result := TFNNtCancelDeviceWakeupRequest(_NtCancelDeviceWakeupRequest)(
  9645. DeviceHandle
  9646. );
  9647. end;
  9648. // Dynamic version of NtCancelIoFile
  9649. function NtCancelIoFile(
  9650. FileHandle : HANDLE;
  9651. IoStatusBlock : PIO_STATUS_BLOCK
  9652. ): NTSTATUS; stdcall;
  9653. begin
  9654. GetProcedureAddress(_NtCancelIoFile, ntdll, 'NtCancelIoFile');
  9655. Result := TFNNtCancelIoFile(_NtCancelIoFile)(
  9656. FileHandle, IoStatusBlock
  9657. );
  9658. end;
  9659. // Dynamic version of NtCancelIoFile
  9660. function ZwCancelIoFile(
  9661. FileHandle : HANDLE;
  9662. IoStatusBlock : PIO_STATUS_BLOCK
  9663. ): NTSTATUS; stdcall;
  9664. begin
  9665. GetProcedureAddress(_NtCancelIoFile, ntdll, 'NtCancelIoFile');
  9666. Result := TFNNtCancelIoFile(_NtCancelIoFile)(
  9667. FileHandle, IoStatusBlock
  9668. );
  9669. end;
  9670. // Dynamic version of NtCancelTimer
  9671. function NtCancelTimer(
  9672. TimerHandle : HANDLE;
  9673. PreviousState : PBOOLEAN
  9674. ): NTSTATUS; stdcall;
  9675. begin
  9676. GetProcedureAddress(_NtCancelTimer, ntdll, 'NtCancelTimer');
  9677. Result := TFNNtCancelTimer(_NtCancelTimer)(
  9678. TimerHandle, PreviousState
  9679. );
  9680. end;
  9681. // Dynamic version of NtCancelTimer
  9682. function ZwCancelTimer(
  9683. TimerHandle : HANDLE;
  9684. PreviousState : PBOOLEAN
  9685. ): NTSTATUS; stdcall;
  9686. begin
  9687. GetProcedureAddress(_NtCancelTimer, ntdll, 'NtCancelTimer');
  9688. Result := TFNNtCancelTimer(_NtCancelTimer)(
  9689. TimerHandle, PreviousState
  9690. );
  9691. end;
  9692. // Dynamic version of NtClearEvent
  9693. function NtClearEvent(
  9694. EventHandle : HANDLE
  9695. ): NTSTATUS; stdcall;
  9696. begin
  9697. GetProcedureAddress(_NtClearEvent, ntdll, 'NtClearEvent');
  9698. Result := TFNNtClearEvent(_NtClearEvent)(
  9699. EventHandle
  9700. );
  9701. end;
  9702. // Dynamic version of NtClearEvent
  9703. function ZwClearEvent(
  9704. EventHandle : HANDLE
  9705. ): NTSTATUS; stdcall;
  9706. begin
  9707. GetProcedureAddress(_NtClearEvent, ntdll, 'NtClearEvent');
  9708. Result := TFNNtClearEvent(_NtClearEvent)(
  9709. EventHandle
  9710. );
  9711. end;
  9712. // Dynamic version of NtClose
  9713. function NtClose(
  9714. Handle : HANDLE
  9715. ): NTSTATUS; stdcall;
  9716. begin
  9717. GetProcedureAddress(_NtClose, ntdll, 'NtClose');
  9718. Result := TFNNtClose(_NtClose)(
  9719. Handle
  9720. );
  9721. end;
  9722. // Dynamic version of NtClose
  9723. function ZwClose(
  9724. Handle : HANDLE
  9725. ): NTSTATUS; stdcall;
  9726. begin
  9727. GetProcedureAddress(_NtClose, ntdll, 'NtClose');
  9728. Result := TFNNtClose(_NtClose)(
  9729. Handle
  9730. );
  9731. end;
  9732. // Dynamic version of NtCloseObjectAuditAlarm
  9733. function NtCloseObjectAuditAlarm(
  9734. SubsystemName : PUNICODE_STRING;
  9735. HandleId : PVOID;
  9736. GenerateOnClose : BOOLEAN
  9737. ): NTSTATUS; stdcall;
  9738. begin
  9739. GetProcedureAddress(_NtCloseObjectAuditAlarm, ntdll, 'NtCloseObjectAuditAlarm');
  9740. Result := TFNNtCloseObjectAuditAlarm(_NtCloseObjectAuditAlarm)(
  9741. SubsystemName, HandleId, GenerateOnClose
  9742. );
  9743. end;
  9744. // Dynamic version of NtCloseObjectAuditAlarm
  9745. function ZwCloseObjectAuditAlarm(
  9746. SubsystemName : PUNICODE_STRING;
  9747. HandleId : PVOID;
  9748. GenerateOnClose : BOOLEAN
  9749. ): NTSTATUS; stdcall;
  9750. begin
  9751. GetProcedureAddress(_NtCloseObjectAuditAlarm, ntdll, 'NtCloseObjectAuditAlarm');
  9752. Result := TFNNtCloseObjectAuditAlarm(_NtCloseObjectAuditAlarm)(
  9753. SubsystemName, HandleId, GenerateOnClose
  9754. );
  9755. end;
  9756. // Dynamic version of NtCompleteConnectPort
  9757. function NtCompleteConnectPort(
  9758. PortHandle : HANDLE
  9759. ): NTSTATUS; stdcall;
  9760. begin
  9761. GetProcedureAddress(_NtCompleteConnectPort, ntdll, 'NtCompleteConnectPort');
  9762. Result := TFNNtCompleteConnectPort(_NtCompleteConnectPort)(
  9763. PortHandle
  9764. );
  9765. end;
  9766. // Dynamic version of NtCompleteConnectPort
  9767. function ZwCompleteConnectPort(
  9768. PortHandle : HANDLE
  9769. ): NTSTATUS; stdcall;
  9770. begin
  9771. GetProcedureAddress(_NtCompleteConnectPort, ntdll, 'NtCompleteConnectPort');
  9772. Result := TFNNtCompleteConnectPort(_NtCompleteConnectPort)(
  9773. PortHandle
  9774. );
  9775. end;
  9776. // Dynamic version of NtConnectPort
  9777. function NtConnectPort(
  9778. PortHandle : PHANDLE;
  9779. PortName : PUNICODE_STRING;
  9780. SecurityQos : PSECURITY_QUALITY_OF_SERVICE;
  9781. WriteSection : PPORT_SECTION_WRITE;
  9782. ReadSection : PPORT_SECTION_READ;
  9783. MaxMessageSize : PULONG;
  9784. ConnectData : PVOID;
  9785. ConnectDataLength : PULONG
  9786. ): NTSTATUS; stdcall;
  9787. begin
  9788. GetProcedureAddress(_NtConnectPort, ntdll, 'NtConnectPort');
  9789. Result := TFNNtConnectPort(_NtConnectPort)(
  9790. PortHandle, PortName, SecurityQos, WriteSection, ReadSection, MaxMessageSize, ConnectData, ConnectDataLength
  9791. );
  9792. end;
  9793. // Dynamic version of NtConnectPort
  9794. function ZwConnectPort(
  9795. PortHandle : PHANDLE;
  9796. PortName : PUNICODE_STRING;
  9797. SecurityQos : PSECURITY_QUALITY_OF_SERVICE;
  9798. WriteSection : PPORT_SECTION_WRITE;
  9799. ReadSection : PPORT_SECTION_READ;
  9800. MaxMessageSize : PULONG;
  9801. ConnectData : PVOID;
  9802. ConnectDataLength : PULONG
  9803. ): NTSTATUS; stdcall;
  9804. begin
  9805. GetProcedureAddress(_NtConnectPort, ntdll, 'NtConnectPort');
  9806. Result := TFNNtConnectPort(_NtConnectPort)(
  9807. PortHandle, PortName, SecurityQos, WriteSection, ReadSection, MaxMessageSize, ConnectData, ConnectDataLength
  9808. );
  9809. end;
  9810. // Dynamic version of NtContinue
  9811. function NtContinue(
  9812. Context : PCONTEXT;
  9813. TestAlert : BOOLEAN
  9814. ): NTSTATUS; stdcall;
  9815. begin
  9816. GetProcedureAddress(_NtContinue, ntdll, 'NtContinue');
  9817. Result := TFNNtContinue(_NtContinue)(
  9818. Context, TestAlert
  9819. );
  9820. end;
  9821. // Dynamic version of NtContinue
  9822. function ZwContinue(
  9823. Context : PCONTEXT;
  9824. TestAlert : BOOLEAN
  9825. ): NTSTATUS; stdcall;
  9826. begin
  9827. GetProcedureAddress(_NtContinue, ntdll, 'NtContinue');
  9828. Result := TFNNtContinue(_NtContinue)(
  9829. Context, TestAlert
  9830. );
  9831. end;
  9832. // Dynamic version of NtCreateChannel
  9833. function NtCreateChannel(
  9834. ChannelHandle : PHANDLE;
  9835. ObjectAttributes : POBJECT_ATTRIBUTES
  9836. ): NTSTATUS; stdcall;
  9837. begin
  9838. GetProcedureAddress(_NtCreateChannel, ntdll, 'NtCreateChannel');
  9839. Result := TFNNtCreateChannel(_NtCreateChannel)(
  9840. ChannelHandle, ObjectAttributes
  9841. );
  9842. end;
  9843. // Dynamic version of NtCreateChannel
  9844. function ZwCreateChannel(
  9845. ChannelHandle : PHANDLE;
  9846. ObjectAttributes : POBJECT_ATTRIBUTES
  9847. ): NTSTATUS; stdcall;
  9848. begin
  9849. GetProcedureAddress(_NtCreateChannel, ntdll, 'NtCreateChannel');
  9850. Result := TFNNtCreateChannel(_NtCreateChannel)(
  9851. ChannelHandle, ObjectAttributes
  9852. );
  9853. end;
  9854. // Dynamic version of NtCreateDirectoryObject
  9855. function NtCreateDirectoryObject(
  9856. DirectoryHandle : PHANDLE;
  9857. DesiredAccess : ACCESS_MASK;
  9858. ObjectAttributes : POBJECT_ATTRIBUTES
  9859. ): NTSTATUS; stdcall;
  9860. begin
  9861. GetProcedureAddress(_NtCreateDirectoryObject, ntdll, 'NtCreateDirectoryObject');
  9862. Result := TFNNtCreateDirectoryObject(_NtCreateDirectoryObject)(
  9863. DirectoryHandle, DesiredAccess, ObjectAttributes
  9864. );
  9865. end;
  9866. // Dynamic version of NtCreateDirectoryObject
  9867. function ZwCreateDirectoryObject(
  9868. DirectoryHandle : PHANDLE;
  9869. DesiredAccess : ACCESS_MASK;
  9870. ObjectAttributes : POBJECT_ATTRIBUTES
  9871. ): NTSTATUS; stdcall;
  9872. begin
  9873. GetProcedureAddress(_NtCreateDirectoryObject, ntdll, 'NtCreateDirectoryObject');
  9874. Result := TFNNtCreateDirectoryObject(_NtCreateDirectoryObject)(
  9875. DirectoryHandle, DesiredAccess, ObjectAttributes
  9876. );
  9877. end;
  9878. // Dynamic version of NtCreateEvent
  9879. function NtCreateEvent(
  9880. EventHandle : PHANDLE;
  9881. DesiredAccess : ACCESS_MASK;
  9882. ObjectAttributes : POBJECT_ATTRIBUTES;
  9883. EventType : EVENT_TYPE;
  9884. InitialState : BOOLEAN
  9885. ): NTSTATUS; stdcall;
  9886. begin
  9887. GetProcedureAddress(_NtCreateEvent, ntdll, 'NtCreateEvent');
  9888. Result := TFNNtCreateEvent(_NtCreateEvent)(
  9889. EventHandle, DesiredAccess, ObjectAttributes, EventType, InitialState
  9890. );
  9891. end;
  9892. // Dynamic version of NtCreateEvent
  9893. function ZwCreateEvent(
  9894. EventHandle : PHANDLE;
  9895. DesiredAccess : ACCESS_MASK;
  9896. ObjectAttributes : POBJECT_ATTRIBUTES;
  9897. EventType : EVENT_TYPE;
  9898. InitialState : BOOLEAN
  9899. ): NTSTATUS; stdcall;
  9900. begin
  9901. GetProcedureAddress(_NtCreateEvent, ntdll, 'NtCreateEvent');
  9902. Result := TFNNtCreateEvent(_NtCreateEvent)(
  9903. EventHandle, DesiredAccess, ObjectAttributes, EventType, InitialState
  9904. );
  9905. end;
  9906. // Dynamic version of NtCreateEventPair
  9907. function NtCreateEventPair(
  9908. EventPairHandle : PHANDLE;
  9909. DesiredAccess : ACCESS_MASK;
  9910. ObjectAttributes : POBJECT_ATTRIBUTES
  9911. ): NTSTATUS; stdcall;
  9912. begin
  9913. GetProcedureAddress(_NtCreateEventPair, ntdll, 'NtCreateEventPair');
  9914. Result := TFNNtCreateEventPair(_NtCreateEventPair)(
  9915. EventPairHandle, DesiredAccess, ObjectAttributes
  9916. );
  9917. end;
  9918. // Dynamic version of NtCreateEventPair
  9919. function ZwCreateEventPair(
  9920. EventPairHandle : PHANDLE;
  9921. DesiredAccess : ACCESS_MASK;
  9922. ObjectAttributes : POBJECT_ATTRIBUTES
  9923. ): NTSTATUS; stdcall;
  9924. begin
  9925. GetProcedureAddress(_NtCreateEventPair, ntdll, 'NtCreateEventPair');
  9926. Result := TFNNtCreateEventPair(_NtCreateEventPair)(
  9927. EventPairHandle, DesiredAccess, ObjectAttributes
  9928. );
  9929. end;
  9930. // Dynamic version of NtCreateFile
  9931. function NtCreateFile(
  9932. FileHandle : PHANDLE;
  9933. DesiredAccess : ACCESS_MASK;
  9934. ObjectAttributes : POBJECT_ATTRIBUTES;
  9935. IoStatusBlock : PIO_STATUS_BLOCK;
  9936. AllocationSize : PLARGE_INTEGER;
  9937. FileAttributes : ULONG;
  9938. ShareAccess : ULONG;
  9939. CreateDisposition : ULONG;
  9940. CreateOptions : ULONG;
  9941. EaBuffer : PVOID;
  9942. EaLength : ULONG
  9943. ): NTSTATUS; stdcall;
  9944. begin
  9945. GetProcedureAddress(_NtCreateFile, ntdll, 'NtCreateFile');
  9946. Result := TFNNtCreateFile(_NtCreateFile)(
  9947. FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock, AllocationSize, FileAttributes, ShareAccess, CreateDisposition, CreateOptions, EaBuffer, EaLength
  9948. );
  9949. end;
  9950. // Dynamic version of NtCreateFile
  9951. function ZwCreateFile(
  9952. FileHandle : PHANDLE;
  9953. DesiredAccess : ACCESS_MASK;
  9954. ObjectAttributes : POBJECT_ATTRIBUTES;
  9955. IoStatusBlock : PIO_STATUS_BLOCK;
  9956. AllocationSize : PLARGE_INTEGER;
  9957. FileAttributes : ULONG;
  9958. ShareAccess : ULONG;
  9959. CreateDisposition : ULONG;
  9960. CreateOptions : ULONG;
  9961. EaBuffer : PVOID;
  9962. EaLength : ULONG
  9963. ): NTSTATUS; stdcall;
  9964. begin
  9965. GetProcedureAddress(_NtCreateFile, ntdll, 'NtCreateFile');
  9966. Result := TFNNtCreateFile(_NtCreateFile)(
  9967. FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock, AllocationSize, FileAttributes, ShareAccess, CreateDisposition, CreateOptions, EaBuffer, EaLength
  9968. );
  9969. end;
  9970. // Dynamic version of NtCreateIoCompletion
  9971. function NtCreateIoCompletion(
  9972. IoCompletionHandle : PHANDLE;
  9973. DesiredAccess : ACCESS_MASK;
  9974. ObjectAttributes : POBJECT_ATTRIBUTES;
  9975. NumberOfConcurrentThreads : ULONG
  9976. ): NTSTATUS; stdcall;
  9977. begin
  9978. GetProcedureAddress(_NtCreateIoCompletion, ntdll, 'NtCreateIoCompletion');
  9979. Result := TFNNtCreateIoCompletion(_NtCreateIoCompletion)(
  9980. IoCompletionHandle, DesiredAccess, ObjectAttributes, NumberOfConcurrentThreads
  9981. );
  9982. end;
  9983. // Dynamic version of NtCreateIoCompletion
  9984. function ZwCreateIoCompletion(
  9985. IoCompletionHandle : PHANDLE;
  9986. DesiredAccess : ACCESS_MASK;
  9987. ObjectAttributes : POBJECT_ATTRIBUTES;
  9988. NumberOfConcurrentThreads : ULONG
  9989. ): NTSTATUS; stdcall;
  9990. begin
  9991. GetProcedureAddress(_NtCreateIoCompletion, ntdll, 'NtCreateIoCompletion');
  9992. Result := TFNNtCreateIoCompletion(_NtCreateIoCompletion)(
  9993. IoCompletionHandle, DesiredAccess, ObjectAttributes, NumberOfConcurrentThreads
  9994. );
  9995. end;
  9996. // Dynamic version of NtCreateJobObject
  9997. function NtCreateJobObject(
  9998. JobHandle : PHANDLE;
  9999. DesiredAccess : ACCESS_MASK;
  10000. ObjectAttributes : POBJECT_ATTRIBUTES
  10001. ): NTSTATUS; stdcall;
  10002. begin
  10003. GetProcedureAddress(_NtCreateJobObject, ntdll, 'NtCreateJobObject');
  10004. Result := TFNNtCreateJobObject(_NtCreateJobObject)(
  10005. JobHandle, DesiredAccess, ObjectAttributes
  10006. );
  10007. end;
  10008. // Dynamic version of NtCreateJobObject
  10009. function ZwCreateJobObject(
  10010. JobHandle : PHANDLE;
  10011. DesiredAccess : ACCESS_MASK;
  10012. ObjectAttributes : POBJECT_ATTRIBUTES
  10013. ): NTSTATUS; stdcall;
  10014. begin
  10015. GetProcedureAddress(_NtCreateJobObject, ntdll, 'NtCreateJobObject');
  10016. Result := TFNNtCreateJobObject(_NtCreateJobObject)(
  10017. JobHandle, DesiredAccess, ObjectAttributes
  10018. );
  10019. end;
  10020. // Dynamic version of NtCreateKey
  10021. function NtCreateKey(
  10022. KeyHandle : PHANDLE;
  10023. DesiredAccess : ACCESS_MASK;
  10024. ObjectAttributes : POBJECT_ATTRIBUTES;
  10025. TitleIndex : ULONG;
  10026. Class_ : PUNICODE_STRING;
  10027. CreateOptions : ULONG;
  10028. Disposition : PULONG
  10029. ): NTSTATUS; stdcall;
  10030. begin
  10031. GetProcedureAddress(_NtCreateKey, ntdll, 'NtCreateKey');
  10032. Result := TFNNtCreateKey(_NtCreateKey)(
  10033. KeyHandle, DesiredAccess, ObjectAttributes, TitleIndex, Class_, CreateOptions, Disposition
  10034. );
  10035. end;
  10036. // Dynamic version of NtCreateKey
  10037. function ZwCreateKey(
  10038. KeyHandle : PHANDLE;
  10039. DesiredAccess : ACCESS_MASK;
  10040. ObjectAttributes : POBJECT_ATTRIBUTES;
  10041. TitleIndex : ULONG;
  10042. Class_ : PUNICODE_STRING;
  10043. CreateOptions : ULONG;
  10044. Disposition : PULONG
  10045. ): NTSTATUS; stdcall;
  10046. begin
  10047. GetProcedureAddress(_NtCreateKey, ntdll, 'NtCreateKey');
  10048. Result := TFNNtCreateKey(_NtCreateKey)(
  10049. KeyHandle, DesiredAccess, ObjectAttributes, TitleIndex, Class_, CreateOptions, Disposition
  10050. );
  10051. end;
  10052. // Dynamic version of NtCreateMailslotFile
  10053. function NtCreateMailslotFile(
  10054. FileHandle : PHANDLE;
  10055. DesiredAccess : ACCESS_MASK;
  10056. ObjectAttributes : POBJECT_ATTRIBUTES;
  10057. IoStatusBlock : PIO_STATUS_BLOCK;
  10058. CreateOptions : ULONG;
  10059. Unknown : ULONG;
  10060. MaxMessageSize : ULONG;
  10061. ReadTimeout : PLARGE_INTEGER
  10062. ): NTSTATUS; stdcall;
  10063. begin
  10064. GetProcedureAddress(_NtCreateMailslotFile, ntdll, 'NtCreateMailslotFile');
  10065. Result := TFNNtCreateMailslotFile(_NtCreateMailslotFile)(
  10066. FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock, CreateOptions, Unknown, MaxMessageSize, ReadTimeout
  10067. );
  10068. end;
  10069. // Dynamic version of NtCreateMailslotFile
  10070. function ZwCreateMailslotFile(
  10071. FileHandle : PHANDLE;
  10072. DesiredAccess : ACCESS_MASK;
  10073. ObjectAttributes : POBJECT_ATTRIBUTES;
  10074. IoStatusBlock : PIO_STATUS_BLOCK;
  10075. CreateOptions : ULONG;
  10076. Unknown : ULONG;
  10077. MaxMessageSize : ULONG;
  10078. ReadTimeout : PLARGE_INTEGER
  10079. ): NTSTATUS; stdcall;
  10080. begin
  10081. GetProcedureAddress(_NtCreateMailslotFile, ntdll, 'NtCreateMailslotFile');
  10082. Result := TFNNtCreateMailslotFile(_NtCreateMailslotFile)(
  10083. FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock, CreateOptions, Unknown, MaxMessageSize, ReadTimeout
  10084. );
  10085. end;
  10086. // Dynamic version of NtCreateMutant
  10087. function NtCreateMutant(
  10088. MutantHandle : PHANDLE;
  10089. DesiredAccess : ACCESS_MASK;
  10090. ObjectAttributes : POBJECT_ATTRIBUTES;
  10091. InitialOwner : BOOLEAN
  10092. ): NTSTATUS; stdcall;
  10093. begin
  10094. GetProcedureAddress(_NtCreateMutant, ntdll, 'NtCreateMutant');
  10095. Result := TFNNtCreateMutant(_NtCreateMutant)(
  10096. MutantHandle, DesiredAccess, ObjectAttributes, InitialOwner
  10097. );
  10098. end;
  10099. // Dynamic version of NtCreateMutant
  10100. function ZwCreateMutant(
  10101. MutantHandle : PHANDLE;
  10102. DesiredAccess : ACCESS_MASK;
  10103. ObjectAttributes : POBJECT_ATTRIBUTES;
  10104. InitialOwner : BOOLEAN
  10105. ): NTSTATUS; stdcall;
  10106. begin
  10107. GetProcedureAddress(_NtCreateMutant, ntdll, 'NtCreateMutant');
  10108. Result := TFNNtCreateMutant(_NtCreateMutant)(
  10109. MutantHandle, DesiredAccess, ObjectAttributes, InitialOwner
  10110. );
  10111. end;
  10112. // Dynamic version of NtCreateNamedPipeFile
  10113. function NtCreateNamedPipeFile(
  10114. FileHandle : PHANDLE;
  10115. DesiredAccess : ACCESS_MASK;
  10116. ObjectAttributes : POBJECT_ATTRIBUTES;
  10117. IoStatusBlock : PIO_STATUS_BLOCK;
  10118. ShareAccess : ULONG;
  10119. CreateDisposition : ULONG;
  10120. CreateOptions : ULONG;
  10121. TypeMessage : BOOLEAN;
  10122. ReadmodeMessage : BOOLEAN;
  10123. Nonblocking : BOOLEAN;
  10124. MaxInstances : ULONG;
  10125. InBufferSize : ULONG;
  10126. OutBufferSize : ULONG;
  10127. DefaultTimeout : PLARGE_INTEGER
  10128. ): NTSTATUS; stdcall;
  10129. begin
  10130. GetProcedureAddress(_NtCreateNamedPipeFile, ntdll, 'NtCreateNamedPipeFile');
  10131. Result := TFNNtCreateNamedPipeFile(_NtCreateNamedPipeFile)(
  10132. FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock, ShareAccess, CreateDisposition, CreateOptions, TypeMessage, ReadmodeMessage, Nonblocking, MaxInstances, InBufferSize, OutBufferSize, DefaultTimeout
  10133. );
  10134. end;
  10135. // Dynamic version of NtCreateNamedPipeFile
  10136. function ZwCreateNamedPipeFile(
  10137. FileHandle : PHANDLE;
  10138. DesiredAccess : ACCESS_MASK;
  10139. ObjectAttributes : POBJECT_ATTRIBUTES;
  10140. IoStatusBlock : PIO_STATUS_BLOCK;
  10141. ShareAccess : ULONG;
  10142. CreateDisposition : ULONG;
  10143. CreateOptions : ULONG;
  10144. TypeMessage : BOOLEAN;
  10145. ReadmodeMessage : BOOLEAN;
  10146. Nonblocking : BOOLEAN;
  10147. MaxInstances : ULONG;
  10148. InBufferSize : ULONG;
  10149. OutBufferSize : ULONG;
  10150. DefaultTimeout : PLARGE_INTEGER
  10151. ): NTSTATUS; stdcall;
  10152. begin
  10153. GetProcedureAddress(_NtCreateNamedPipeFile, ntdll, 'NtCreateNamedPipeFile');
  10154. Result := TFNNtCreateNamedPipeFile(_NtCreateNamedPipeFile)(
  10155. FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock, ShareAccess, CreateDisposition, CreateOptions, TypeMessage, ReadmodeMessage, Nonblocking, MaxInstances, InBufferSize, OutBufferSize, DefaultTimeout
  10156. );
  10157. end;
  10158. // Dynamic version of NtCreatePagingFile
  10159. function NtCreatePagingFile(
  10160. FileName : PUNICODE_STRING;
  10161. InitialSize : PULARGE_INTEGER;
  10162. MaximumSize : PULARGE_INTEGER;
  10163. Reserved : ULONG
  10164. ): NTSTATUS; stdcall;
  10165. begin
  10166. GetProcedureAddress(_NtCreatePagingFile, ntdll, 'NtCreatePagingFile');
  10167. Result := TFNNtCreatePagingFile(_NtCreatePagingFile)(
  10168. FileName, InitialSize, MaximumSize, Reserved
  10169. );
  10170. end;
  10171. // Dynamic version of NtCreatePagingFile
  10172. function ZwCreatePagingFile(
  10173. FileName : PUNICODE_STRING;
  10174. InitialSize : PULARGE_INTEGER;
  10175. MaximumSize : PULARGE_INTEGER;
  10176. Reserved : ULONG
  10177. ): NTSTATUS; stdcall;
  10178. begin
  10179. GetProcedureAddress(_NtCreatePagingFile, ntdll, 'NtCreatePagingFile');
  10180. Result := TFNNtCreatePagingFile(_NtCreatePagingFile)(
  10181. FileName, InitialSize, MaximumSize, Reserved
  10182. );
  10183. end;
  10184. // Dynamic version of NtCreatePort
  10185. function NtCreatePort(
  10186. PortHandle : PHANDLE;
  10187. ObjectAttributes : POBJECT_ATTRIBUTES;
  10188. MaxDataSize : ULONG;
  10189. MaxMessageSize : ULONG;
  10190. Reserved : ULONG
  10191. ): NTSTATUS; stdcall;
  10192. begin
  10193. GetProcedureAddress(_NtCreatePort, ntdll, 'NtCreatePort');
  10194. Result := TFNNtCreatePort(_NtCreatePort)(
  10195. PortHandle, ObjectAttributes, MaxDataSize, MaxMessageSize, Reserved
  10196. );
  10197. end;
  10198. // Dynamic version of NtCreatePort
  10199. function ZwCreatePort(
  10200. PortHandle : PHANDLE;
  10201. ObjectAttributes : POBJECT_ATTRIBUTES;
  10202. MaxDataSize : ULONG;
  10203. MaxMessageSize : ULONG;
  10204. Reserved : ULONG
  10205. ): NTSTATUS; stdcall;
  10206. begin
  10207. GetProcedureAddress(_NtCreatePort, ntdll, 'NtCreatePort');
  10208. Result := TFNNtCreatePort(_NtCreatePort)(
  10209. PortHandle, ObjectAttributes, MaxDataSize, MaxMessageSize, Reserved
  10210. );
  10211. end;
  10212. // Dynamic version of NtCreateProcess
  10213. function NtCreateProcess(
  10214. ProcessHandle : PHANDLE;
  10215. DesiredAccess : ACCESS_MASK;
  10216. ObjectAttributes : POBJECT_ATTRIBUTES;
  10217. InheritFromProcessHandle : HANDLE;
  10218. InheritHandles : BOOLEAN;
  10219. SectionHandle : HANDLE;
  10220. DebugPort : HANDLE;
  10221. ExceptionPort : HANDLE
  10222. ): NTSTATUS; stdcall;
  10223. begin
  10224. GetProcedureAddress(_NtCreateProcess, ntdll, 'NtCreateProcess');
  10225. Result := TFNNtCreateProcess(_NtCreateProcess)(
  10226. ProcessHandle, DesiredAccess, ObjectAttributes, InheritFromProcessHandle, InheritHandles, SectionHandle, DebugPort, ExceptionPort
  10227. );
  10228. end;
  10229. // Dynamic version of NtCreateProcess
  10230. function ZwCreateProcess(
  10231. ProcessHandle : PHANDLE;
  10232. DesiredAccess : ACCESS_MASK;
  10233. ObjectAttributes : POBJECT_ATTRIBUTES;
  10234. InheritFromProcessHandle : HANDLE;
  10235. InheritHandles : BOOLEAN;
  10236. SectionHandle : HANDLE;
  10237. DebugPort : HANDLE;
  10238. ExceptionPort : HANDLE
  10239. ): NTSTATUS; stdcall;
  10240. begin
  10241. GetProcedureAddress(_NtCreateProcess, ntdll, 'NtCreateProcess');
  10242. Result := TFNNtCreateProcess(_NtCreateProcess)(
  10243. ProcessHandle, DesiredAccess, ObjectAttributes, InheritFromProcessHandle, InheritHandles, SectionHandle, DebugPort, ExceptionPort
  10244. );
  10245. end;
  10246. // Dynamic version of NtCreateProfile
  10247. function NtCreateProfile(
  10248. ProfileHandle : PHANDLE;
  10249. ProcessHandle : HANDLE;
  10250. Base : PVOID;
  10251. Size : ULONG;
  10252. BucketShift : ULONG;
  10253. Buffer : PULONG;
  10254. BufferLength : ULONG;
  10255. Source : KPROFILE_SOURCE;
  10256. ProcessorMask : ULONG
  10257. ): NTSTATUS; stdcall;
  10258. begin
  10259. GetProcedureAddress(_NtCreateProfile, ntdll, 'NtCreateProfile');
  10260. Result := TFNNtCreateProfile(_NtCreateProfile)(
  10261. ProfileHandle, ProcessHandle, Base, Size, BucketShift, Buffer, BufferLength, Source, ProcessorMask
  10262. );
  10263. end;
  10264. // Dynamic version of NtCreateProfile
  10265. function ZwCreateProfile(
  10266. ProfileHandle : PHANDLE;
  10267. ProcessHandle : HANDLE;
  10268. Base : PVOID;
  10269. Size : ULONG;
  10270. BucketShift : ULONG;
  10271. Buffer : PULONG;
  10272. BufferLength : ULONG;
  10273. Source : KPROFILE_SOURCE;
  10274. ProcessorMask : ULONG
  10275. ): NTSTATUS; stdcall;
  10276. begin
  10277. GetProcedureAddress(_NtCreateProfile, ntdll, 'NtCreateProfile');
  10278. Result := TFNNtCreateProfile(_NtCreateProfile)(
  10279. ProfileHandle, ProcessHandle, Base, Size, BucketShift, Buffer, BufferLength, Source, ProcessorMask
  10280. );
  10281. end;
  10282. // Dynamic version of NtCreateSection
  10283. function NtCreateSection(
  10284. SectionHandle : PHANDLE;
  10285. DesiredAccess : ACCESS_MASK;
  10286. ObjectAttributes : POBJECT_ATTRIBUTES;
  10287. SectionSize : PLARGE_INTEGER;
  10288. Protect : ULONG;
  10289. Attributes : ULONG;
  10290. FileHandle : HANDLE
  10291. ): NTSTATUS; stdcall;
  10292. begin
  10293. GetProcedureAddress(_NtCreateSection, ntdll, 'NtCreateSection');
  10294. Result := TFNNtCreateSection(_NtCreateSection)(
  10295. SectionHandle, DesiredAccess, ObjectAttributes, SectionSize, Protect, Attributes, FileHandle
  10296. );
  10297. end;
  10298. // Dynamic version of NtCreateSection
  10299. function ZwCreateSection(
  10300. SectionHandle : PHANDLE;
  10301. DesiredAccess : ACCESS_MASK;
  10302. ObjectAttributes : POBJECT_ATTRIBUTES;
  10303. SectionSize : PLARGE_INTEGER;
  10304. Protect : ULONG;
  10305. Attributes : ULONG;
  10306. FileHandle : HANDLE
  10307. ): NTSTATUS; stdcall;
  10308. begin
  10309. GetProcedureAddress(_NtCreateSection, ntdll, 'NtCreateSection');
  10310. Result := TFNNtCreateSection(_NtCreateSection)(
  10311. SectionHandle, DesiredAccess, ObjectAttributes, SectionSize, Protect, Attributes, FileHandle
  10312. );
  10313. end;
  10314. // Dynamic version of NtCreateSemaphore
  10315. function NtCreateSemaphore(
  10316. SemaphoreHandle : PHANDLE;
  10317. DesiredAccess : ACCESS_MASK;
  10318. ObjectAttributes : POBJECT_ATTRIBUTES;
  10319. InitialCount : LONG;
  10320. MaximumCount : LONG
  10321. ): NTSTATUS; stdcall;
  10322. begin
  10323. GetProcedureAddress(_NtCreateSemaphore, ntdll, 'NtCreateSemaphore');
  10324. Result := TFNNtCreateSemaphore(_NtCreateSemaphore)(
  10325. SemaphoreHandle, DesiredAccess, ObjectAttributes, InitialCount, MaximumCount
  10326. );
  10327. end;
  10328. // Dynamic version of NtCreateSemaphore
  10329. function ZwCreateSemaphore(
  10330. SemaphoreHandle : PHANDLE;
  10331. DesiredAccess : ACCESS_MASK;
  10332. ObjectAttributes : POBJECT_ATTRIBUTES;
  10333. InitialCount : LONG;
  10334. MaximumCount : LONG
  10335. ): NTSTATUS; stdcall;
  10336. begin
  10337. GetProcedureAddress(_NtCreateSemaphore, ntdll, 'NtCreateSemaphore');
  10338. Result := TFNNtCreateSemaphore(_NtCreateSemaphore)(
  10339. SemaphoreHandle, DesiredAccess, ObjectAttributes, InitialCount, MaximumCount
  10340. );
  10341. end;
  10342. // Dynamic version of NtCreateSymbolicLinkObject
  10343. function NtCreateSymbolicLinkObject(
  10344. SymbolicLinkHandle : PHANDLE;
  10345. DesiredAccess : ACCESS_MASK;
  10346. ObjectAttributes : POBJECT_ATTRIBUTES;
  10347. TargetName : PUNICODE_STRING
  10348. ): NTSTATUS; stdcall;
  10349. begin
  10350. GetProcedureAddress(_NtCreateSymbolicLinkObject, ntdll, 'NtCreateSymbolicLinkObject');
  10351. Result := TFNNtCreateSymbolicLinkObject(_NtCreateSymbolicLinkObject)(
  10352. SymbolicLinkHandle, DesiredAccess, ObjectAttributes, TargetName
  10353. );
  10354. end;
  10355. // Dynamic version of NtCreateSymbolicLinkObject
  10356. function ZwCreateSymbolicLinkObject(
  10357. SymbolicLinkHandle : PHANDLE;
  10358. DesiredAccess : ACCESS_MASK;
  10359. ObjectAttributes : POBJECT_ATTRIBUTES;
  10360. TargetName : PUNICODE_STRING
  10361. ): NTSTATUS; stdcall;
  10362. begin
  10363. GetProcedureAddress(_NtCreateSymbolicLinkObject, ntdll, 'NtCreateSymbolicLinkObject');
  10364. Result := TFNNtCreateSymbolicLinkObject(_NtCreateSymbolicLinkObject)(
  10365. SymbolicLinkHandle, DesiredAccess, ObjectAttributes, TargetName
  10366. );
  10367. end;
  10368. // Dynamic version of NtCreateThread
  10369. function NtCreateThread(
  10370. ThreadHandle : PHANDLE;
  10371. DesiredAccess : ACCESS_MASK;
  10372. ObjectAttributes : POBJECT_ATTRIBUTES;
  10373. ProcessHandle : HANDLE;
  10374. ClientId : PCLIENT_ID;
  10375. ThreadContext : PCONTEXT;
  10376. UserStack : PUSER_STACK;
  10377. CreateSuspended : BOOLEAN
  10378. ): NTSTATUS; stdcall;
  10379. begin
  10380. GetProcedureAddress(_NtCreateThread, ntdll, 'NtCreateThread');
  10381. Result := TFNNtCreateThread(_NtCreateThread)(
  10382. ThreadHandle, DesiredAccess, ObjectAttributes, ProcessHandle, ClientId, ThreadContext, UserStack, CreateSuspended
  10383. );
  10384. end;
  10385. // Dynamic version of NtCreateThread
  10386. function ZwCreateThread(
  10387. ThreadHandle : PHANDLE;
  10388. DesiredAccess : ACCESS_MASK;
  10389. ObjectAttributes : POBJECT_ATTRIBUTES;
  10390. ProcessHandle : HANDLE;
  10391. ClientId : PCLIENT_ID;
  10392. ThreadContext : PCONTEXT;
  10393. UserStack : PUSER_STACK;
  10394. CreateSuspended : BOOLEAN
  10395. ): NTSTATUS; stdcall;
  10396. begin
  10397. GetProcedureAddress(_NtCreateThread, ntdll, 'NtCreateThread');
  10398. Result := TFNNtCreateThread(_NtCreateThread)(
  10399. ThreadHandle, DesiredAccess, ObjectAttributes, ProcessHandle, ClientId, ThreadContext, UserStack, CreateSuspended
  10400. );
  10401. end;
  10402. // Dynamic version of NtCreateTimer
  10403. function NtCreateTimer(
  10404. TimerHandle : PHANDLE;
  10405. DesiredAccess : ACCESS_MASK;
  10406. ObjectAttributes : POBJECT_ATTRIBUTES;
  10407. TimerType : TIMER_TYPE
  10408. ): NTSTATUS; stdcall;
  10409. begin
  10410. GetProcedureAddress(_NtCreateTimer, ntdll, 'NtCreateTimer');
  10411. Result := TFNNtCreateTimer(_NtCreateTimer)(
  10412. TimerHandle, DesiredAccess, ObjectAttributes, TimerType
  10413. );
  10414. end;
  10415. // Dynamic version of NtCreateTimer
  10416. function ZwCreateTimer(
  10417. TimerHandle : PHANDLE;
  10418. DesiredAccess : ACCESS_MASK;
  10419. ObjectAttributes : POBJECT_ATTRIBUTES;
  10420. TimerType : TIMER_TYPE
  10421. ): NTSTATUS; stdcall;
  10422. begin
  10423. GetProcedureAddress(_NtCreateTimer, ntdll, 'NtCreateTimer');
  10424. Result := TFNNtCreateTimer(_NtCreateTimer)(
  10425. TimerHandle, DesiredAccess, ObjectAttributes, TimerType
  10426. );
  10427. end;
  10428. // Dynamic version of NtCreateToken
  10429. function NtCreateToken(
  10430. TokenHandle : PHANDLE;
  10431. DesiredAccess : ACCESS_MASK;
  10432. ObjectAttributes : POBJECT_ATTRIBUTES;
  10433. Type_ : TOKEN_TYPE;
  10434. AuthenticationId : PLUID;
  10435. ExpirationTime : PLARGE_INTEGER;
  10436. User : PTOKEN_USER;
  10437. Groups : PTOKEN_GROUPS;
  10438. Privileges : PTOKEN_PRIVILEGES;
  10439. Owner : PTOKEN_OWNER;
  10440. PrimaryGroup : PTOKEN_PRIMARY_GROUP;
  10441. DefaultDacl : PTOKEN_DEFAULT_DACL;
  10442. Source : PTOKEN_SOURCE
  10443. ): NTSTATUS; stdcall;
  10444. begin
  10445. GetProcedureAddress(_NtCreateToken, ntdll, 'NtCreateToken');
  10446. Result := TFNNtCreateToken(_NtCreateToken)(
  10447. TokenHandle, DesiredAccess, ObjectAttributes, Type_, AuthenticationId, ExpirationTime, User, Groups, Privileges, Owner, PrimaryGroup, DefaultDacl, Source
  10448. );
  10449. end;
  10450. // Dynamic version of NtCreateToken
  10451. function ZwCreateToken(
  10452. TokenHandle : PHANDLE;
  10453. DesiredAccess : ACCESS_MASK;
  10454. ObjectAttributes : POBJECT_ATTRIBUTES;
  10455. Type_ : TOKEN_TYPE;
  10456. AuthenticationId : PLUID;
  10457. ExpirationTime : PLARGE_INTEGER;
  10458. User : PTOKEN_USER;
  10459. Groups : PTOKEN_GROUPS;
  10460. Privileges : PTOKEN_PRIVILEGES;
  10461. Owner : PTOKEN_OWNER;
  10462. PrimaryGroup : PTOKEN_PRIMARY_GROUP;
  10463. DefaultDacl : PTOKEN_DEFAULT_DACL;
  10464. Source : PTOKEN_SOURCE
  10465. ): NTSTATUS; stdcall;
  10466. begin
  10467. GetProcedureAddress(_NtCreateToken, ntdll, 'NtCreateToken');
  10468. Result := TFNNtCreateToken(_NtCreateToken)(
  10469. TokenHandle, DesiredAccess, ObjectAttributes, Type_, AuthenticationId, ExpirationTime, User, Groups, Privileges, Owner, PrimaryGroup, DefaultDacl, Source
  10470. );
  10471. end;
  10472. // Dynamic version of NtCreateWaitablePort
  10473. function NtCreateWaitablePort(
  10474. PortHandle : PHANDLE;
  10475. ObjectAttributes : POBJECT_ATTRIBUTES;
  10476. MaxDataSize : ULONG;
  10477. MaxMessageSize : ULONG;
  10478. Reserved : ULONG
  10479. ): NTSTATUS; stdcall;
  10480. begin
  10481. GetProcedureAddress(_NtCreateWaitablePort, ntdll, 'NtCreateWaitablePort');
  10482. Result := TFNNtCreateWaitablePort(_NtCreateWaitablePort)(
  10483. PortHandle, ObjectAttributes, MaxDataSize, MaxMessageSize, Reserved
  10484. );
  10485. end;
  10486. // Dynamic version of NtCreateWaitablePort
  10487. function ZwCreateWaitablePort(
  10488. PortHandle : PHANDLE;
  10489. ObjectAttributes : POBJECT_ATTRIBUTES;
  10490. MaxDataSize : ULONG;
  10491. MaxMessageSize : ULONG;
  10492. Reserved : ULONG
  10493. ): NTSTATUS; stdcall;
  10494. begin
  10495. GetProcedureAddress(_NtCreateWaitablePort, ntdll, 'NtCreateWaitablePort');
  10496. Result := TFNNtCreateWaitablePort(_NtCreateWaitablePort)(
  10497. PortHandle, ObjectAttributes, MaxDataSize, MaxMessageSize, Reserved
  10498. );
  10499. end;
  10500. // Dynamic version of NtCurrentTeb
  10501. function NtCurrentTeb(): PTEB; stdcall;
  10502. begin
  10503. GetProcedureAddress(_NtCurrentTeb, ntdll, 'NtCurrentTeb');
  10504. Result := TFNNtCurrentTeb(_NtCurrentTeb)();
  10505. end;
  10506. // Dynamic version of NtCurrentTeb
  10507. function ZwCurrentTeb(): PTEB; stdcall;
  10508. begin
  10509. GetProcedureAddress(_NtCurrentTeb, ntdll, 'NtCurrentTeb');
  10510. Result := TFNNtCurrentTeb(_NtCurrentTeb)();
  10511. end;
  10512. // Dynamic version of NtDebugActiveProcess
  10513. function NtDebugActiveProcess(
  10514. hProcess : HANDLE;
  10515. hDebugObject : HANDLE
  10516. ): NTSTATUS; stdcall;
  10517. begin
  10518. GetProcedureAddress(_NtDebugActiveProcess, ntdll, 'NtDebugActiveProcess');
  10519. Result := TFNNtDebugActiveProcess(_NtDebugActiveProcess)(
  10520. hProcess, hDebugObject
  10521. );
  10522. end;
  10523. // Dynamic version of NtDebugActiveProcess
  10524. function ZwDebugActiveProcess(
  10525. hProcess : HANDLE;
  10526. hDebugObject : HANDLE
  10527. ): NTSTATUS; stdcall;
  10528. begin
  10529. GetProcedureAddress(_NtDebugActiveProcess, ntdll, 'NtDebugActiveProcess');
  10530. Result := TFNNtDebugActiveProcess(_NtDebugActiveProcess)(
  10531. hProcess, hDebugObject
  10532. );
  10533. end;
  10534. // Dynamic version of NtDelayExecution
  10535. function NtDelayExecution(
  10536. Alertable : BOOLEAN;
  10537. Interval : PLARGE_INTEGER
  10538. ): NTSTATUS; stdcall;
  10539. begin
  10540. GetProcedureAddress(_NtDelayExecution, ntdll, 'NtDelayExecution');
  10541. Result := TFNNtDelayExecution(_NtDelayExecution)(
  10542. Alertable, Interval
  10543. );
  10544. end;
  10545. // Dynamic version of NtDelayExecution
  10546. function ZwDelayExecution(
  10547. Alertable : BOOLEAN;
  10548. Interval : PLARGE_INTEGER
  10549. ): NTSTATUS; stdcall;
  10550. begin
  10551. GetProcedureAddress(_NtDelayExecution, ntdll, 'NtDelayExecution');
  10552. Result := TFNNtDelayExecution(_NtDelayExecution)(
  10553. Alertable, Interval
  10554. );
  10555. end;
  10556. // Dynamic version of NtDeleteAtom
  10557. function NtDeleteAtom(
  10558. Atom : USHORT
  10559. ): NTSTATUS; stdcall;
  10560. begin
  10561. GetProcedureAddress(_NtDeleteAtom, ntdll, 'NtDeleteAtom');
  10562. Result := TFNNtDeleteAtom(_NtDeleteAtom)(
  10563. Atom
  10564. );
  10565. end;
  10566. // Dynamic version of NtDeleteAtom
  10567. function ZwDeleteAtom(
  10568. Atom : USHORT
  10569. ): NTSTATUS; stdcall;
  10570. begin
  10571. GetProcedureAddress(_NtDeleteAtom, ntdll, 'NtDeleteAtom');
  10572. Result := TFNNtDeleteAtom(_NtDeleteAtom)(
  10573. Atom
  10574. );
  10575. end;
  10576. // Dynamic version of NtDeleteFile
  10577. function NtDeleteFile(
  10578. ObjectAttributes : POBJECT_ATTRIBUTES
  10579. ): NTSTATUS; stdcall;
  10580. begin
  10581. GetProcedureAddress(_NtDeleteFile, ntdll, 'NtDeleteFile');
  10582. Result := TFNNtDeleteFile(_NtDeleteFile)(
  10583. ObjectAttributes
  10584. );
  10585. end;
  10586. // Dynamic version of NtDeleteFile
  10587. function ZwDeleteFile(
  10588. ObjectAttributes : POBJECT_ATTRIBUTES
  10589. ): NTSTATUS; stdcall;
  10590. begin
  10591. GetProcedureAddress(_NtDeleteFile, ntdll, 'NtDeleteFile');
  10592. Result := TFNNtDeleteFile(_NtDeleteFile)(
  10593. ObjectAttributes
  10594. );
  10595. end;
  10596. // Dynamic version of NtDeleteKey
  10597. function NtDeleteKey(
  10598. KeyHandle : HANDLE
  10599. ): NTSTATUS; stdcall;
  10600. begin
  10601. GetProcedureAddress(_NtDeleteKey, ntdll, 'NtDeleteKey');
  10602. Result := TFNNtDeleteKey(_NtDeleteKey)(
  10603. KeyHandle
  10604. );
  10605. end;
  10606. // Dynamic version of NtDeleteKey
  10607. function ZwDeleteKey(
  10608. KeyHandle : HANDLE
  10609. ): NTSTATUS; stdcall;
  10610. begin
  10611. GetProcedureAddress(_NtDeleteKey, ntdll, 'NtDeleteKey');
  10612. Result := TFNNtDeleteKey(_NtDeleteKey)(
  10613. KeyHandle
  10614. );
  10615. end;
  10616. // Dynamic version of NtDeleteObjectAuditAlarm
  10617. function NtDeleteObjectAuditAlarm(
  10618. SubsystemName : PUNICODE_STRING;
  10619. HandleId : PVOID;
  10620. GenerateOnClose : BOOLEAN
  10621. ): NTSTATUS; stdcall;
  10622. begin
  10623. GetProcedureAddress(_NtDeleteObjectAuditAlarm, ntdll, 'NtDeleteObjectAuditAlarm');
  10624. Result := TFNNtDeleteObjectAuditAlarm(_NtDeleteObjectAuditAlarm)(
  10625. SubsystemName, HandleId, GenerateOnClose
  10626. );
  10627. end;
  10628. // Dynamic version of NtDeleteObjectAuditAlarm
  10629. function ZwDeleteObjectAuditAlarm(
  10630. SubsystemName : PUNICODE_STRING;
  10631. HandleId : PVOID;
  10632. GenerateOnClose : BOOLEAN
  10633. ): NTSTATUS; stdcall;
  10634. begin
  10635. GetProcedureAddress(_NtDeleteObjectAuditAlarm, ntdll, 'NtDeleteObjectAuditAlarm');
  10636. Result := TFNNtDeleteObjectAuditAlarm(_NtDeleteObjectAuditAlarm)(
  10637. SubsystemName, HandleId, GenerateOnClose
  10638. );
  10639. end;
  10640. // Dynamic version of NtDeleteValueKey
  10641. function NtDeleteValueKey(
  10642. KeyHandle : HANDLE;
  10643. ValueName : PUNICODE_STRING
  10644. ): NTSTATUS; stdcall;
  10645. begin
  10646. GetProcedureAddress(_NtDeleteValueKey, ntdll, 'NtDeleteValueKey');
  10647. Result := TFNNtDeleteValueKey(_NtDeleteValueKey)(
  10648. KeyHandle, ValueName
  10649. );
  10650. end;
  10651. // Dynamic version of NtDeleteValueKey
  10652. function ZwDeleteValueKey(
  10653. KeyHandle : HANDLE;
  10654. ValueName : PUNICODE_STRING
  10655. ): NTSTATUS; stdcall;
  10656. begin
  10657. GetProcedureAddress(_NtDeleteValueKey, ntdll, 'NtDeleteValueKey');
  10658. Result := TFNNtDeleteValueKey(_NtDeleteValueKey)(
  10659. KeyHandle, ValueName
  10660. );
  10661. end;
  10662. // Dynamic version of NtDeviceIoControlFile
  10663. function NtDeviceIoControlFile(
  10664. FileHandle : HANDLE;
  10665. Event : HANDLE;
  10666. ApcRoutine : PIO_APC_ROUTINE;
  10667. ApcContext : PVOID;
  10668. IoStatusBlock : PIO_STATUS_BLOCK;
  10669. IoControlCode : ULONG;
  10670. InputBuffer : PVOID;
  10671. InputBufferLength : ULONG;
  10672. OutputBuffer : PVOID;
  10673. OutputBufferLength : ULONG
  10674. ): NTSTATUS; stdcall;
  10675. begin
  10676. GetProcedureAddress(_NtDeviceIoControlFile, ntdll, 'NtDeviceIoControlFile');
  10677. Result := TFNNtDeviceIoControlFile(_NtDeviceIoControlFile)(
  10678. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, IoControlCode, InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength
  10679. );
  10680. end;
  10681. // Dynamic version of NtDeviceIoControlFile
  10682. function ZwDeviceIoControlFile(
  10683. FileHandle : HANDLE;
  10684. Event : HANDLE;
  10685. ApcRoutine : PIO_APC_ROUTINE;
  10686. ApcContext : PVOID;
  10687. IoStatusBlock : PIO_STATUS_BLOCK;
  10688. IoControlCode : ULONG;
  10689. InputBuffer : PVOID;
  10690. InputBufferLength : ULONG;
  10691. OutputBuffer : PVOID;
  10692. OutputBufferLength : ULONG
  10693. ): NTSTATUS; stdcall;
  10694. begin
  10695. GetProcedureAddress(_NtDeviceIoControlFile, ntdll, 'NtDeviceIoControlFile');
  10696. Result := TFNNtDeviceIoControlFile(_NtDeviceIoControlFile)(
  10697. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, IoControlCode, InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength
  10698. );
  10699. end;
  10700. // Dynamic version of NtDisplayString
  10701. function NtDisplayString(
  10702. Str : PUNICODE_STRING
  10703. ): NTSTATUS; stdcall;
  10704. begin
  10705. GetProcedureAddress(_NtDisplayString, ntdll, 'NtDisplayString');
  10706. Result := TFNNtDisplayString(_NtDisplayString)(
  10707. Str
  10708. );
  10709. end;
  10710. // Dynamic version of NtDisplayString
  10711. function ZwDisplayString(
  10712. Str : PUNICODE_STRING
  10713. ): NTSTATUS; stdcall;
  10714. begin
  10715. GetProcedureAddress(_NtDisplayString, ntdll, 'NtDisplayString');
  10716. Result := TFNNtDisplayString(_NtDisplayString)(
  10717. Str
  10718. );
  10719. end;
  10720. // Dynamic version of NtDuplicateObject
  10721. function NtDuplicateObject(
  10722. SourceProcessHandle : HANDLE;
  10723. SourceHandle : HANDLE;
  10724. TargetProcessHandle : HANDLE;
  10725. TargetHandle : PHANDLE;
  10726. DesiredAccess : ACCESS_MASK;
  10727. Attributes : ULONG;
  10728. Options : ULONG
  10729. ): NTSTATUS; stdcall;
  10730. begin
  10731. GetProcedureAddress(_NtDuplicateObject, ntdll, 'NtDuplicateObject');
  10732. Result := TFNNtDuplicateObject(_NtDuplicateObject)(
  10733. SourceProcessHandle, SourceHandle, TargetProcessHandle, TargetHandle, DesiredAccess, Attributes, Options
  10734. );
  10735. end;
  10736. // Dynamic version of NtDuplicateObject
  10737. function ZwDuplicateObject(
  10738. SourceProcessHandle : HANDLE;
  10739. SourceHandle : HANDLE;
  10740. TargetProcessHandle : HANDLE;
  10741. TargetHandle : PHANDLE;
  10742. DesiredAccess : ACCESS_MASK;
  10743. Attributes : ULONG;
  10744. Options : ULONG
  10745. ): NTSTATUS; stdcall;
  10746. begin
  10747. GetProcedureAddress(_NtDuplicateObject, ntdll, 'NtDuplicateObject');
  10748. Result := TFNNtDuplicateObject(_NtDuplicateObject)(
  10749. SourceProcessHandle, SourceHandle, TargetProcessHandle, TargetHandle, DesiredAccess, Attributes, Options
  10750. );
  10751. end;
  10752. // Dynamic version of NtDuplicateToken
  10753. function NtDuplicateToken(
  10754. ExistingTokenHandle : HANDLE;
  10755. DesiredAccess : ACCESS_MASK;
  10756. ObjectAttributes : POBJECT_ATTRIBUTES;
  10757. EffectiveOnly : BOOLEAN;
  10758. TokenType : TOKEN_TYPE;
  10759. NewTokenHandle : PHANDLE
  10760. ): NTSTATUS; stdcall;
  10761. begin
  10762. GetProcedureAddress(_NtDuplicateToken, ntdll, 'NtDuplicateToken');
  10763. Result := TFNNtDuplicateToken(_NtDuplicateToken)(
  10764. ExistingTokenHandle, DesiredAccess, ObjectAttributes, EffectiveOnly, TokenType, NewTokenHandle
  10765. );
  10766. end;
  10767. // Dynamic version of NtDuplicateToken
  10768. function ZwDuplicateToken(
  10769. ExistingTokenHandle : HANDLE;
  10770. DesiredAccess : ACCESS_MASK;
  10771. ObjectAttributes : POBJECT_ATTRIBUTES;
  10772. EffectiveOnly : BOOLEAN;
  10773. TokenType : TOKEN_TYPE;
  10774. NewTokenHandle : PHANDLE
  10775. ): NTSTATUS; stdcall;
  10776. begin
  10777. GetProcedureAddress(_NtDuplicateToken, ntdll, 'NtDuplicateToken');
  10778. Result := TFNNtDuplicateToken(_NtDuplicateToken)(
  10779. ExistingTokenHandle, DesiredAccess, ObjectAttributes, EffectiveOnly, TokenType, NewTokenHandle
  10780. );
  10781. end;
  10782. // Dynamic version of NtEnumerateKey
  10783. function NtEnumerateKey(
  10784. KeyHandle : HANDLE;
  10785. Index : ULONG;
  10786. KeyInformationClass : KEY_INFORMATION_CLASS;
  10787. KeyInformation : PVOID;
  10788. KeyInformationLength : ULONG;
  10789. ResultLength : PULONG
  10790. ): NTSTATUS; stdcall;
  10791. begin
  10792. GetProcedureAddress(_NtEnumerateKey, ntdll, 'NtEnumerateKey');
  10793. Result := TFNNtEnumerateKey(_NtEnumerateKey)(
  10794. KeyHandle, Index, KeyInformationClass, KeyInformation, KeyInformationLength, ResultLength
  10795. );
  10796. end;
  10797. // Dynamic version of NtEnumerateKey
  10798. function ZwEnumerateKey(
  10799. KeyHandle : HANDLE;
  10800. Index : ULONG;
  10801. KeyInformationClass : KEY_INFORMATION_CLASS;
  10802. KeyInformation : PVOID;
  10803. KeyInformationLength : ULONG;
  10804. ResultLength : PULONG
  10805. ): NTSTATUS; stdcall;
  10806. begin
  10807. GetProcedureAddress(_NtEnumerateKey, ntdll, 'NtEnumerateKey');
  10808. Result := TFNNtEnumerateKey(_NtEnumerateKey)(
  10809. KeyHandle, Index, KeyInformationClass, KeyInformation, KeyInformationLength, ResultLength
  10810. );
  10811. end;
  10812. // Dynamic version of NtEnumerateValueKey
  10813. function NtEnumerateValueKey(
  10814. KeyHandle : HANDLE;
  10815. Index : ULONG;
  10816. KeyValueInformationClass : KEY_VALUE_INFORMATION_CLASS;
  10817. KeyValueInformation : PVOID;
  10818. KeyValueInformationLength : ULONG;
  10819. ResultLength : PULONG
  10820. ): NTSTATUS; stdcall;
  10821. begin
  10822. GetProcedureAddress(_NtEnumerateValueKey, ntdll, 'NtEnumerateValueKey');
  10823. Result := TFNNtEnumerateValueKey(_NtEnumerateValueKey)(
  10824. KeyHandle, Index, KeyValueInformationClass, KeyValueInformation, KeyValueInformationLength, ResultLength
  10825. );
  10826. end;
  10827. // Dynamic version of NtEnumerateValueKey
  10828. function ZwEnumerateValueKey(
  10829. KeyHandle : HANDLE;
  10830. Index : ULONG;
  10831. KeyValueInformationClass : KEY_VALUE_INFORMATION_CLASS;
  10832. KeyValueInformation : PVOID;
  10833. KeyValueInformationLength : ULONG;
  10834. ResultLength : PULONG
  10835. ): NTSTATUS; stdcall;
  10836. begin
  10837. GetProcedureAddress(_NtEnumerateValueKey, ntdll, 'NtEnumerateValueKey');
  10838. Result := TFNNtEnumerateValueKey(_NtEnumerateValueKey)(
  10839. KeyHandle, Index, KeyValueInformationClass, KeyValueInformation, KeyValueInformationLength, ResultLength
  10840. );
  10841. end;
  10842. // Dynamic version of NtExtendSection
  10843. function NtExtendSection(
  10844. SectionHandle : HANDLE;
  10845. SectionSize : PLARGE_INTEGER
  10846. ): NTSTATUS; stdcall;
  10847. begin
  10848. GetProcedureAddress(_NtExtendSection, ntdll, 'NtExtendSection');
  10849. Result := TFNNtExtendSection(_NtExtendSection)(
  10850. SectionHandle, SectionSize
  10851. );
  10852. end;
  10853. // Dynamic version of NtExtendSection
  10854. function ZwExtendSection(
  10855. SectionHandle : HANDLE;
  10856. SectionSize : PLARGE_INTEGER
  10857. ): NTSTATUS; stdcall;
  10858. begin
  10859. GetProcedureAddress(_NtExtendSection, ntdll, 'NtExtendSection');
  10860. Result := TFNNtExtendSection(_NtExtendSection)(
  10861. SectionHandle, SectionSize
  10862. );
  10863. end;
  10864. // Dynamic version of NtFilterToken
  10865. function NtFilterToken(
  10866. ExistingTokenHandle : HANDLE;
  10867. Flags : ULONG;
  10868. SidsToDisable : PTOKEN_GROUPS;
  10869. PrivilegesToDelete : PTOKEN_PRIVILEGES;
  10870. SidsToRestricted : PTOKEN_GROUPS;
  10871. NewTokenHandle : PHANDLE
  10872. ): NTSTATUS; stdcall;
  10873. begin
  10874. GetProcedureAddress(_NtFilterToken, ntdll, 'NtFilterToken');
  10875. Result := TFNNtFilterToken(_NtFilterToken)(
  10876. ExistingTokenHandle, Flags, SidsToDisable, PrivilegesToDelete, SidsToRestricted, NewTokenHandle
  10877. );
  10878. end;
  10879. // Dynamic version of NtFilterToken
  10880. function ZwFilterToken(
  10881. ExistingTokenHandle : HANDLE;
  10882. Flags : ULONG;
  10883. SidsToDisable : PTOKEN_GROUPS;
  10884. PrivilegesToDelete : PTOKEN_PRIVILEGES;
  10885. SidsToRestricted : PTOKEN_GROUPS;
  10886. NewTokenHandle : PHANDLE
  10887. ): NTSTATUS; stdcall;
  10888. begin
  10889. GetProcedureAddress(_NtFilterToken, ntdll, 'NtFilterToken');
  10890. Result := TFNNtFilterToken(_NtFilterToken)(
  10891. ExistingTokenHandle, Flags, SidsToDisable, PrivilegesToDelete, SidsToRestricted, NewTokenHandle
  10892. );
  10893. end;
  10894. // Dynamic version of NtFindAtom
  10895. function NtFindAtom(
  10896. Str : PWSTR;
  10897. StringLength : ULONG;
  10898. Atom : PUSHORT
  10899. ): NTSTATUS; stdcall;
  10900. begin
  10901. GetProcedureAddress(_NtFindAtom, ntdll, 'NtFindAtom');
  10902. Result := TFNNtFindAtom(_NtFindAtom)(
  10903. Str, StringLength, Atom
  10904. );
  10905. end;
  10906. // Dynamic version of NtFindAtom
  10907. function ZwFindAtom(
  10908. Str : PWSTR;
  10909. StringLength : ULONG;
  10910. Atom : PUSHORT
  10911. ): NTSTATUS; stdcall;
  10912. begin
  10913. GetProcedureAddress(_NtFindAtom, ntdll, 'NtFindAtom');
  10914. Result := TFNNtFindAtom(_NtFindAtom)(
  10915. Str, StringLength, Atom
  10916. );
  10917. end;
  10918. // Dynamic version of NtFlushBuffersFile
  10919. function NtFlushBuffersFile(
  10920. FileHandle : HANDLE;
  10921. IoStatusBlock : PIO_STATUS_BLOCK
  10922. ): NTSTATUS; stdcall;
  10923. begin
  10924. GetProcedureAddress(_NtFlushBuffersFile, ntdll, 'NtFlushBuffersFile');
  10925. Result := TFNNtFlushBuffersFile(_NtFlushBuffersFile)(
  10926. FileHandle, IoStatusBlock
  10927. );
  10928. end;
  10929. // Dynamic version of NtFlushBuffersFile
  10930. function ZwFlushBuffersFile(
  10931. FileHandle : HANDLE;
  10932. IoStatusBlock : PIO_STATUS_BLOCK
  10933. ): NTSTATUS; stdcall;
  10934. begin
  10935. GetProcedureAddress(_NtFlushBuffersFile, ntdll, 'NtFlushBuffersFile');
  10936. Result := TFNNtFlushBuffersFile(_NtFlushBuffersFile)(
  10937. FileHandle, IoStatusBlock
  10938. );
  10939. end;
  10940. // Dynamic version of NtFlushInstructionCache
  10941. function NtFlushInstructionCache(
  10942. ProcessHandle : HANDLE;
  10943. BaseAddress : PVOID;
  10944. FlushSize : ULONG
  10945. ): NTSTATUS; stdcall;
  10946. begin
  10947. GetProcedureAddress(_NtFlushInstructionCache, ntdll, 'NtFlushInstructionCache');
  10948. Result := TFNNtFlushInstructionCache(_NtFlushInstructionCache)(
  10949. ProcessHandle, BaseAddress, FlushSize
  10950. );
  10951. end;
  10952. // Dynamic version of NtFlushInstructionCache
  10953. function ZwFlushInstructionCache(
  10954. ProcessHandle : HANDLE;
  10955. BaseAddress : PVOID;
  10956. FlushSize : ULONG
  10957. ): NTSTATUS; stdcall;
  10958. begin
  10959. GetProcedureAddress(_NtFlushInstructionCache, ntdll, 'NtFlushInstructionCache');
  10960. Result := TFNNtFlushInstructionCache(_NtFlushInstructionCache)(
  10961. ProcessHandle, BaseAddress, FlushSize
  10962. );
  10963. end;
  10964. // Dynamic version of NtFlushKey
  10965. function NtFlushKey(
  10966. KeyHandle : HANDLE
  10967. ): NTSTATUS; stdcall;
  10968. begin
  10969. GetProcedureAddress(_NtFlushKey, ntdll, 'NtFlushKey');
  10970. Result := TFNNtFlushKey(_NtFlushKey)(
  10971. KeyHandle
  10972. );
  10973. end;
  10974. // Dynamic version of NtFlushKey
  10975. function ZwFlushKey(
  10976. KeyHandle : HANDLE
  10977. ): NTSTATUS; stdcall;
  10978. begin
  10979. GetProcedureAddress(_NtFlushKey, ntdll, 'NtFlushKey');
  10980. Result := TFNNtFlushKey(_NtFlushKey)(
  10981. KeyHandle
  10982. );
  10983. end;
  10984. // Dynamic version of NtFlushVirtualMemory
  10985. function NtFlushVirtualMemory(
  10986. ProcessHandle : HANDLE;
  10987. BaseAddress : PPVOID;
  10988. FlushSize : PULONG;
  10989. IoStatusBlock : PIO_STATUS_BLOCK
  10990. ): NTSTATUS; stdcall;
  10991. begin
  10992. GetProcedureAddress(_NtFlushVirtualMemory, ntdll, 'NtFlushVirtualMemory');
  10993. Result := TFNNtFlushVirtualMemory(_NtFlushVirtualMemory)(
  10994. ProcessHandle, BaseAddress, FlushSize, IoStatusBlock
  10995. );
  10996. end;
  10997. // Dynamic version of NtFlushVirtualMemory
  10998. function ZwFlushVirtualMemory(
  10999. ProcessHandle : HANDLE;
  11000. BaseAddress : PPVOID;
  11001. FlushSize : PULONG;
  11002. IoStatusBlock : PIO_STATUS_BLOCK
  11003. ): NTSTATUS; stdcall;
  11004. begin
  11005. GetProcedureAddress(_NtFlushVirtualMemory, ntdll, 'NtFlushVirtualMemory');
  11006. Result := TFNNtFlushVirtualMemory(_NtFlushVirtualMemory)(
  11007. ProcessHandle, BaseAddress, FlushSize, IoStatusBlock
  11008. );
  11009. end;
  11010. // Dynamic version of NtFlushWriteBuffer
  11011. function NtFlushWriteBuffer(): NTSTATUS; stdcall;
  11012. begin
  11013. GetProcedureAddress(_NtFlushWriteBuffer, ntdll, 'NtFlushWriteBuffer');
  11014. Result := TFNNtFlushWriteBuffer(_NtFlushWriteBuffer)();
  11015. end;
  11016. // Dynamic version of NtFlushWriteBuffer
  11017. function ZwFlushWriteBuffer(): NTSTATUS; stdcall;
  11018. begin
  11019. GetProcedureAddress(_NtFlushWriteBuffer, ntdll, 'NtFlushWriteBuffer');
  11020. Result := TFNNtFlushWriteBuffer(_NtFlushWriteBuffer)();
  11021. end;
  11022. // Dynamic version of NtFreeUserPhysicalPages
  11023. function NtFreeUserPhysicalPages(
  11024. ProcessHandle : HANDLE;
  11025. NumberOfPages : PULONG;
  11026. PageFrameNumbers : PULONG
  11027. ): NTSTATUS; stdcall;
  11028. begin
  11029. GetProcedureAddress(_NtFreeUserPhysicalPages, ntdll, 'NtFreeUserPhysicalPages');
  11030. Result := TFNNtFreeUserPhysicalPages(_NtFreeUserPhysicalPages)(
  11031. ProcessHandle, NumberOfPages, PageFrameNumbers
  11032. );
  11033. end;
  11034. // Dynamic version of NtFreeUserPhysicalPages
  11035. function ZwFreeUserPhysicalPages(
  11036. ProcessHandle : HANDLE;
  11037. NumberOfPages : PULONG;
  11038. PageFrameNumbers : PULONG
  11039. ): NTSTATUS; stdcall;
  11040. begin
  11041. GetProcedureAddress(_NtFreeUserPhysicalPages, ntdll, 'NtFreeUserPhysicalPages');
  11042. Result := TFNNtFreeUserPhysicalPages(_NtFreeUserPhysicalPages)(
  11043. ProcessHandle, NumberOfPages, PageFrameNumbers
  11044. );
  11045. end;
  11046. // Dynamic version of NtFreeVirtualMemory
  11047. function NtFreeVirtualMemory(
  11048. ProcessHandle : HANDLE;
  11049. BaseAddress : PPVOID;
  11050. FreeSize : PULONG;
  11051. FreeType : ULONG
  11052. ): NTSTATUS; stdcall;
  11053. begin
  11054. GetProcedureAddress(_NtFreeVirtualMemory, ntdll, 'NtFreeVirtualMemory');
  11055. Result := TFNNtFreeVirtualMemory(_NtFreeVirtualMemory)(
  11056. ProcessHandle, BaseAddress, FreeSize, FreeType
  11057. );
  11058. end;
  11059. // Dynamic version of NtFreeVirtualMemory
  11060. function ZwFreeVirtualMemory(
  11061. ProcessHandle : HANDLE;
  11062. BaseAddress : PPVOID;
  11063. FreeSize : PULONG;
  11064. FreeType : ULONG
  11065. ): NTSTATUS; stdcall;
  11066. begin
  11067. GetProcedureAddress(_NtFreeVirtualMemory, ntdll, 'NtFreeVirtualMemory');
  11068. Result := TFNNtFreeVirtualMemory(_NtFreeVirtualMemory)(
  11069. ProcessHandle, BaseAddress, FreeSize, FreeType
  11070. );
  11071. end;
  11072. // Dynamic version of NtFsControlFile
  11073. function NtFsControlFile(
  11074. FileHandle : HANDLE;
  11075. Event : HANDLE;
  11076. ApcRoutine : PIO_APC_ROUTINE;
  11077. ApcContext : PVOID;
  11078. IoStatusBlock : PIO_STATUS_BLOCK;
  11079. FsControlCode : ULONG;
  11080. InputBuffer : PVOID;
  11081. InputBufferLength : ULONG;
  11082. OutputBuffer : PVOID;
  11083. OutputBufferLength : ULONG
  11084. ): NTSTATUS; stdcall;
  11085. begin
  11086. GetProcedureAddress(_NtFsControlFile, ntdll, 'NtFsControlFile');
  11087. Result := TFNNtFsControlFile(_NtFsControlFile)(
  11088. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, FsControlCode, InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength
  11089. );
  11090. end;
  11091. // Dynamic version of NtFsControlFile
  11092. function ZwFsControlFile(
  11093. FileHandle : HANDLE;
  11094. Event : HANDLE;
  11095. ApcRoutine : PIO_APC_ROUTINE;
  11096. ApcContext : PVOID;
  11097. IoStatusBlock : PIO_STATUS_BLOCK;
  11098. FsControlCode : ULONG;
  11099. InputBuffer : PVOID;
  11100. InputBufferLength : ULONG;
  11101. OutputBuffer : PVOID;
  11102. OutputBufferLength : ULONG
  11103. ): NTSTATUS; stdcall;
  11104. begin
  11105. GetProcedureAddress(_NtFsControlFile, ntdll, 'NtFsControlFile');
  11106. Result := TFNNtFsControlFile(_NtFsControlFile)(
  11107. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, FsControlCode, InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength
  11108. );
  11109. end;
  11110. // Dynamic version of NtGetContextThread
  11111. function NtGetContextThread(
  11112. ThreadHandle : HANDLE;
  11113. Context : PCONTEXT
  11114. ): NTSTATUS; stdcall;
  11115. begin
  11116. GetProcedureAddress(_NtGetContextThread, ntdll, 'NtGetContextThread');
  11117. Result := TFNNtGetContextThread(_NtGetContextThread)(
  11118. ThreadHandle, Context
  11119. );
  11120. end;
  11121. // Dynamic version of NtGetContextThread
  11122. function ZwGetContextThread(
  11123. ThreadHandle : HANDLE;
  11124. Context : PCONTEXT
  11125. ): NTSTATUS; stdcall;
  11126. begin
  11127. GetProcedureAddress(_NtGetContextThread, ntdll, 'NtGetContextThread');
  11128. Result := TFNNtGetContextThread(_NtGetContextThread)(
  11129. ThreadHandle, Context
  11130. );
  11131. end;
  11132. // Dynamic version of NtGetCurrentProcessorNumber
  11133. function NtGetCurrentProcessorNumber(): ULONG; stdcall;
  11134. begin
  11135. GetProcedureAddress(_NtGetCurrentProcessorNumber, ntdll, 'NtGetCurrentProcessorNumber');
  11136. Result := TFNNtGetCurrentProcessorNumber(_NtGetCurrentProcessorNumber)();
  11137. end;
  11138. // Dynamic version of NtGetCurrentProcessorNumber
  11139. function ZwGetCurrentProcessorNumber(): ULONG; stdcall;
  11140. begin
  11141. GetProcedureAddress(_NtGetCurrentProcessorNumber, ntdll, 'NtGetCurrentProcessorNumber');
  11142. Result := TFNNtGetCurrentProcessorNumber(_NtGetCurrentProcessorNumber)();
  11143. end;
  11144. // Dynamic version of NtGetDevicePowerState
  11145. function NtGetDevicePowerState(
  11146. DeviceHandle : HANDLE;
  11147. DevicePowerState : PDEVICE_POWER_STATE
  11148. ): NTSTATUS; stdcall;
  11149. begin
  11150. GetProcedureAddress(_NtGetDevicePowerState, ntdll, 'NtGetDevicePowerState');
  11151. Result := TFNNtGetDevicePowerState(_NtGetDevicePowerState)(
  11152. DeviceHandle, DevicePowerState
  11153. );
  11154. end;
  11155. // Dynamic version of NtGetDevicePowerState
  11156. function ZwGetDevicePowerState(
  11157. DeviceHandle : HANDLE;
  11158. DevicePowerState : PDEVICE_POWER_STATE
  11159. ): NTSTATUS; stdcall;
  11160. begin
  11161. GetProcedureAddress(_NtGetDevicePowerState, ntdll, 'NtGetDevicePowerState');
  11162. Result := TFNNtGetDevicePowerState(_NtGetDevicePowerState)(
  11163. DeviceHandle, DevicePowerState
  11164. );
  11165. end;
  11166. // Dynamic version of NtGetPlugPlayEvent
  11167. function NtGetPlugPlayEvent(
  11168. Reserved1 : ULONG;
  11169. Reserved2 : ULONG;
  11170. Buffer : PVOID;
  11171. BufferLength : ULONG
  11172. ): NTSTATUS; stdcall;
  11173. begin
  11174. GetProcedureAddress(_NtGetPlugPlayEvent, ntdll, 'NtGetPlugPlayEvent');
  11175. Result := TFNNtGetPlugPlayEvent(_NtGetPlugPlayEvent)(
  11176. Reserved1, Reserved2, Buffer, BufferLength
  11177. );
  11178. end;
  11179. // Dynamic version of NtGetPlugPlayEvent
  11180. function ZwGetPlugPlayEvent(
  11181. Reserved1 : ULONG;
  11182. Reserved2 : ULONG;
  11183. Buffer : PVOID;
  11184. BufferLength : ULONG
  11185. ): NTSTATUS; stdcall;
  11186. begin
  11187. GetProcedureAddress(_NtGetPlugPlayEvent, ntdll, 'NtGetPlugPlayEvent');
  11188. Result := TFNNtGetPlugPlayEvent(_NtGetPlugPlayEvent)(
  11189. Reserved1, Reserved2, Buffer, BufferLength
  11190. );
  11191. end;
  11192. // Dynamic version of NtGetTickCount
  11193. function NtGetTickCount(): ULONG; stdcall;
  11194. begin
  11195. GetProcedureAddress(_NtGetTickCount, ntdll, 'NtGetTickCount');
  11196. Result := TFNNtGetTickCount(_NtGetTickCount)();
  11197. end;
  11198. // Dynamic version of NtGetTickCount
  11199. function ZwGetTickCount(): ULONG; stdcall;
  11200. begin
  11201. GetProcedureAddress(_NtGetTickCount, ntdll, 'NtGetTickCount');
  11202. Result := TFNNtGetTickCount(_NtGetTickCount)();
  11203. end;
  11204. // Dynamic version of NtGetWriteWatch
  11205. function NtGetWriteWatch(
  11206. ProcessHandle : HANDLE;
  11207. Flags : ULONG;
  11208. BaseAddress : PVOID;
  11209. RegionSize : ULONG;
  11210. Buffer : PULONG;
  11211. BufferEntries : PULONG;
  11212. Granularity : PULONG
  11213. ): NTSTATUS; stdcall;
  11214. begin
  11215. GetProcedureAddress(_NtGetWriteWatch, ntdll, 'NtGetWriteWatch');
  11216. Result := TFNNtGetWriteWatch(_NtGetWriteWatch)(
  11217. ProcessHandle, Flags, BaseAddress, RegionSize, Buffer, BufferEntries, Granularity
  11218. );
  11219. end;
  11220. // Dynamic version of NtGetWriteWatch
  11221. function ZwGetWriteWatch(
  11222. ProcessHandle : HANDLE;
  11223. Flags : ULONG;
  11224. BaseAddress : PVOID;
  11225. RegionSize : ULONG;
  11226. Buffer : PULONG;
  11227. BufferEntries : PULONG;
  11228. Granularity : PULONG
  11229. ): NTSTATUS; stdcall;
  11230. begin
  11231. GetProcedureAddress(_NtGetWriteWatch, ntdll, 'NtGetWriteWatch');
  11232. Result := TFNNtGetWriteWatch(_NtGetWriteWatch)(
  11233. ProcessHandle, Flags, BaseAddress, RegionSize, Buffer, BufferEntries, Granularity
  11234. );
  11235. end;
  11236. // Dynamic version of NtImpersonateAnonymousToken
  11237. function NtImpersonateAnonymousToken(
  11238. ThreadHandle : HANDLE
  11239. ): NTSTATUS; stdcall;
  11240. begin
  11241. GetProcedureAddress(_NtImpersonateAnonymousToken, ntdll, 'NtImpersonateAnonymousToken');
  11242. Result := TFNNtImpersonateAnonymousToken(_NtImpersonateAnonymousToken)(
  11243. ThreadHandle
  11244. );
  11245. end;
  11246. // Dynamic version of NtImpersonateAnonymousToken
  11247. function ZwImpersonateAnonymousToken(
  11248. ThreadHandle : HANDLE
  11249. ): NTSTATUS; stdcall;
  11250. begin
  11251. GetProcedureAddress(_NtImpersonateAnonymousToken, ntdll, 'NtImpersonateAnonymousToken');
  11252. Result := TFNNtImpersonateAnonymousToken(_NtImpersonateAnonymousToken)(
  11253. ThreadHandle
  11254. );
  11255. end;
  11256. // Dynamic version of NtImpersonateClientOfPort
  11257. function NtImpersonateClientOfPort(
  11258. PortHandle : HANDLE;
  11259. Message : PPORT_MESSAGE
  11260. ): NTSTATUS; stdcall;
  11261. begin
  11262. GetProcedureAddress(_NtImpersonateClientOfPort, ntdll, 'NtImpersonateClientOfPort');
  11263. Result := TFNNtImpersonateClientOfPort(_NtImpersonateClientOfPort)(
  11264. PortHandle, Message
  11265. );
  11266. end;
  11267. // Dynamic version of NtImpersonateClientOfPort
  11268. function ZwImpersonateClientOfPort(
  11269. PortHandle : HANDLE;
  11270. Message : PPORT_MESSAGE
  11271. ): NTSTATUS; stdcall;
  11272. begin
  11273. GetProcedureAddress(_NtImpersonateClientOfPort, ntdll, 'NtImpersonateClientOfPort');
  11274. Result := TFNNtImpersonateClientOfPort(_NtImpersonateClientOfPort)(
  11275. PortHandle, Message
  11276. );
  11277. end;
  11278. // Dynamic version of NtImpersonateThread
  11279. function NtImpersonateThread(
  11280. ThreadHandle : HANDLE;
  11281. TargetThreadHandle : HANDLE;
  11282. SecurityQos : PSECURITY_QUALITY_OF_SERVICE
  11283. ): NTSTATUS; stdcall;
  11284. begin
  11285. GetProcedureAddress(_NtImpersonateThread, ntdll, 'NtImpersonateThread');
  11286. Result := TFNNtImpersonateThread(_NtImpersonateThread)(
  11287. ThreadHandle, TargetThreadHandle, SecurityQos
  11288. );
  11289. end;
  11290. // Dynamic version of NtImpersonateThread
  11291. function ZwImpersonateThread(
  11292. ThreadHandle : HANDLE;
  11293. TargetThreadHandle : HANDLE;
  11294. SecurityQos : PSECURITY_QUALITY_OF_SERVICE
  11295. ): NTSTATUS; stdcall;
  11296. begin
  11297. GetProcedureAddress(_NtImpersonateThread, ntdll, 'NtImpersonateThread');
  11298. Result := TFNNtImpersonateThread(_NtImpersonateThread)(
  11299. ThreadHandle, TargetThreadHandle, SecurityQos
  11300. );
  11301. end;
  11302. // Dynamic version of NtInitializeRegistry
  11303. function NtInitializeRegistry(
  11304. Setup : BOOLEAN
  11305. ): NTSTATUS; stdcall;
  11306. begin
  11307. GetProcedureAddress(_NtInitializeRegistry, ntdll, 'NtInitializeRegistry');
  11308. Result := TFNNtInitializeRegistry(_NtInitializeRegistry)(
  11309. Setup
  11310. );
  11311. end;
  11312. // Dynamic version of NtInitializeRegistry
  11313. function ZwInitializeRegistry(
  11314. Setup : BOOLEAN
  11315. ): NTSTATUS; stdcall;
  11316. begin
  11317. GetProcedureAddress(_NtInitializeRegistry, ntdll, 'NtInitializeRegistry');
  11318. Result := TFNNtInitializeRegistry(_NtInitializeRegistry)(
  11319. Setup
  11320. );
  11321. end;
  11322. // Dynamic version of NtInitiatePowerAction
  11323. function NtInitiatePowerAction(
  11324. SystemAction : POWER_ACTION;
  11325. MinSystemState : SYSTEM_POWER_STATE;
  11326. Flags : ULONG;
  11327. Asynchronous : BOOLEAN
  11328. ): NTSTATUS; stdcall;
  11329. begin
  11330. GetProcedureAddress(_NtInitiatePowerAction, ntdll, 'NtInitiatePowerAction');
  11331. Result := TFNNtInitiatePowerAction(_NtInitiatePowerAction)(
  11332. SystemAction, MinSystemState, Flags, Asynchronous
  11333. );
  11334. end;
  11335. // Dynamic version of NtInitiatePowerAction
  11336. function ZwInitiatePowerAction(
  11337. SystemAction : POWER_ACTION;
  11338. MinSystemState : SYSTEM_POWER_STATE;
  11339. Flags : ULONG;
  11340. Asynchronous : BOOLEAN
  11341. ): NTSTATUS; stdcall;
  11342. begin
  11343. GetProcedureAddress(_NtInitiatePowerAction, ntdll, 'NtInitiatePowerAction');
  11344. Result := TFNNtInitiatePowerAction(_NtInitiatePowerAction)(
  11345. SystemAction, MinSystemState, Flags, Asynchronous
  11346. );
  11347. end;
  11348. // Dynamic version of NtIsSystemResumeAutomatic
  11349. function NtIsSystemResumeAutomatic(): BOOLEAN; stdcall;
  11350. begin
  11351. GetProcedureAddress(_NtIsSystemResumeAutomatic, ntdll, 'NtIsSystemResumeAutomatic');
  11352. Result := TFNNtIsSystemResumeAutomatic(_NtIsSystemResumeAutomatic)();
  11353. end;
  11354. // Dynamic version of NtIsSystemResumeAutomatic
  11355. function ZwIsSystemResumeAutomatic(): BOOLEAN; stdcall;
  11356. begin
  11357. GetProcedureAddress(_NtIsSystemResumeAutomatic, ntdll, 'NtIsSystemResumeAutomatic');
  11358. Result := TFNNtIsSystemResumeAutomatic(_NtIsSystemResumeAutomatic)();
  11359. end;
  11360. // Dynamic version of NtListenChannel
  11361. function NtListenChannel(
  11362. x : PVOID;
  11363. y : PVOID
  11364. ): NTSTATUS; stdcall;
  11365. begin
  11366. GetProcedureAddress(_NtListenChannel, ntdll, 'NtListenChannel');
  11367. Result := TFNNtListenChannel(_NtListenChannel)(
  11368. x, y
  11369. );
  11370. end;
  11371. // Dynamic version of NtListenChannel
  11372. function ZwListenChannel(
  11373. x : PVOID;
  11374. y : PVOID
  11375. ): NTSTATUS; stdcall;
  11376. begin
  11377. GetProcedureAddress(_NtListenChannel, ntdll, 'NtListenChannel');
  11378. Result := TFNNtListenChannel(_NtListenChannel)(
  11379. x, y
  11380. );
  11381. end;
  11382. // Dynamic version of NtListenPort
  11383. function NtListenPort(
  11384. PortHandle : HANDLE;
  11385. Message : PPORT_MESSAGE
  11386. ): NTSTATUS; stdcall;
  11387. begin
  11388. GetProcedureAddress(_NtListenPort, ntdll, 'NtListenPort');
  11389. Result := TFNNtListenPort(_NtListenPort)(
  11390. PortHandle, Message
  11391. );
  11392. end;
  11393. // Dynamic version of NtListenPort
  11394. function ZwListenPort(
  11395. PortHandle : HANDLE;
  11396. Message : PPORT_MESSAGE
  11397. ): NTSTATUS; stdcall;
  11398. begin
  11399. GetProcedureAddress(_NtListenPort, ntdll, 'NtListenPort');
  11400. Result := TFNNtListenPort(_NtListenPort)(
  11401. PortHandle, Message
  11402. );
  11403. end;
  11404. // Dynamic version of NtLoadDriver
  11405. function NtLoadDriver(
  11406. DriverServiceName : PUNICODE_STRING
  11407. ): NTSTATUS; stdcall;
  11408. begin
  11409. GetProcedureAddress(_NtLoadDriver, ntdll, 'NtLoadDriver');
  11410. Result := TFNNtLoadDriver(_NtLoadDriver)(
  11411. DriverServiceName
  11412. );
  11413. end;
  11414. // Dynamic version of NtLoadDriver
  11415. function ZwLoadDriver(
  11416. DriverServiceName : PUNICODE_STRING
  11417. ): NTSTATUS; stdcall;
  11418. begin
  11419. GetProcedureAddress(_NtLoadDriver, ntdll, 'NtLoadDriver');
  11420. Result := TFNNtLoadDriver(_NtLoadDriver)(
  11421. DriverServiceName
  11422. );
  11423. end;
  11424. // Dynamic version of NtLoadKey
  11425. function NtLoadKey(
  11426. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  11427. FileObjectAttributes : POBJECT_ATTRIBUTES
  11428. ): NTSTATUS; stdcall;
  11429. begin
  11430. GetProcedureAddress(_NtLoadKey, ntdll, 'NtLoadKey');
  11431. Result := TFNNtLoadKey(_NtLoadKey)(
  11432. KeyObjectAttributes, FileObjectAttributes
  11433. );
  11434. end;
  11435. // Dynamic version of NtLoadKey
  11436. function ZwLoadKey(
  11437. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  11438. FileObjectAttributes : POBJECT_ATTRIBUTES
  11439. ): NTSTATUS; stdcall;
  11440. begin
  11441. GetProcedureAddress(_NtLoadKey, ntdll, 'NtLoadKey');
  11442. Result := TFNNtLoadKey(_NtLoadKey)(
  11443. KeyObjectAttributes, FileObjectAttributes
  11444. );
  11445. end;
  11446. // Dynamic version of NtLoadKey2
  11447. function NtLoadKey2(
  11448. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  11449. FileObjectAttributes : POBJECT_ATTRIBUTES;
  11450. Flags : ULONG
  11451. ): NTSTATUS; stdcall;
  11452. begin
  11453. GetProcedureAddress(_NtLoadKey2, ntdll, 'NtLoadKey2');
  11454. Result := TFNNtLoadKey2(_NtLoadKey2)(
  11455. KeyObjectAttributes, FileObjectAttributes, Flags
  11456. );
  11457. end;
  11458. // Dynamic version of NtLoadKey2
  11459. function ZwLoadKey2(
  11460. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  11461. FileObjectAttributes : POBJECT_ATTRIBUTES;
  11462. Flags : ULONG
  11463. ): NTSTATUS; stdcall;
  11464. begin
  11465. GetProcedureAddress(_NtLoadKey2, ntdll, 'NtLoadKey2');
  11466. Result := TFNNtLoadKey2(_NtLoadKey2)(
  11467. KeyObjectAttributes, FileObjectAttributes, Flags
  11468. );
  11469. end;
  11470. // Dynamic version of NtLockFile
  11471. function NtLockFile(
  11472. FileHandle : HANDLE;
  11473. Event : HANDLE;
  11474. ApcRoutine : PIO_APC_ROUTINE;
  11475. ApcContext : PVOID;
  11476. IoStatusBlock : PIO_STATUS_BLOCK;
  11477. LockOffset : PULARGE_INTEGER;
  11478. LockLength : PULARGE_INTEGER;
  11479. Key : ULONG;
  11480. FailImmediately : BOOLEAN;
  11481. ExclusiveLock : BOOLEAN
  11482. ): NTSTATUS; stdcall;
  11483. begin
  11484. GetProcedureAddress(_NtLockFile, ntdll, 'NtLockFile');
  11485. Result := TFNNtLockFile(_NtLockFile)(
  11486. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, LockOffset, LockLength, Key, FailImmediately, ExclusiveLock
  11487. );
  11488. end;
  11489. // Dynamic version of NtLockFile
  11490. function ZwLockFile(
  11491. FileHandle : HANDLE;
  11492. Event : HANDLE;
  11493. ApcRoutine : PIO_APC_ROUTINE;
  11494. ApcContext : PVOID;
  11495. IoStatusBlock : PIO_STATUS_BLOCK;
  11496. LockOffset : PULARGE_INTEGER;
  11497. LockLength : PULARGE_INTEGER;
  11498. Key : ULONG;
  11499. FailImmediately : BOOLEAN;
  11500. ExclusiveLock : BOOLEAN
  11501. ): NTSTATUS; stdcall;
  11502. begin
  11503. GetProcedureAddress(_NtLockFile, ntdll, 'NtLockFile');
  11504. Result := TFNNtLockFile(_NtLockFile)(
  11505. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, LockOffset, LockLength, Key, FailImmediately, ExclusiveLock
  11506. );
  11507. end;
  11508. // Dynamic version of NtLockVirtualMemory
  11509. function NtLockVirtualMemory(
  11510. ProcessHandle : HANDLE;
  11511. BaseAddress : PPVOID;
  11512. LockSize : PULONG;
  11513. LockType : ULONG
  11514. ): NTSTATUS; stdcall;
  11515. begin
  11516. GetProcedureAddress(_NtLockVirtualMemory, ntdll, 'NtLockVirtualMemory');
  11517. Result := TFNNtLockVirtualMemory(_NtLockVirtualMemory)(
  11518. ProcessHandle, BaseAddress, LockSize, LockType
  11519. );
  11520. end;
  11521. // Dynamic version of NtLockVirtualMemory
  11522. function ZwLockVirtualMemory(
  11523. ProcessHandle : HANDLE;
  11524. BaseAddress : PPVOID;
  11525. LockSize : PULONG;
  11526. LockType : ULONG
  11527. ): NTSTATUS; stdcall;
  11528. begin
  11529. GetProcedureAddress(_NtLockVirtualMemory, ntdll, 'NtLockVirtualMemory');
  11530. Result := TFNNtLockVirtualMemory(_NtLockVirtualMemory)(
  11531. ProcessHandle, BaseAddress, LockSize, LockType
  11532. );
  11533. end;
  11534. // Dynamic version of NtMakePermanentObject
  11535. function NtMakePermanentObject(
  11536. Handle : HANDLE
  11537. ): NTSTATUS; stdcall;
  11538. begin
  11539. GetProcedureAddress(_NtMakePermanentObject, ntdll, 'NtMakePermanentObject');
  11540. Result := TFNNtMakePermanentObject(_NtMakePermanentObject)(
  11541. Handle
  11542. );
  11543. end;
  11544. // Dynamic version of NtMakePermanentObject
  11545. function ZwMakePermanentObject(
  11546. Handle : HANDLE
  11547. ): NTSTATUS; stdcall;
  11548. begin
  11549. GetProcedureAddress(_NtMakePermanentObject, ntdll, 'NtMakePermanentObject');
  11550. Result := TFNNtMakePermanentObject(_NtMakePermanentObject)(
  11551. Handle
  11552. );
  11553. end;
  11554. // Dynamic version of NtMakeTemporaryObject
  11555. function NtMakeTemporaryObject(
  11556. Handle : HANDLE
  11557. ): NTSTATUS; stdcall;
  11558. begin
  11559. GetProcedureAddress(_NtMakeTemporaryObject, ntdll, 'NtMakeTemporaryObject');
  11560. Result := TFNNtMakeTemporaryObject(_NtMakeTemporaryObject)(
  11561. Handle
  11562. );
  11563. end;
  11564. // Dynamic version of NtMakeTemporaryObject
  11565. function ZwMakeTemporaryObject(
  11566. Handle : HANDLE
  11567. ): NTSTATUS; stdcall;
  11568. begin
  11569. GetProcedureAddress(_NtMakeTemporaryObject, ntdll, 'NtMakeTemporaryObject');
  11570. Result := TFNNtMakeTemporaryObject(_NtMakeTemporaryObject)(
  11571. Handle
  11572. );
  11573. end;
  11574. // Dynamic version of NtMapUserPhysicalPages
  11575. function NtMapUserPhysicalPages(
  11576. BaseAddress : PVOID;
  11577. NumberOfPages : PULONG;
  11578. PageFrameNumbers : PULONG
  11579. ): NTSTATUS; stdcall;
  11580. begin
  11581. GetProcedureAddress(_NtMapUserPhysicalPages, ntdll, 'NtMapUserPhysicalPages');
  11582. Result := TFNNtMapUserPhysicalPages(_NtMapUserPhysicalPages)(
  11583. BaseAddress, NumberOfPages, PageFrameNumbers
  11584. );
  11585. end;
  11586. // Dynamic version of NtMapUserPhysicalPages
  11587. function ZwMapUserPhysicalPages(
  11588. BaseAddress : PVOID;
  11589. NumberOfPages : PULONG;
  11590. PageFrameNumbers : PULONG
  11591. ): NTSTATUS; stdcall;
  11592. begin
  11593. GetProcedureAddress(_NtMapUserPhysicalPages, ntdll, 'NtMapUserPhysicalPages');
  11594. Result := TFNNtMapUserPhysicalPages(_NtMapUserPhysicalPages)(
  11595. BaseAddress, NumberOfPages, PageFrameNumbers
  11596. );
  11597. end;
  11598. // Dynamic version of NtMapUserPhysicalPagesScatter
  11599. function NtMapUserPhysicalPagesScatter(
  11600. BaseAddresses : PPVOID;
  11601. NumberOfPages : PULONG;
  11602. PageFrameNumbers : PULONG
  11603. ): NTSTATUS; stdcall;
  11604. begin
  11605. GetProcedureAddress(_NtMapUserPhysicalPagesScatter, ntdll, 'NtMapUserPhysicalPagesScatter');
  11606. Result := TFNNtMapUserPhysicalPagesScatter(_NtMapUserPhysicalPagesScatter)(
  11607. BaseAddresses, NumberOfPages, PageFrameNumbers
  11608. );
  11609. end;
  11610. // Dynamic version of NtMapUserPhysicalPagesScatter
  11611. function ZwMapUserPhysicalPagesScatter(
  11612. BaseAddresses : PPVOID;
  11613. NumberOfPages : PULONG;
  11614. PageFrameNumbers : PULONG
  11615. ): NTSTATUS; stdcall;
  11616. begin
  11617. GetProcedureAddress(_NtMapUserPhysicalPagesScatter, ntdll, 'NtMapUserPhysicalPagesScatter');
  11618. Result := TFNNtMapUserPhysicalPagesScatter(_NtMapUserPhysicalPagesScatter)(
  11619. BaseAddresses, NumberOfPages, PageFrameNumbers
  11620. );
  11621. end;
  11622. // Dynamic version of NtMapViewOfSection
  11623. function NtMapViewOfSection(
  11624. SectionHandle : HANDLE;
  11625. ProcessHandle : HANDLE;
  11626. BaseAddress : PPVOID;
  11627. ZeroBits : ULONG;
  11628. CommitSize : ULONG;
  11629. SectionOffset : PLARGE_INTEGER;
  11630. ViewSize : PULONG;
  11631. InheritDisposition : SECTION_INHERIT;
  11632. AllocationType : ULONG;
  11633. Protect : ULONG
  11634. ): NTSTATUS; stdcall;
  11635. begin
  11636. GetProcedureAddress(_NtMapViewOfSection, ntdll, 'NtMapViewOfSection');
  11637. Result := TFNNtMapViewOfSection(_NtMapViewOfSection)(
  11638. SectionHandle, ProcessHandle, BaseAddress, ZeroBits, CommitSize, SectionOffset, ViewSize, InheritDisposition, AllocationType, Protect
  11639. );
  11640. end;
  11641. // Dynamic version of NtMapViewOfSection
  11642. function ZwMapViewOfSection(
  11643. SectionHandle : HANDLE;
  11644. ProcessHandle : HANDLE;
  11645. BaseAddress : PPVOID;
  11646. ZeroBits : ULONG;
  11647. CommitSize : ULONG;
  11648. SectionOffset : PLARGE_INTEGER;
  11649. ViewSize : PULONG;
  11650. InheritDisposition : SECTION_INHERIT;
  11651. AllocationType : ULONG;
  11652. Protect : ULONG
  11653. ): NTSTATUS; stdcall;
  11654. begin
  11655. GetProcedureAddress(_NtMapViewOfSection, ntdll, 'NtMapViewOfSection');
  11656. Result := TFNNtMapViewOfSection(_NtMapViewOfSection)(
  11657. SectionHandle, ProcessHandle, BaseAddress, ZeroBits, CommitSize, SectionOffset, ViewSize, InheritDisposition, AllocationType, Protect
  11658. );
  11659. end;
  11660. // Dynamic version of NtNotifyChangeDirectoryFile
  11661. function NtNotifyChangeDirectoryFile(
  11662. FileHandle : HANDLE;
  11663. Event : HANDLE;
  11664. ApcRoutine : PIO_APC_ROUTINE;
  11665. ApcContext : PVOID;
  11666. IoStatusBlock : PIO_STATUS_BLOCK;
  11667. Buffer : PFILE_NOTIFY_INFORMATION;
  11668. BufferLength : ULONG;
  11669. NotifyFilter : ULONG;
  11670. WatchSubtree : BOOLEAN
  11671. ): NTSTATUS; stdcall;
  11672. begin
  11673. GetProcedureAddress(_NtNotifyChangeDirectoryFile, ntdll, 'NtNotifyChangeDirectoryFile');
  11674. Result := TFNNtNotifyChangeDirectoryFile(_NtNotifyChangeDirectoryFile)(
  11675. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, Buffer, BufferLength, NotifyFilter, WatchSubtree
  11676. );
  11677. end;
  11678. // Dynamic version of NtNotifyChangeDirectoryFile
  11679. function ZwNotifyChangeDirectoryFile(
  11680. FileHandle : HANDLE;
  11681. Event : HANDLE;
  11682. ApcRoutine : PIO_APC_ROUTINE;
  11683. ApcContext : PVOID;
  11684. IoStatusBlock : PIO_STATUS_BLOCK;
  11685. Buffer : PFILE_NOTIFY_INFORMATION;
  11686. BufferLength : ULONG;
  11687. NotifyFilter : ULONG;
  11688. WatchSubtree : BOOLEAN
  11689. ): NTSTATUS; stdcall;
  11690. begin
  11691. GetProcedureAddress(_NtNotifyChangeDirectoryFile, ntdll, 'NtNotifyChangeDirectoryFile');
  11692. Result := TFNNtNotifyChangeDirectoryFile(_NtNotifyChangeDirectoryFile)(
  11693. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, Buffer, BufferLength, NotifyFilter, WatchSubtree
  11694. );
  11695. end;
  11696. // Dynamic version of NtNotifyChangeKey
  11697. function NtNotifyChangeKey(
  11698. KeyHandle : HANDLE;
  11699. EventHandle : HANDLE;
  11700. ApcRoutine : PIO_APC_ROUTINE;
  11701. ApcContext : PVOID;
  11702. IoStatusBlock : PIO_STATUS_BLOCK;
  11703. NotifyFilter : ULONG;
  11704. WatchSubtree : BOOLEAN;
  11705. Buffer : PVOID;
  11706. BufferLength : ULONG;
  11707. Asynchronous : BOOLEAN
  11708. ): NTSTATUS; stdcall;
  11709. begin
  11710. GetProcedureAddress(_NtNotifyChangeKey, ntdll, 'NtNotifyChangeKey');
  11711. Result := TFNNtNotifyChangeKey(_NtNotifyChangeKey)(
  11712. KeyHandle, EventHandle, ApcRoutine, ApcContext, IoStatusBlock, NotifyFilter, WatchSubtree, Buffer, BufferLength, Asynchronous
  11713. );
  11714. end;
  11715. // Dynamic version of NtNotifyChangeKey
  11716. function ZwNotifyChangeKey(
  11717. KeyHandle : HANDLE;
  11718. EventHandle : HANDLE;
  11719. ApcRoutine : PIO_APC_ROUTINE;
  11720. ApcContext : PVOID;
  11721. IoStatusBlock : PIO_STATUS_BLOCK;
  11722. NotifyFilter : ULONG;
  11723. WatchSubtree : BOOLEAN;
  11724. Buffer : PVOID;
  11725. BufferLength : ULONG;
  11726. Asynchronous : BOOLEAN
  11727. ): NTSTATUS; stdcall;
  11728. begin
  11729. GetProcedureAddress(_NtNotifyChangeKey, ntdll, 'NtNotifyChangeKey');
  11730. Result := TFNNtNotifyChangeKey(_NtNotifyChangeKey)(
  11731. KeyHandle, EventHandle, ApcRoutine, ApcContext, IoStatusBlock, NotifyFilter, WatchSubtree, Buffer, BufferLength, Asynchronous
  11732. );
  11733. end;
  11734. // Dynamic version of NtNotifyChangeMultipleKeys
  11735. function NtNotifyChangeMultipleKeys(
  11736. KeyHandle : HANDLE;
  11737. Flags : ULONG;
  11738. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  11739. EventHandle : HANDLE;
  11740. ApcRoutine : PIO_APC_ROUTINE;
  11741. ApcContext : PVOID;
  11742. IoStatusBlock : PIO_STATUS_BLOCK;
  11743. NotifyFilter : ULONG;
  11744. WatchSubtree : BOOLEAN;
  11745. Buffer : PVOID;
  11746. BufferLength : ULONG;
  11747. Asynchronous : BOOLEAN
  11748. ): NTSTATUS; stdcall;
  11749. begin
  11750. GetProcedureAddress(_NtNotifyChangeMultipleKeys, ntdll, 'NtNotifyChangeMultipleKeys');
  11751. Result := TFNNtNotifyChangeMultipleKeys(_NtNotifyChangeMultipleKeys)(
  11752. KeyHandle, Flags, KeyObjectAttributes, EventHandle, ApcRoutine, ApcContext, IoStatusBlock, NotifyFilter, WatchSubtree, Buffer, BufferLength, Asynchronous
  11753. );
  11754. end;
  11755. // Dynamic version of NtNotifyChangeMultipleKeys
  11756. function ZwNotifyChangeMultipleKeys(
  11757. KeyHandle : HANDLE;
  11758. Flags : ULONG;
  11759. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  11760. EventHandle : HANDLE;
  11761. ApcRoutine : PIO_APC_ROUTINE;
  11762. ApcContext : PVOID;
  11763. IoStatusBlock : PIO_STATUS_BLOCK;
  11764. NotifyFilter : ULONG;
  11765. WatchSubtree : BOOLEAN;
  11766. Buffer : PVOID;
  11767. BufferLength : ULONG;
  11768. Asynchronous : BOOLEAN
  11769. ): NTSTATUS; stdcall;
  11770. begin
  11771. GetProcedureAddress(_NtNotifyChangeMultipleKeys, ntdll, 'NtNotifyChangeMultipleKeys');
  11772. Result := TFNNtNotifyChangeMultipleKeys(_NtNotifyChangeMultipleKeys)(
  11773. KeyHandle, Flags, KeyObjectAttributes, EventHandle, ApcRoutine, ApcContext, IoStatusBlock, NotifyFilter, WatchSubtree, Buffer, BufferLength, Asynchronous
  11774. );
  11775. end;
  11776. // Dynamic version of NtOpenChannel
  11777. function NtOpenChannel(
  11778. ChannelHandle : PHANDLE;
  11779. ObjectAttributes : POBJECT_ATTRIBUTES
  11780. ): NTSTATUS; stdcall;
  11781. begin
  11782. GetProcedureAddress(_NtOpenChannel, ntdll, 'NtOpenChannel');
  11783. Result := TFNNtOpenChannel(_NtOpenChannel)(
  11784. ChannelHandle, ObjectAttributes
  11785. );
  11786. end;
  11787. // Dynamic version of NtOpenChannel
  11788. function ZwOpenChannel(
  11789. ChannelHandle : PHANDLE;
  11790. ObjectAttributes : POBJECT_ATTRIBUTES
  11791. ): NTSTATUS; stdcall;
  11792. begin
  11793. GetProcedureAddress(_NtOpenChannel, ntdll, 'NtOpenChannel');
  11794. Result := TFNNtOpenChannel(_NtOpenChannel)(
  11795. ChannelHandle, ObjectAttributes
  11796. );
  11797. end;
  11798. // Dynamic version of NtOpenDirectoryObject
  11799. function NtOpenDirectoryObject(
  11800. DirectoryHandle : PHANDLE;
  11801. DesiredAccess : ACCESS_MASK;
  11802. ObjectAttributes : POBJECT_ATTRIBUTES
  11803. ): NTSTATUS; stdcall;
  11804. begin
  11805. GetProcedureAddress(_NtOpenDirectoryObject, ntdll, 'NtOpenDirectoryObject');
  11806. Result := TFNNtOpenDirectoryObject(_NtOpenDirectoryObject)(
  11807. DirectoryHandle, DesiredAccess, ObjectAttributes
  11808. );
  11809. end;
  11810. // Dynamic version of NtOpenDirectoryObject
  11811. function ZwOpenDirectoryObject(
  11812. DirectoryHandle : PHANDLE;
  11813. DesiredAccess : ACCESS_MASK;
  11814. ObjectAttributes : POBJECT_ATTRIBUTES
  11815. ): NTSTATUS; stdcall;
  11816. begin
  11817. GetProcedureAddress(_NtOpenDirectoryObject, ntdll, 'NtOpenDirectoryObject');
  11818. Result := TFNNtOpenDirectoryObject(_NtOpenDirectoryObject)(
  11819. DirectoryHandle, DesiredAccess, ObjectAttributes
  11820. );
  11821. end;
  11822. // Dynamic version of NtOpenEvent
  11823. function NtOpenEvent(
  11824. EventHandle : PHANDLE;
  11825. DesiredAccess : ACCESS_MASK;
  11826. ObjectAttributes : POBJECT_ATTRIBUTES
  11827. ): NTSTATUS; stdcall;
  11828. begin
  11829. GetProcedureAddress(_NtOpenEvent, ntdll, 'NtOpenEvent');
  11830. Result := TFNNtOpenEvent(_NtOpenEvent)(
  11831. EventHandle, DesiredAccess, ObjectAttributes
  11832. );
  11833. end;
  11834. // Dynamic version of NtOpenEvent
  11835. function ZwOpenEvent(
  11836. EventHandle : PHANDLE;
  11837. DesiredAccess : ACCESS_MASK;
  11838. ObjectAttributes : POBJECT_ATTRIBUTES
  11839. ): NTSTATUS; stdcall;
  11840. begin
  11841. GetProcedureAddress(_NtOpenEvent, ntdll, 'NtOpenEvent');
  11842. Result := TFNNtOpenEvent(_NtOpenEvent)(
  11843. EventHandle, DesiredAccess, ObjectAttributes
  11844. );
  11845. end;
  11846. // Dynamic version of NtOpenEventPair
  11847. function NtOpenEventPair(
  11848. EventPairHandle : PHANDLE;
  11849. DesiredAccess : ACCESS_MASK;
  11850. ObjectAttributes : POBJECT_ATTRIBUTES
  11851. ): NTSTATUS; stdcall;
  11852. begin
  11853. GetProcedureAddress(_NtOpenEventPair, ntdll, 'NtOpenEventPair');
  11854. Result := TFNNtOpenEventPair(_NtOpenEventPair)(
  11855. EventPairHandle, DesiredAccess, ObjectAttributes
  11856. );
  11857. end;
  11858. // Dynamic version of NtOpenEventPair
  11859. function ZwOpenEventPair(
  11860. EventPairHandle : PHANDLE;
  11861. DesiredAccess : ACCESS_MASK;
  11862. ObjectAttributes : POBJECT_ATTRIBUTES
  11863. ): NTSTATUS; stdcall;
  11864. begin
  11865. GetProcedureAddress(_NtOpenEventPair, ntdll, 'NtOpenEventPair');
  11866. Result := TFNNtOpenEventPair(_NtOpenEventPair)(
  11867. EventPairHandle, DesiredAccess, ObjectAttributes
  11868. );
  11869. end;
  11870. // Dynamic version of NtOpenFile
  11871. function NtOpenFile(
  11872. FileHandle : PHANDLE;
  11873. DesiredAccess : ACCESS_MASK;
  11874. ObjectAttributes : POBJECT_ATTRIBUTES;
  11875. IoStatusBlock : PIO_STATUS_BLOCK;
  11876. ShareAccess : ULONG;
  11877. OpenOptions : ULONG
  11878. ): NTSTATUS; stdcall;
  11879. begin
  11880. GetProcedureAddress(_NtOpenFile, ntdll, 'NtOpenFile');
  11881. Result := TFNNtOpenFile(_NtOpenFile)(
  11882. FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock, ShareAccess, OpenOptions
  11883. );
  11884. end;
  11885. // Dynamic version of NtOpenFile
  11886. function ZwOpenFile(
  11887. FileHandle : PHANDLE;
  11888. DesiredAccess : ACCESS_MASK;
  11889. ObjectAttributes : POBJECT_ATTRIBUTES;
  11890. IoStatusBlock : PIO_STATUS_BLOCK;
  11891. ShareAccess : ULONG;
  11892. OpenOptions : ULONG
  11893. ): NTSTATUS; stdcall;
  11894. begin
  11895. GetProcedureAddress(_NtOpenFile, ntdll, 'NtOpenFile');
  11896. Result := TFNNtOpenFile(_NtOpenFile)(
  11897. FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock, ShareAccess, OpenOptions
  11898. );
  11899. end;
  11900. // Dynamic version of NtOpenIoCompletion
  11901. function NtOpenIoCompletion(
  11902. IoCompletionHandle : PHANDLE;
  11903. DesiredAccess : ACCESS_MASK;
  11904. ObjectAttributes : POBJECT_ATTRIBUTES
  11905. ): NTSTATUS; stdcall;
  11906. begin
  11907. GetProcedureAddress(_NtOpenIoCompletion, ntdll, 'NtOpenIoCompletion');
  11908. Result := TFNNtOpenIoCompletion(_NtOpenIoCompletion)(
  11909. IoCompletionHandle, DesiredAccess, ObjectAttributes
  11910. );
  11911. end;
  11912. // Dynamic version of NtOpenIoCompletion
  11913. function ZwOpenIoCompletion(
  11914. IoCompletionHandle : PHANDLE;
  11915. DesiredAccess : ACCESS_MASK;
  11916. ObjectAttributes : POBJECT_ATTRIBUTES
  11917. ): NTSTATUS; stdcall;
  11918. begin
  11919. GetProcedureAddress(_NtOpenIoCompletion, ntdll, 'NtOpenIoCompletion');
  11920. Result := TFNNtOpenIoCompletion(_NtOpenIoCompletion)(
  11921. IoCompletionHandle, DesiredAccess, ObjectAttributes
  11922. );
  11923. end;
  11924. // Dynamic version of NtOpenJobObject
  11925. function NtOpenJobObject(
  11926. JobHandle : PHANDLE;
  11927. DesiredAccess : ACCESS_MASK;
  11928. ObjectAttributes : POBJECT_ATTRIBUTES
  11929. ): NTSTATUS; stdcall;
  11930. begin
  11931. GetProcedureAddress(_NtOpenJobObject, ntdll, 'NtOpenJobObject');
  11932. Result := TFNNtOpenJobObject(_NtOpenJobObject)(
  11933. JobHandle, DesiredAccess, ObjectAttributes
  11934. );
  11935. end;
  11936. // Dynamic version of NtOpenJobObject
  11937. function ZwOpenJobObject(
  11938. JobHandle : PHANDLE;
  11939. DesiredAccess : ACCESS_MASK;
  11940. ObjectAttributes : POBJECT_ATTRIBUTES
  11941. ): NTSTATUS; stdcall;
  11942. begin
  11943. GetProcedureAddress(_NtOpenJobObject, ntdll, 'NtOpenJobObject');
  11944. Result := TFNNtOpenJobObject(_NtOpenJobObject)(
  11945. JobHandle, DesiredAccess, ObjectAttributes
  11946. );
  11947. end;
  11948. // Dynamic version of NtOpenKey
  11949. function NtOpenKey(
  11950. KeyHandle : PHANDLE;
  11951. DesiredAccess : ACCESS_MASK;
  11952. ObjectAttributes : POBJECT_ATTRIBUTES
  11953. ): NTSTATUS; stdcall;
  11954. begin
  11955. GetProcedureAddress(_NtOpenKey, ntdll, 'NtOpenKey');
  11956. Result := TFNNtOpenKey(_NtOpenKey)(
  11957. KeyHandle, DesiredAccess, ObjectAttributes
  11958. );
  11959. end;
  11960. // Dynamic version of NtOpenKey
  11961. function ZwOpenKey(
  11962. KeyHandle : PHANDLE;
  11963. DesiredAccess : ACCESS_MASK;
  11964. ObjectAttributes : POBJECT_ATTRIBUTES
  11965. ): NTSTATUS; stdcall;
  11966. begin
  11967. GetProcedureAddress(_NtOpenKey, ntdll, 'NtOpenKey');
  11968. Result := TFNNtOpenKey(_NtOpenKey)(
  11969. KeyHandle, DesiredAccess, ObjectAttributes
  11970. );
  11971. end;
  11972. // Dynamic version of NtOpenMutant
  11973. function NtOpenMutant(
  11974. MutantHandle : PHANDLE;
  11975. DesiredAccess : ACCESS_MASK;
  11976. ObjectAttributes : POBJECT_ATTRIBUTES
  11977. ): NTSTATUS; stdcall;
  11978. begin
  11979. GetProcedureAddress(_NtOpenMutant, ntdll, 'NtOpenMutant');
  11980. Result := TFNNtOpenMutant(_NtOpenMutant)(
  11981. MutantHandle, DesiredAccess, ObjectAttributes
  11982. );
  11983. end;
  11984. // Dynamic version of NtOpenMutant
  11985. function ZwOpenMutant(
  11986. MutantHandle : PHANDLE;
  11987. DesiredAccess : ACCESS_MASK;
  11988. ObjectAttributes : POBJECT_ATTRIBUTES
  11989. ): NTSTATUS; stdcall;
  11990. begin
  11991. GetProcedureAddress(_NtOpenMutant, ntdll, 'NtOpenMutant');
  11992. Result := TFNNtOpenMutant(_NtOpenMutant)(
  11993. MutantHandle, DesiredAccess, ObjectAttributes
  11994. );
  11995. end;
  11996. // Dynamic version of NtOpenObjectAuditAlarm
  11997. function NtOpenObjectAuditAlarm(
  11998. SubsystemName : PUNICODE_STRING;
  11999. HandleId : PPVOID;
  12000. ObjectTypeName : PUNICODE_STRING;
  12001. ObjectName : PUNICODE_STRING;
  12002. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  12003. TokenHandle : HANDLE;
  12004. DesiredAccess : ACCESS_MASK;
  12005. GrantedAccess : ACCESS_MASK;
  12006. Privileges : PPRIVILEGE_SET;
  12007. ObjectCreation : BOOLEAN;
  12008. AccessGranted : BOOLEAN;
  12009. GenerateOnClose : PBOOLEAN
  12010. ): NTSTATUS; stdcall;
  12011. begin
  12012. GetProcedureAddress(_NtOpenObjectAuditAlarm, ntdll, 'NtOpenObjectAuditAlarm');
  12013. Result := TFNNtOpenObjectAuditAlarm(_NtOpenObjectAuditAlarm)(
  12014. SubsystemName, HandleId, ObjectTypeName, ObjectName, SecurityDescriptor, TokenHandle, DesiredAccess, GrantedAccess, Privileges, ObjectCreation, AccessGranted, GenerateOnClose
  12015. );
  12016. end;
  12017. // Dynamic version of NtOpenObjectAuditAlarm
  12018. function ZwOpenObjectAuditAlarm(
  12019. SubsystemName : PUNICODE_STRING;
  12020. HandleId : PPVOID;
  12021. ObjectTypeName : PUNICODE_STRING;
  12022. ObjectName : PUNICODE_STRING;
  12023. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  12024. TokenHandle : HANDLE;
  12025. DesiredAccess : ACCESS_MASK;
  12026. GrantedAccess : ACCESS_MASK;
  12027. Privileges : PPRIVILEGE_SET;
  12028. ObjectCreation : BOOLEAN;
  12029. AccessGranted : BOOLEAN;
  12030. GenerateOnClose : PBOOLEAN
  12031. ): NTSTATUS; stdcall;
  12032. begin
  12033. GetProcedureAddress(_NtOpenObjectAuditAlarm, ntdll, 'NtOpenObjectAuditAlarm');
  12034. Result := TFNNtOpenObjectAuditAlarm(_NtOpenObjectAuditAlarm)(
  12035. SubsystemName, HandleId, ObjectTypeName, ObjectName, SecurityDescriptor, TokenHandle, DesiredAccess, GrantedAccess, Privileges, ObjectCreation, AccessGranted, GenerateOnClose
  12036. );
  12037. end;
  12038. // Dynamic version of NtOpenProcess
  12039. function NtOpenProcess(
  12040. ProcessHandle : PHANDLE;
  12041. DesiredAccess : ACCESS_MASK;
  12042. ObjectAttributes : POBJECT_ATTRIBUTES;
  12043. ClientId : PCLIENT_ID
  12044. ): NTSTATUS; stdcall;
  12045. begin
  12046. GetProcedureAddress(_NtOpenProcess, ntdll, 'NtOpenProcess');
  12047. Result := TFNNtOpenProcess(_NtOpenProcess)(
  12048. ProcessHandle, DesiredAccess, ObjectAttributes, ClientId
  12049. );
  12050. end;
  12051. // Dynamic version of NtOpenProcess
  12052. function ZwOpenProcess(
  12053. ProcessHandle : PHANDLE;
  12054. DesiredAccess : ACCESS_MASK;
  12055. ObjectAttributes : POBJECT_ATTRIBUTES;
  12056. ClientId : PCLIENT_ID
  12057. ): NTSTATUS; stdcall;
  12058. begin
  12059. GetProcedureAddress(_NtOpenProcess, ntdll, 'NtOpenProcess');
  12060. Result := TFNNtOpenProcess(_NtOpenProcess)(
  12061. ProcessHandle, DesiredAccess, ObjectAttributes, ClientId
  12062. );
  12063. end;
  12064. // Dynamic version of NtOpenProcessToken
  12065. function NtOpenProcessToken(
  12066. ProcessHandle : HANDLE;
  12067. DesiredAccess : ACCESS_MASK;
  12068. TokenHandle : PHANDLE
  12069. ): NTSTATUS; stdcall;
  12070. begin
  12071. GetProcedureAddress(_NtOpenProcessToken, ntdll, 'NtOpenProcessToken');
  12072. Result := TFNNtOpenProcessToken(_NtOpenProcessToken)(
  12073. ProcessHandle, DesiredAccess, TokenHandle
  12074. );
  12075. end;
  12076. // Dynamic version of NtOpenProcessToken
  12077. function ZwOpenProcessToken(
  12078. ProcessHandle : HANDLE;
  12079. DesiredAccess : ACCESS_MASK;
  12080. TokenHandle : PHANDLE
  12081. ): NTSTATUS; stdcall;
  12082. begin
  12083. GetProcedureAddress(_NtOpenProcessToken, ntdll, 'NtOpenProcessToken');
  12084. Result := TFNNtOpenProcessToken(_NtOpenProcessToken)(
  12085. ProcessHandle, DesiredAccess, TokenHandle
  12086. );
  12087. end;
  12088. // Dynamic version of NtOpenSection
  12089. function NtOpenSection(
  12090. SectionHandle : PHANDLE;
  12091. DesiredAccess : ACCESS_MASK;
  12092. ObjectAttributes : POBJECT_ATTRIBUTES
  12093. ): NTSTATUS; stdcall;
  12094. begin
  12095. GetProcedureAddress(_NtOpenSection, ntdll, 'NtOpenSection');
  12096. Result := TFNNtOpenSection(_NtOpenSection)(
  12097. SectionHandle, DesiredAccess, ObjectAttributes
  12098. );
  12099. end;
  12100. // Dynamic version of NtOpenSection
  12101. function ZwOpenSection(
  12102. SectionHandle : PHANDLE;
  12103. DesiredAccess : ACCESS_MASK;
  12104. ObjectAttributes : POBJECT_ATTRIBUTES
  12105. ): NTSTATUS; stdcall;
  12106. begin
  12107. GetProcedureAddress(_NtOpenSection, ntdll, 'NtOpenSection');
  12108. Result := TFNNtOpenSection(_NtOpenSection)(
  12109. SectionHandle, DesiredAccess, ObjectAttributes
  12110. );
  12111. end;
  12112. // Dynamic version of NtOpenSemaphore
  12113. function NtOpenSemaphore(
  12114. SemaphoreHandle : PHANDLE;
  12115. DesiredAccess : ACCESS_MASK;
  12116. ObjectAttributes : POBJECT_ATTRIBUTES
  12117. ): NTSTATUS; stdcall;
  12118. begin
  12119. GetProcedureAddress(_NtOpenSemaphore, ntdll, 'NtOpenSemaphore');
  12120. Result := TFNNtOpenSemaphore(_NtOpenSemaphore)(
  12121. SemaphoreHandle, DesiredAccess, ObjectAttributes
  12122. );
  12123. end;
  12124. // Dynamic version of NtOpenSemaphore
  12125. function ZwOpenSemaphore(
  12126. SemaphoreHandle : PHANDLE;
  12127. DesiredAccess : ACCESS_MASK;
  12128. ObjectAttributes : POBJECT_ATTRIBUTES
  12129. ): NTSTATUS; stdcall;
  12130. begin
  12131. GetProcedureAddress(_NtOpenSemaphore, ntdll, 'NtOpenSemaphore');
  12132. Result := TFNNtOpenSemaphore(_NtOpenSemaphore)(
  12133. SemaphoreHandle, DesiredAccess, ObjectAttributes
  12134. );
  12135. end;
  12136. // Dynamic version of NtOpenSymbolicLinkObject
  12137. function NtOpenSymbolicLinkObject(
  12138. SymbolicLinkHandle : PHANDLE;
  12139. DesiredAccess : ACCESS_MASK;
  12140. ObjectAttributes : POBJECT_ATTRIBUTES
  12141. ): NTSTATUS; stdcall;
  12142. begin
  12143. GetProcedureAddress(_NtOpenSymbolicLinkObject, ntdll, 'NtOpenSymbolicLinkObject');
  12144. Result := TFNNtOpenSymbolicLinkObject(_NtOpenSymbolicLinkObject)(
  12145. SymbolicLinkHandle, DesiredAccess, ObjectAttributes
  12146. );
  12147. end;
  12148. // Dynamic version of NtOpenSymbolicLinkObject
  12149. function ZwOpenSymbolicLinkObject(
  12150. SymbolicLinkHandle : PHANDLE;
  12151. DesiredAccess : ACCESS_MASK;
  12152. ObjectAttributes : POBJECT_ATTRIBUTES
  12153. ): NTSTATUS; stdcall;
  12154. begin
  12155. GetProcedureAddress(_NtOpenSymbolicLinkObject, ntdll, 'NtOpenSymbolicLinkObject');
  12156. Result := TFNNtOpenSymbolicLinkObject(_NtOpenSymbolicLinkObject)(
  12157. SymbolicLinkHandle, DesiredAccess, ObjectAttributes
  12158. );
  12159. end;
  12160. // Dynamic version of NtOpenThread
  12161. function NtOpenThread(
  12162. ThreadHandle : PHANDLE;
  12163. DesiredAccess : ACCESS_MASK;
  12164. ObjectAttributes : POBJECT_ATTRIBUTES;
  12165. ClientId : PCLIENT_ID
  12166. ): NTSTATUS; stdcall;
  12167. begin
  12168. GetProcedureAddress(_NtOpenThread, ntdll, 'NtOpenThread');
  12169. Result := TFNNtOpenThread(_NtOpenThread)(
  12170. ThreadHandle, DesiredAccess, ObjectAttributes, ClientId
  12171. );
  12172. end;
  12173. // Dynamic version of NtOpenThread
  12174. function ZwOpenThread(
  12175. ThreadHandle : PHANDLE;
  12176. DesiredAccess : ACCESS_MASK;
  12177. ObjectAttributes : POBJECT_ATTRIBUTES;
  12178. ClientId : PCLIENT_ID
  12179. ): NTSTATUS; stdcall;
  12180. begin
  12181. GetProcedureAddress(_NtOpenThread, ntdll, 'NtOpenThread');
  12182. Result := TFNNtOpenThread(_NtOpenThread)(
  12183. ThreadHandle, DesiredAccess, ObjectAttributes, ClientId
  12184. );
  12185. end;
  12186. // Dynamic version of NtOpenThreadToken
  12187. function NtOpenThreadToken(
  12188. ThreadHandle : HANDLE;
  12189. DesiredAccess : ACCESS_MASK;
  12190. OpenAsSelf : BOOLEAN;
  12191. TokenHandle : PHANDLE
  12192. ): NTSTATUS; stdcall;
  12193. begin
  12194. GetProcedureAddress(_NtOpenThreadToken, ntdll, 'NtOpenThreadToken');
  12195. Result := TFNNtOpenThreadToken(_NtOpenThreadToken)(
  12196. ThreadHandle, DesiredAccess, OpenAsSelf, TokenHandle
  12197. );
  12198. end;
  12199. // Dynamic version of NtOpenThreadToken
  12200. function ZwOpenThreadToken(
  12201. ThreadHandle : HANDLE;
  12202. DesiredAccess : ACCESS_MASK;
  12203. OpenAsSelf : BOOLEAN;
  12204. TokenHandle : PHANDLE
  12205. ): NTSTATUS; stdcall;
  12206. begin
  12207. GetProcedureAddress(_NtOpenThreadToken, ntdll, 'NtOpenThreadToken');
  12208. Result := TFNNtOpenThreadToken(_NtOpenThreadToken)(
  12209. ThreadHandle, DesiredAccess, OpenAsSelf, TokenHandle
  12210. );
  12211. end;
  12212. // Dynamic version of NtOpenTimer
  12213. function NtOpenTimer(
  12214. TimerHandle : PHANDLE;
  12215. DesiredAccess : ACCESS_MASK;
  12216. ObjectAttributes : POBJECT_ATTRIBUTES
  12217. ): NTSTATUS; stdcall;
  12218. begin
  12219. GetProcedureAddress(_NtOpenTimer, ntdll, 'NtOpenTimer');
  12220. Result := TFNNtOpenTimer(_NtOpenTimer)(
  12221. TimerHandle, DesiredAccess, ObjectAttributes
  12222. );
  12223. end;
  12224. // Dynamic version of NtOpenTimer
  12225. function ZwOpenTimer(
  12226. TimerHandle : PHANDLE;
  12227. DesiredAccess : ACCESS_MASK;
  12228. ObjectAttributes : POBJECT_ATTRIBUTES
  12229. ): NTSTATUS; stdcall;
  12230. begin
  12231. GetProcedureAddress(_NtOpenTimer, ntdll, 'NtOpenTimer');
  12232. Result := TFNNtOpenTimer(_NtOpenTimer)(
  12233. TimerHandle, DesiredAccess, ObjectAttributes
  12234. );
  12235. end;
  12236. // Dynamic version of NtPlugPlayControl
  12237. function NtPlugPlayControl(
  12238. ControlCode : ULONG;
  12239. Buffer : PVOID;
  12240. BufferLength : ULONG
  12241. ): NTSTATUS; stdcall;
  12242. begin
  12243. GetProcedureAddress(_NtPlugPlayControl, ntdll, 'NtPlugPlayControl');
  12244. Result := TFNNtPlugPlayControl(_NtPlugPlayControl)(
  12245. ControlCode, Buffer, BufferLength
  12246. );
  12247. end;
  12248. // Dynamic version of NtPlugPlayControl
  12249. function ZwPlugPlayControl(
  12250. ControlCode : ULONG;
  12251. Buffer : PVOID;
  12252. BufferLength : ULONG
  12253. ): NTSTATUS; stdcall;
  12254. begin
  12255. GetProcedureAddress(_NtPlugPlayControl, ntdll, 'NtPlugPlayControl');
  12256. Result := TFNNtPlugPlayControl(_NtPlugPlayControl)(
  12257. ControlCode, Buffer, BufferLength
  12258. );
  12259. end;
  12260. // Dynamic version of NtPowerInformation
  12261. function NtPowerInformation(
  12262. PowerInformationLevel : POWER_INFORMATION_LEVEL;
  12263. InputBuffer : PVOID;
  12264. InputBufferLength : ULONG;
  12265. OutputBuffer : PVOID;
  12266. OutputBufferLength : ULONG
  12267. ): NTSTATUS; stdcall;
  12268. begin
  12269. GetProcedureAddress(_NtPowerInformation, ntdll, 'NtPowerInformation');
  12270. Result := TFNNtPowerInformation(_NtPowerInformation)(
  12271. PowerInformationLevel, InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength
  12272. );
  12273. end;
  12274. // Dynamic version of NtPowerInformation
  12275. function ZwPowerInformation(
  12276. PowerInformationLevel : POWER_INFORMATION_LEVEL;
  12277. InputBuffer : PVOID;
  12278. InputBufferLength : ULONG;
  12279. OutputBuffer : PVOID;
  12280. OutputBufferLength : ULONG
  12281. ): NTSTATUS; stdcall;
  12282. begin
  12283. GetProcedureAddress(_NtPowerInformation, ntdll, 'NtPowerInformation');
  12284. Result := TFNNtPowerInformation(_NtPowerInformation)(
  12285. PowerInformationLevel, InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength
  12286. );
  12287. end;
  12288. // Dynamic version of NtPrivilegeCheck
  12289. function NtPrivilegeCheck(
  12290. TokenHandle : HANDLE;
  12291. RequiredPrivileges : PPRIVILEGE_SET;
  12292. Result_ : PBOOLEAN
  12293. ): NTSTATUS; stdcall;
  12294. begin
  12295. GetProcedureAddress(_NtPrivilegeCheck, ntdll, 'NtPrivilegeCheck');
  12296. Result := TFNNtPrivilegeCheck(_NtPrivilegeCheck)(
  12297. TokenHandle, RequiredPrivileges, Result_
  12298. );
  12299. end;
  12300. // Dynamic version of NtPrivilegeCheck
  12301. function ZwPrivilegeCheck(
  12302. TokenHandle : HANDLE;
  12303. RequiredPrivileges : PPRIVILEGE_SET;
  12304. Result_ : PBOOLEAN
  12305. ): NTSTATUS; stdcall;
  12306. begin
  12307. GetProcedureAddress(_NtPrivilegeCheck, ntdll, 'NtPrivilegeCheck');
  12308. Result := TFNNtPrivilegeCheck(_NtPrivilegeCheck)(
  12309. TokenHandle, RequiredPrivileges, Result_
  12310. );
  12311. end;
  12312. // Dynamic version of NtPrivilegeObjectAuditAlarm
  12313. function NtPrivilegeObjectAuditAlarm(
  12314. SubsystemName : PUNICODE_STRING;
  12315. HandleId : PVOID;
  12316. TokenHandle : HANDLE;
  12317. DesiredAccess : ACCESS_MASK;
  12318. Privileges : PPRIVILEGE_SET;
  12319. AccessGranted : BOOLEAN
  12320. ): NTSTATUS; stdcall;
  12321. begin
  12322. GetProcedureAddress(_NtPrivilegeObjectAuditAlarm, ntdll, 'NtPrivilegeObjectAuditAlarm');
  12323. Result := TFNNtPrivilegeObjectAuditAlarm(_NtPrivilegeObjectAuditAlarm)(
  12324. SubsystemName, HandleId, TokenHandle, DesiredAccess, Privileges, AccessGranted
  12325. );
  12326. end;
  12327. // Dynamic version of NtPrivilegeObjectAuditAlarm
  12328. function ZwPrivilegeObjectAuditAlarm(
  12329. SubsystemName : PUNICODE_STRING;
  12330. HandleId : PVOID;
  12331. TokenHandle : HANDLE;
  12332. DesiredAccess : ACCESS_MASK;
  12333. Privileges : PPRIVILEGE_SET;
  12334. AccessGranted : BOOLEAN
  12335. ): NTSTATUS; stdcall;
  12336. begin
  12337. GetProcedureAddress(_NtPrivilegeObjectAuditAlarm, ntdll, 'NtPrivilegeObjectAuditAlarm');
  12338. Result := TFNNtPrivilegeObjectAuditAlarm(_NtPrivilegeObjectAuditAlarm)(
  12339. SubsystemName, HandleId, TokenHandle, DesiredAccess, Privileges, AccessGranted
  12340. );
  12341. end;
  12342. // Dynamic version of NtPrivilegedServiceAuditAlarm
  12343. function NtPrivilegedServiceAuditAlarm(
  12344. SubsystemName : PUNICODE_STRING;
  12345. ServiceName : PUNICODE_STRING;
  12346. TokenHandle : HANDLE;
  12347. Privileges : PPRIVILEGE_SET;
  12348. AccessGranted : BOOLEAN
  12349. ): NTSTATUS; stdcall;
  12350. begin
  12351. GetProcedureAddress(_NtPrivilegedServiceAuditAlarm, ntdll, 'NtPrivilegedServiceAuditAlarm');
  12352. Result := TFNNtPrivilegedServiceAuditAlarm(_NtPrivilegedServiceAuditAlarm)(
  12353. SubsystemName, ServiceName, TokenHandle, Privileges, AccessGranted
  12354. );
  12355. end;
  12356. // Dynamic version of NtPrivilegedServiceAuditAlarm
  12357. function ZwPrivilegedServiceAuditAlarm(
  12358. SubsystemName : PUNICODE_STRING;
  12359. ServiceName : PUNICODE_STRING;
  12360. TokenHandle : HANDLE;
  12361. Privileges : PPRIVILEGE_SET;
  12362. AccessGranted : BOOLEAN
  12363. ): NTSTATUS; stdcall;
  12364. begin
  12365. GetProcedureAddress(_NtPrivilegedServiceAuditAlarm, ntdll, 'NtPrivilegedServiceAuditAlarm');
  12366. Result := TFNNtPrivilegedServiceAuditAlarm(_NtPrivilegedServiceAuditAlarm)(
  12367. SubsystemName, ServiceName, TokenHandle, Privileges, AccessGranted
  12368. );
  12369. end;
  12370. // Dynamic version of NtProtectVirtualMemory
  12371. function NtProtectVirtualMemory(
  12372. ProcessHandle : HANDLE;
  12373. BaseAddress : PPVOID;
  12374. ProtectSize : PULONG;
  12375. NewProtect : ULONG;
  12376. OldProtect : PULONG
  12377. ): NTSTATUS; stdcall;
  12378. begin
  12379. GetProcedureAddress(_NtProtectVirtualMemory, ntdll, 'NtProtectVirtualMemory');
  12380. Result := TFNNtProtectVirtualMemory(_NtProtectVirtualMemory)(
  12381. ProcessHandle, BaseAddress, ProtectSize, NewProtect, OldProtect
  12382. );
  12383. end;
  12384. // Dynamic version of NtProtectVirtualMemory
  12385. function ZwProtectVirtualMemory(
  12386. ProcessHandle : HANDLE;
  12387. BaseAddress : PPVOID;
  12388. ProtectSize : PULONG;
  12389. NewProtect : ULONG;
  12390. OldProtect : PULONG
  12391. ): NTSTATUS; stdcall;
  12392. begin
  12393. GetProcedureAddress(_NtProtectVirtualMemory, ntdll, 'NtProtectVirtualMemory');
  12394. Result := TFNNtProtectVirtualMemory(_NtProtectVirtualMemory)(
  12395. ProcessHandle, BaseAddress, ProtectSize, NewProtect, OldProtect
  12396. );
  12397. end;
  12398. // Dynamic version of NtPulseEvent
  12399. function NtPulseEvent(
  12400. EventHandle : HANDLE;
  12401. PreviousState : PULONG
  12402. ): NTSTATUS; stdcall;
  12403. begin
  12404. GetProcedureAddress(_NtPulseEvent, ntdll, 'NtPulseEvent');
  12405. Result := TFNNtPulseEvent(_NtPulseEvent)(
  12406. EventHandle, PreviousState
  12407. );
  12408. end;
  12409. // Dynamic version of NtPulseEvent
  12410. function ZwPulseEvent(
  12411. EventHandle : HANDLE;
  12412. PreviousState : PULONG
  12413. ): NTSTATUS; stdcall;
  12414. begin
  12415. GetProcedureAddress(_NtPulseEvent, ntdll, 'NtPulseEvent');
  12416. Result := TFNNtPulseEvent(_NtPulseEvent)(
  12417. EventHandle, PreviousState
  12418. );
  12419. end;
  12420. // Dynamic version of NtQueryAttributesFile
  12421. function NtQueryAttributesFile(
  12422. ObjectAttributes : POBJECT_ATTRIBUTES;
  12423. FileInformation : PFILE_BASIC_INFORMATION
  12424. ): NTSTATUS; stdcall;
  12425. begin
  12426. GetProcedureAddress(_NtQueryAttributesFile, ntdll, 'NtQueryAttributesFile');
  12427. Result := TFNNtQueryAttributesFile(_NtQueryAttributesFile)(
  12428. ObjectAttributes, FileInformation
  12429. );
  12430. end;
  12431. // Dynamic version of NtQueryAttributesFile
  12432. function ZwQueryAttributesFile(
  12433. ObjectAttributes : POBJECT_ATTRIBUTES;
  12434. FileInformation : PFILE_BASIC_INFORMATION
  12435. ): NTSTATUS; stdcall;
  12436. begin
  12437. GetProcedureAddress(_NtQueryAttributesFile, ntdll, 'NtQueryAttributesFile');
  12438. Result := TFNNtQueryAttributesFile(_NtQueryAttributesFile)(
  12439. ObjectAttributes, FileInformation
  12440. );
  12441. end;
  12442. // Dynamic version of NtQueryDefaultLocale
  12443. function NtQueryDefaultLocale(
  12444. ThreadOrSystem : BOOLEAN;
  12445. Locale : PLCID
  12446. ): NTSTATUS; stdcall;
  12447. begin
  12448. GetProcedureAddress(_NtQueryDefaultLocale, ntdll, 'NtQueryDefaultLocale');
  12449. Result := TFNNtQueryDefaultLocale(_NtQueryDefaultLocale)(
  12450. ThreadOrSystem, Locale
  12451. );
  12452. end;
  12453. // Dynamic version of NtQueryDefaultLocale
  12454. function ZwQueryDefaultLocale(
  12455. ThreadOrSystem : BOOLEAN;
  12456. Locale : PLCID
  12457. ): NTSTATUS; stdcall;
  12458. begin
  12459. GetProcedureAddress(_NtQueryDefaultLocale, ntdll, 'NtQueryDefaultLocale');
  12460. Result := TFNNtQueryDefaultLocale(_NtQueryDefaultLocale)(
  12461. ThreadOrSystem, Locale
  12462. );
  12463. end;
  12464. // Dynamic version of NtQueryDefaultUILanguage
  12465. function NtQueryDefaultUILanguage(
  12466. LanguageId : PLANGID
  12467. ): NTSTATUS; stdcall;
  12468. begin
  12469. GetProcedureAddress(_NtQueryDefaultUILanguage, ntdll, 'NtQueryDefaultUILanguage');
  12470. Result := TFNNtQueryDefaultUILanguage(_NtQueryDefaultUILanguage)(
  12471. LanguageId
  12472. );
  12473. end;
  12474. // Dynamic version of NtQueryDefaultUILanguage
  12475. function ZwQueryDefaultUILanguage(
  12476. LanguageId : PLANGID
  12477. ): NTSTATUS; stdcall;
  12478. begin
  12479. GetProcedureAddress(_NtQueryDefaultUILanguage, ntdll, 'NtQueryDefaultUILanguage');
  12480. Result := TFNNtQueryDefaultUILanguage(_NtQueryDefaultUILanguage)(
  12481. LanguageId
  12482. );
  12483. end;
  12484. // Dynamic version of NtQueryDirectoryFile
  12485. function NtQueryDirectoryFile(
  12486. FileHandle : HANDLE;
  12487. Event : HANDLE;
  12488. ApcRoutine : PIO_APC_ROUTINE;
  12489. ApcContext : PVOID;
  12490. IoStatusBlock : PIO_STATUS_BLOCK;
  12491. FileInformation : PVOID;
  12492. FileInformationLength : ULONG;
  12493. FileInformationClass : FILE_INFORMATION_CLASS;
  12494. ReturnSingleEntry : BOOLEAN;
  12495. FileName : PUNICODE_STRING;
  12496. RestartScan : BOOLEAN
  12497. ): NTSTATUS; stdcall;
  12498. begin
  12499. GetProcedureAddress(_NtQueryDirectoryFile, ntdll, 'NtQueryDirectoryFile');
  12500. Result := TFNNtQueryDirectoryFile(_NtQueryDirectoryFile)(
  12501. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, FileInformation, FileInformationLength, FileInformationClass, ReturnSingleEntry, FileName, RestartScan
  12502. );
  12503. end;
  12504. // Dynamic version of NtQueryDirectoryFile
  12505. function ZwQueryDirectoryFile(
  12506. FileHandle : HANDLE;
  12507. Event : HANDLE;
  12508. ApcRoutine : PIO_APC_ROUTINE;
  12509. ApcContext : PVOID;
  12510. IoStatusBlock : PIO_STATUS_BLOCK;
  12511. FileInformation : PVOID;
  12512. FileInformationLength : ULONG;
  12513. FileInformationClass : FILE_INFORMATION_CLASS;
  12514. ReturnSingleEntry : BOOLEAN;
  12515. FileName : PUNICODE_STRING;
  12516. RestartScan : BOOLEAN
  12517. ): NTSTATUS; stdcall;
  12518. begin
  12519. GetProcedureAddress(_NtQueryDirectoryFile, ntdll, 'NtQueryDirectoryFile');
  12520. Result := TFNNtQueryDirectoryFile(_NtQueryDirectoryFile)(
  12521. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, FileInformation, FileInformationLength, FileInformationClass, ReturnSingleEntry, FileName, RestartScan
  12522. );
  12523. end;
  12524. // Dynamic version of NtQueryDirectoryObject
  12525. function NtQueryDirectoryObject(
  12526. DirectoryHandle : HANDLE;
  12527. Buffer : PVOID;
  12528. BufferLength : ULONG;
  12529. ReturnSingleEntry : BOOLEAN;
  12530. RestartScan : BOOLEAN;
  12531. Context : PULONG;
  12532. ReturnLength : PULONG
  12533. ): NTSTATUS; stdcall;
  12534. begin
  12535. GetProcedureAddress(_NtQueryDirectoryObject, ntdll, 'NtQueryDirectoryObject');
  12536. Result := TFNNtQueryDirectoryObject(_NtQueryDirectoryObject)(
  12537. DirectoryHandle, Buffer, BufferLength, ReturnSingleEntry, RestartScan, Context, ReturnLength
  12538. );
  12539. end;
  12540. // Dynamic version of NtQueryDirectoryObject
  12541. function ZwQueryDirectoryObject(
  12542. DirectoryHandle : HANDLE;
  12543. Buffer : PVOID;
  12544. BufferLength : ULONG;
  12545. ReturnSingleEntry : BOOLEAN;
  12546. RestartScan : BOOLEAN;
  12547. Context : PULONG;
  12548. ReturnLength : PULONG
  12549. ): NTSTATUS; stdcall;
  12550. begin
  12551. GetProcedureAddress(_NtQueryDirectoryObject, ntdll, 'NtQueryDirectoryObject');
  12552. Result := TFNNtQueryDirectoryObject(_NtQueryDirectoryObject)(
  12553. DirectoryHandle, Buffer, BufferLength, ReturnSingleEntry, RestartScan, Context, ReturnLength
  12554. );
  12555. end;
  12556. // Dynamic version of NtQueryEaFile
  12557. function NtQueryEaFile(
  12558. FileHandle : HANDLE;
  12559. IoStatusBlock : PIO_STATUS_BLOCK;
  12560. Buffer : PFILE_FULL_EA_INFORMATION;
  12561. BufferLength : ULONG;
  12562. ReturnSingleEntry : BOOLEAN;
  12563. EaList : PFILE_GET_EA_INFORMATION;
  12564. EaListLength : ULONG;
  12565. EaIndex : PULONG;
  12566. RestartScan : BOOLEAN
  12567. ): NTSTATUS; stdcall;
  12568. begin
  12569. GetProcedureAddress(_NtQueryEaFile, ntdll, 'NtQueryEaFile');
  12570. Result := TFNNtQueryEaFile(_NtQueryEaFile)(
  12571. FileHandle, IoStatusBlock, Buffer, BufferLength, ReturnSingleEntry, EaList, EaListLength, EaIndex, RestartScan
  12572. );
  12573. end;
  12574. // Dynamic version of NtQueryEaFile
  12575. function ZwQueryEaFile(
  12576. FileHandle : HANDLE;
  12577. IoStatusBlock : PIO_STATUS_BLOCK;
  12578. Buffer : PFILE_FULL_EA_INFORMATION;
  12579. BufferLength : ULONG;
  12580. ReturnSingleEntry : BOOLEAN;
  12581. EaList : PFILE_GET_EA_INFORMATION;
  12582. EaListLength : ULONG;
  12583. EaIndex : PULONG;
  12584. RestartScan : BOOLEAN
  12585. ): NTSTATUS; stdcall;
  12586. begin
  12587. GetProcedureAddress(_NtQueryEaFile, ntdll, 'NtQueryEaFile');
  12588. Result := TFNNtQueryEaFile(_NtQueryEaFile)(
  12589. FileHandle, IoStatusBlock, Buffer, BufferLength, ReturnSingleEntry, EaList, EaListLength, EaIndex, RestartScan
  12590. );
  12591. end;
  12592. // Dynamic version of NtQueryEvent
  12593. function NtQueryEvent(
  12594. EventHandle : HANDLE;
  12595. EventInformationClass : EVENT_INFORMATION_CLASS;
  12596. EventInformation : PVOID;
  12597. EventInformationLength : ULONG;
  12598. ResultLength : PULONG
  12599. ): NTSTATUS; stdcall;
  12600. begin
  12601. GetProcedureAddress(_NtQueryEvent, ntdll, 'NtQueryEvent');
  12602. Result := TFNNtQueryEvent(_NtQueryEvent)(
  12603. EventHandle, EventInformationClass, EventInformation, EventInformationLength, ResultLength
  12604. );
  12605. end;
  12606. // Dynamic version of NtQueryEvent
  12607. function ZwQueryEvent(
  12608. EventHandle : HANDLE;
  12609. EventInformationClass : EVENT_INFORMATION_CLASS;
  12610. EventInformation : PVOID;
  12611. EventInformationLength : ULONG;
  12612. ResultLength : PULONG
  12613. ): NTSTATUS; stdcall;
  12614. begin
  12615. GetProcedureAddress(_NtQueryEvent, ntdll, 'NtQueryEvent');
  12616. Result := TFNNtQueryEvent(_NtQueryEvent)(
  12617. EventHandle, EventInformationClass, EventInformation, EventInformationLength, ResultLength
  12618. );
  12619. end;
  12620. // Dynamic version of NtQueryFullAttributesFile
  12621. function NtQueryFullAttributesFile(
  12622. ObjectAttributes : POBJECT_ATTRIBUTES;
  12623. FileInformation : PFILE_NETWORK_OPEN_INFORMATION
  12624. ): NTSTATUS; stdcall;
  12625. begin
  12626. GetProcedureAddress(_NtQueryFullAttributesFile, ntdll, 'NtQueryFullAttributesFile');
  12627. Result := TFNNtQueryFullAttributesFile(_NtQueryFullAttributesFile)(
  12628. ObjectAttributes, FileInformation
  12629. );
  12630. end;
  12631. // Dynamic version of NtQueryFullAttributesFile
  12632. function ZwQueryFullAttributesFile(
  12633. ObjectAttributes : POBJECT_ATTRIBUTES;
  12634. FileInformation : PFILE_NETWORK_OPEN_INFORMATION
  12635. ): NTSTATUS; stdcall;
  12636. begin
  12637. GetProcedureAddress(_NtQueryFullAttributesFile, ntdll, 'NtQueryFullAttributesFile');
  12638. Result := TFNNtQueryFullAttributesFile(_NtQueryFullAttributesFile)(
  12639. ObjectAttributes, FileInformation
  12640. );
  12641. end;
  12642. // Dynamic version of NtQueryInformationAtom
  12643. function NtQueryInformationAtom(
  12644. Atom : USHORT;
  12645. AtomInformationClass : ATOM_INFORMATION_CLASS;
  12646. AtomInformation : PVOID;
  12647. AtomInformationLength : ULONG;
  12648. ReturnLength : PULONG
  12649. ): NTSTATUS; stdcall;
  12650. begin
  12651. GetProcedureAddress(_NtQueryInformationAtom, ntdll, 'NtQueryInformationAtom');
  12652. Result := TFNNtQueryInformationAtom(_NtQueryInformationAtom)(
  12653. Atom, AtomInformationClass, AtomInformation, AtomInformationLength, ReturnLength
  12654. );
  12655. end;
  12656. // Dynamic version of NtQueryInformationAtom
  12657. function ZwQueryInformationAtom(
  12658. Atom : USHORT;
  12659. AtomInformationClass : ATOM_INFORMATION_CLASS;
  12660. AtomInformation : PVOID;
  12661. AtomInformationLength : ULONG;
  12662. ReturnLength : PULONG
  12663. ): NTSTATUS; stdcall;
  12664. begin
  12665. GetProcedureAddress(_NtQueryInformationAtom, ntdll, 'NtQueryInformationAtom');
  12666. Result := TFNNtQueryInformationAtom(_NtQueryInformationAtom)(
  12667. Atom, AtomInformationClass, AtomInformation, AtomInformationLength, ReturnLength
  12668. );
  12669. end;
  12670. // Dynamic version of NtQueryInformationFile
  12671. function NtQueryInformationFile(
  12672. FileHandle : HANDLE;
  12673. IoStatusBlock : PIO_STATUS_BLOCK;
  12674. FileInformation : PVOID;
  12675. FileInformationLength : ULONG;
  12676. FileInformationClass : FILE_INFORMATION_CLASS
  12677. ): NTSTATUS; stdcall;
  12678. begin
  12679. GetProcedureAddress(_NtQueryInformationFile, ntdll, 'NtQueryInformationFile');
  12680. Result := TFNNtQueryInformationFile(_NtQueryInformationFile)(
  12681. FileHandle, IoStatusBlock, FileInformation, FileInformationLength, FileInformationClass
  12682. );
  12683. end;
  12684. // Dynamic version of NtQueryInformationFile
  12685. function ZwQueryInformationFile(
  12686. FileHandle : HANDLE;
  12687. IoStatusBlock : PIO_STATUS_BLOCK;
  12688. FileInformation : PVOID;
  12689. FileInformationLength : ULONG;
  12690. FileInformationClass : FILE_INFORMATION_CLASS
  12691. ): NTSTATUS; stdcall;
  12692. begin
  12693. GetProcedureAddress(_NtQueryInformationFile, ntdll, 'NtQueryInformationFile');
  12694. Result := TFNNtQueryInformationFile(_NtQueryInformationFile)(
  12695. FileHandle, IoStatusBlock, FileInformation, FileInformationLength, FileInformationClass
  12696. );
  12697. end;
  12698. // Dynamic version of NtQueryInformationJobObject
  12699. function NtQueryInformationJobObject(
  12700. JobHandle : HANDLE;
  12701. JobInformationClass : JOBOBJECTINFOCLASS;
  12702. JobInformation : PVOID;
  12703. JobInformationLength : ULONG;
  12704. ReturnLength : PULONG
  12705. ): NTSTATUS; stdcall;
  12706. begin
  12707. GetProcedureAddress(_NtQueryInformationJobObject, ntdll, 'NtQueryInformationJobObject');
  12708. Result := TFNNtQueryInformationJobObject(_NtQueryInformationJobObject)(
  12709. JobHandle, JobInformationClass, JobInformation, JobInformationLength, ReturnLength
  12710. );
  12711. end;
  12712. // Dynamic version of NtQueryInformationJobObject
  12713. function ZwQueryInformationJobObject(
  12714. JobHandle : HANDLE;
  12715. JobInformationClass : JOBOBJECTINFOCLASS;
  12716. JobInformation : PVOID;
  12717. JobInformationLength : ULONG;
  12718. ReturnLength : PULONG
  12719. ): NTSTATUS; stdcall;
  12720. begin
  12721. GetProcedureAddress(_NtQueryInformationJobObject, ntdll, 'NtQueryInformationJobObject');
  12722. Result := TFNNtQueryInformationJobObject(_NtQueryInformationJobObject)(
  12723. JobHandle, JobInformationClass, JobInformation, JobInformationLength, ReturnLength
  12724. );
  12725. end;
  12726. // Dynamic version of NtQueryInformationPort
  12727. function NtQueryInformationPort(
  12728. PortHandle : HANDLE;
  12729. PortInformationClass : PORT_INFORMATION_CLASS;
  12730. PortInformation : PVOID;
  12731. PortInformationLength : ULONG;
  12732. ReturnLength : PULONG
  12733. ): NTSTATUS; stdcall;
  12734. begin
  12735. GetProcedureAddress(_NtQueryInformationPort, ntdll, 'NtQueryInformationPort');
  12736. Result := TFNNtQueryInformationPort(_NtQueryInformationPort)(
  12737. PortHandle, PortInformationClass, PortInformation, PortInformationLength, ReturnLength
  12738. );
  12739. end;
  12740. // Dynamic version of NtQueryInformationPort
  12741. function ZwQueryInformationPort(
  12742. PortHandle : HANDLE;
  12743. PortInformationClass : PORT_INFORMATION_CLASS;
  12744. PortInformation : PVOID;
  12745. PortInformationLength : ULONG;
  12746. ReturnLength : PULONG
  12747. ): NTSTATUS; stdcall;
  12748. begin
  12749. GetProcedureAddress(_NtQueryInformationPort, ntdll, 'NtQueryInformationPort');
  12750. Result := TFNNtQueryInformationPort(_NtQueryInformationPort)(
  12751. PortHandle, PortInformationClass, PortInformation, PortInformationLength, ReturnLength
  12752. );
  12753. end;
  12754. // Dynamic version of NtQueryInformationProcess
  12755. function NtQueryInformationProcess(
  12756. ProcessHandle : HANDLE;
  12757. ProcessInformationClass : PROCESSINFOCLASS;
  12758. ProcessInformation : PVOID;
  12759. ProcessInformationLength : ULONG;
  12760. ReturnLength : PULONG
  12761. ): NTSTATUS; stdcall;
  12762. begin
  12763. GetProcedureAddress(_NtQueryInformationProcess, ntdll, 'NtQueryInformationProcess');
  12764. Result := TFNNtQueryInformationProcess(_NtQueryInformationProcess)(
  12765. ProcessHandle, ProcessInformationClass, ProcessInformation, ProcessInformationLength, ReturnLength
  12766. );
  12767. end;
  12768. // Dynamic version of NtQueryInformationProcess
  12769. function ZwQueryInformationProcess(
  12770. ProcessHandle : HANDLE;
  12771. ProcessInformationClass : PROCESSINFOCLASS;
  12772. ProcessInformation : PVOID;
  12773. ProcessInformationLength : ULONG;
  12774. ReturnLength : PULONG
  12775. ): NTSTATUS; stdcall;
  12776. begin
  12777. GetProcedureAddress(_NtQueryInformationProcess, ntdll, 'NtQueryInformationProcess');
  12778. Result := TFNNtQueryInformationProcess(_NtQueryInformationProcess)(
  12779. ProcessHandle, ProcessInformationClass, ProcessInformation, ProcessInformationLength, ReturnLength
  12780. );
  12781. end;
  12782. // Dynamic version of NtQueryInformationThread
  12783. function NtQueryInformationThread(
  12784. ThreadHandle : HANDLE;
  12785. ThreadInformationClass : THREADINFOCLASS;
  12786. ThreadInformation : PVOID;
  12787. ThreadInformationLength : ULONG;
  12788. ReturnLength : PULONG
  12789. ): NTSTATUS; stdcall;
  12790. begin
  12791. GetProcedureAddress(_NtQueryInformationThread, ntdll, 'NtQueryInformationThread');
  12792. Result := TFNNtQueryInformationThread(_NtQueryInformationThread)(
  12793. ThreadHandle, ThreadInformationClass, ThreadInformation, ThreadInformationLength, ReturnLength
  12794. );
  12795. end;
  12796. // Dynamic version of NtQueryInformationThread
  12797. function ZwQueryInformationThread(
  12798. ThreadHandle : HANDLE;
  12799. ThreadInformationClass : THREADINFOCLASS;
  12800. ThreadInformation : PVOID;
  12801. ThreadInformationLength : ULONG;
  12802. ReturnLength : PULONG
  12803. ): NTSTATUS; stdcall;
  12804. begin
  12805. GetProcedureAddress(_NtQueryInformationThread, ntdll, 'NtQueryInformationThread');
  12806. Result := TFNNtQueryInformationThread(_NtQueryInformationThread)(
  12807. ThreadHandle, ThreadInformationClass, ThreadInformation, ThreadInformationLength, ReturnLength
  12808. );
  12809. end;
  12810. // Dynamic version of NtQueryInformationToken
  12811. function NtQueryInformationToken(
  12812. TokenHandle : HANDLE;
  12813. TokenInformationClass : TOKEN_INFORMATION_CLASS;
  12814. TokenInformation : PVOID;
  12815. TokenInformationLength : ULONG;
  12816. ReturnLength : PULONG
  12817. ): NTSTATUS; stdcall;
  12818. begin
  12819. GetProcedureAddress(_NtQueryInformationToken, ntdll, 'NtQueryInformationToken');
  12820. Result := TFNNtQueryInformationToken(_NtQueryInformationToken)(
  12821. TokenHandle, TokenInformationClass, TokenInformation, TokenInformationLength, ReturnLength
  12822. );
  12823. end;
  12824. // Dynamic version of NtQueryInformationToken
  12825. function ZwQueryInformationToken(
  12826. TokenHandle : HANDLE;
  12827. TokenInformationClass : TOKEN_INFORMATION_CLASS;
  12828. TokenInformation : PVOID;
  12829. TokenInformationLength : ULONG;
  12830. ReturnLength : PULONG
  12831. ): NTSTATUS; stdcall;
  12832. begin
  12833. GetProcedureAddress(_NtQueryInformationToken, ntdll, 'NtQueryInformationToken');
  12834. Result := TFNNtQueryInformationToken(_NtQueryInformationToken)(
  12835. TokenHandle, TokenInformationClass, TokenInformation, TokenInformationLength, ReturnLength
  12836. );
  12837. end;
  12838. // Dynamic version of NtQueryInstallUILanguage
  12839. function NtQueryInstallUILanguage(
  12840. LanguageId : PLANGID
  12841. ): NTSTATUS; stdcall;
  12842. begin
  12843. GetProcedureAddress(_NtQueryInstallUILanguage, ntdll, 'NtQueryInstallUILanguage');
  12844. Result := TFNNtQueryInstallUILanguage(_NtQueryInstallUILanguage)(
  12845. LanguageId
  12846. );
  12847. end;
  12848. // Dynamic version of NtQueryInstallUILanguage
  12849. function ZwQueryInstallUILanguage(
  12850. LanguageId : PLANGID
  12851. ): NTSTATUS; stdcall;
  12852. begin
  12853. GetProcedureAddress(_NtQueryInstallUILanguage, ntdll, 'NtQueryInstallUILanguage');
  12854. Result := TFNNtQueryInstallUILanguage(_NtQueryInstallUILanguage)(
  12855. LanguageId
  12856. );
  12857. end;
  12858. // Dynamic version of NtQueryIntervalProfile
  12859. function NtQueryIntervalProfile(
  12860. Source : KPROFILE_SOURCE;
  12861. Interval : PULONG
  12862. ): NTSTATUS; stdcall;
  12863. begin
  12864. GetProcedureAddress(_NtQueryIntervalProfile, ntdll, 'NtQueryIntervalProfile');
  12865. Result := TFNNtQueryIntervalProfile(_NtQueryIntervalProfile)(
  12866. Source, Interval
  12867. );
  12868. end;
  12869. // Dynamic version of NtQueryIntervalProfile
  12870. function ZwQueryIntervalProfile(
  12871. Source : KPROFILE_SOURCE;
  12872. Interval : PULONG
  12873. ): NTSTATUS; stdcall;
  12874. begin
  12875. GetProcedureAddress(_NtQueryIntervalProfile, ntdll, 'NtQueryIntervalProfile');
  12876. Result := TFNNtQueryIntervalProfile(_NtQueryIntervalProfile)(
  12877. Source, Interval
  12878. );
  12879. end;
  12880. // Dynamic version of NtQueryIoCompletion
  12881. function NtQueryIoCompletion(
  12882. IoCompletionHandle : HANDLE;
  12883. IoCompletionInformationClass : IO_COMPLETION_INFORMATION_CLASS;
  12884. IoCompletionInformation : PVOID;
  12885. IoCompletionInformationLength : ULONG;
  12886. ResultLength : PULONG
  12887. ): NTSTATUS; stdcall;
  12888. begin
  12889. GetProcedureAddress(_NtQueryIoCompletion, ntdll, 'NtQueryIoCompletion');
  12890. Result := TFNNtQueryIoCompletion(_NtQueryIoCompletion)(
  12891. IoCompletionHandle, IoCompletionInformationClass, IoCompletionInformation, IoCompletionInformationLength, ResultLength
  12892. );
  12893. end;
  12894. // Dynamic version of NtQueryIoCompletion
  12895. function ZwQueryIoCompletion(
  12896. IoCompletionHandle : HANDLE;
  12897. IoCompletionInformationClass : IO_COMPLETION_INFORMATION_CLASS;
  12898. IoCompletionInformation : PVOID;
  12899. IoCompletionInformationLength : ULONG;
  12900. ResultLength : PULONG
  12901. ): NTSTATUS; stdcall;
  12902. begin
  12903. GetProcedureAddress(_NtQueryIoCompletion, ntdll, 'NtQueryIoCompletion');
  12904. Result := TFNNtQueryIoCompletion(_NtQueryIoCompletion)(
  12905. IoCompletionHandle, IoCompletionInformationClass, IoCompletionInformation, IoCompletionInformationLength, ResultLength
  12906. );
  12907. end;
  12908. // Dynamic version of NtQueryKey
  12909. function NtQueryKey(
  12910. KeyHandle : HANDLE;
  12911. KeyInformationClass : KEY_INFORMATION_CLASS;
  12912. KeyInformation : PVOID;
  12913. KeyInformationLength : ULONG;
  12914. ResultLength : PULONG
  12915. ): NTSTATUS; stdcall;
  12916. begin
  12917. GetProcedureAddress(_NtQueryKey, ntdll, 'NtQueryKey');
  12918. Result := TFNNtQueryKey(_NtQueryKey)(
  12919. KeyHandle, KeyInformationClass, KeyInformation, KeyInformationLength, ResultLength
  12920. );
  12921. end;
  12922. // Dynamic version of NtQueryKey
  12923. function ZwQueryKey(
  12924. KeyHandle : HANDLE;
  12925. KeyInformationClass : KEY_INFORMATION_CLASS;
  12926. KeyInformation : PVOID;
  12927. KeyInformationLength : ULONG;
  12928. ResultLength : PULONG
  12929. ): NTSTATUS; stdcall;
  12930. begin
  12931. GetProcedureAddress(_NtQueryKey, ntdll, 'NtQueryKey');
  12932. Result := TFNNtQueryKey(_NtQueryKey)(
  12933. KeyHandle, KeyInformationClass, KeyInformation, KeyInformationLength, ResultLength
  12934. );
  12935. end;
  12936. // Dynamic version of NtQueryMultipleValueKey
  12937. function NtQueryMultipleValueKey(
  12938. KeyHandle : HANDLE;
  12939. ValueList : PKEY_VALUE_ENTRY;
  12940. NumberOfValues : ULONG;
  12941. Buffer : PVOID;
  12942. Length : PULONG;
  12943. ReturnLength : PULONG
  12944. ): NTSTATUS; stdcall;
  12945. begin
  12946. GetProcedureAddress(_NtQueryMultipleValueKey, ntdll, 'NtQueryMultipleValueKey');
  12947. Result := TFNNtQueryMultipleValueKey(_NtQueryMultipleValueKey)(
  12948. KeyHandle, ValueList, NumberOfValues, Buffer, Length, ReturnLength
  12949. );
  12950. end;
  12951. // Dynamic version of NtQueryMultipleValueKey
  12952. function ZwQueryMultipleValueKey(
  12953. KeyHandle : HANDLE;
  12954. ValueList : PKEY_VALUE_ENTRY;
  12955. NumberOfValues : ULONG;
  12956. Buffer : PVOID;
  12957. Length : PULONG;
  12958. ReturnLength : PULONG
  12959. ): NTSTATUS; stdcall;
  12960. begin
  12961. GetProcedureAddress(_NtQueryMultipleValueKey, ntdll, 'NtQueryMultipleValueKey');
  12962. Result := TFNNtQueryMultipleValueKey(_NtQueryMultipleValueKey)(
  12963. KeyHandle, ValueList, NumberOfValues, Buffer, Length, ReturnLength
  12964. );
  12965. end;
  12966. // Dynamic version of NtQueryMutant
  12967. function NtQueryMutant(
  12968. MutantHandle : HANDLE;
  12969. MutantInformationClass : MUTANT_INFORMATION_CLASS;
  12970. MutantInformation : PVOID;
  12971. MutantInformationLength : ULONG;
  12972. ResultLength : PULONG
  12973. ): NTSTATUS; stdcall;
  12974. begin
  12975. GetProcedureAddress(_NtQueryMutant, ntdll, 'NtQueryMutant');
  12976. Result := TFNNtQueryMutant(_NtQueryMutant)(
  12977. MutantHandle, MutantInformationClass, MutantInformation, MutantInformationLength, ResultLength
  12978. );
  12979. end;
  12980. // Dynamic version of NtQueryMutant
  12981. function ZwQueryMutant(
  12982. MutantHandle : HANDLE;
  12983. MutantInformationClass : MUTANT_INFORMATION_CLASS;
  12984. MutantInformation : PVOID;
  12985. MutantInformationLength : ULONG;
  12986. ResultLength : PULONG
  12987. ): NTSTATUS; stdcall;
  12988. begin
  12989. GetProcedureAddress(_NtQueryMutant, ntdll, 'NtQueryMutant');
  12990. Result := TFNNtQueryMutant(_NtQueryMutant)(
  12991. MutantHandle, MutantInformationClass, MutantInformation, MutantInformationLength, ResultLength
  12992. );
  12993. end;
  12994. // Dynamic version of NtQueryObject
  12995. function NtQueryObject(
  12996. ObjectHandle : HANDLE;
  12997. ObjectInformationClass : OBJECT_INFORMATION_CLASS;
  12998. ObjectInformation : PVOID;
  12999. ObjectInformationLength : ULONG;
  13000. ReturnLength : PULONG
  13001. ): NTSTATUS; stdcall;
  13002. begin
  13003. GetProcedureAddress(_NtQueryObject, ntdll, 'NtQueryObject');
  13004. Result := TFNNtQueryObject(_NtQueryObject)(
  13005. ObjectHandle, ObjectInformationClass, ObjectInformation, ObjectInformationLength, ReturnLength
  13006. );
  13007. end;
  13008. // Dynamic version of NtQueryObject
  13009. function ZwQueryObject(
  13010. ObjectHandle : HANDLE;
  13011. ObjectInformationClass : OBJECT_INFORMATION_CLASS;
  13012. ObjectInformation : PVOID;
  13013. ObjectInformationLength : ULONG;
  13014. ReturnLength : PULONG
  13015. ): NTSTATUS; stdcall;
  13016. begin
  13017. GetProcedureAddress(_NtQueryObject, ntdll, 'NtQueryObject');
  13018. Result := TFNNtQueryObject(_NtQueryObject)(
  13019. ObjectHandle, ObjectInformationClass, ObjectInformation, ObjectInformationLength, ReturnLength
  13020. );
  13021. end;
  13022. // Dynamic version of NtQueryOpenSubKeys
  13023. function NtQueryOpenSubKeys(
  13024. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  13025. NumberOfKey : PULONG
  13026. ): NTSTATUS; stdcall;
  13027. begin
  13028. GetProcedureAddress(_NtQueryOpenSubKeys, ntdll, 'NtQueryOpenSubKeys');
  13029. Result := TFNNtQueryOpenSubKeys(_NtQueryOpenSubKeys)(
  13030. KeyObjectAttributes, NumberOfKey
  13031. );
  13032. end;
  13033. // Dynamic version of NtQueryOpenSubKeys
  13034. function ZwQueryOpenSubKeys(
  13035. KeyObjectAttributes : POBJECT_ATTRIBUTES;
  13036. NumberOfKey : PULONG
  13037. ): NTSTATUS; stdcall;
  13038. begin
  13039. GetProcedureAddress(_NtQueryOpenSubKeys, ntdll, 'NtQueryOpenSubKeys');
  13040. Result := TFNNtQueryOpenSubKeys(_NtQueryOpenSubKeys)(
  13041. KeyObjectAttributes, NumberOfKey
  13042. );
  13043. end;
  13044. // Dynamic version of NtQueryPerformanceCounter
  13045. function NtQueryPerformanceCounter(
  13046. PerformanceCount : PLARGE_INTEGER;
  13047. PerformanceFrequency : PLARGE_INTEGER
  13048. ): NTSTATUS; stdcall;
  13049. begin
  13050. GetProcedureAddress(_NtQueryPerformanceCounter, ntdll, 'NtQueryPerformanceCounter');
  13051. Result := TFNNtQueryPerformanceCounter(_NtQueryPerformanceCounter)(
  13052. PerformanceCount, PerformanceFrequency
  13053. );
  13054. end;
  13055. // Dynamic version of NtQueryPerformanceCounter
  13056. function ZwQueryPerformanceCounter(
  13057. PerformanceCount : PLARGE_INTEGER;
  13058. PerformanceFrequency : PLARGE_INTEGER
  13059. ): NTSTATUS; stdcall;
  13060. begin
  13061. GetProcedureAddress(_NtQueryPerformanceCounter, ntdll, 'NtQueryPerformanceCounter');
  13062. Result := TFNNtQueryPerformanceCounter(_NtQueryPerformanceCounter)(
  13063. PerformanceCount, PerformanceFrequency
  13064. );
  13065. end;
  13066. // Dynamic version of NtQueryPortInformationProcess
  13067. function NtQueryPortInformationProcess(): ULONG; stdcall;
  13068. begin
  13069. GetProcedureAddress(_NtQueryPortInformationProcess, ntdll, 'NtQueryPortInformationProcess');
  13070. Result := TFNNtQueryPortInformationProcess(_NtQueryPortInformationProcess)();
  13071. end;
  13072. // Dynamic version of NtQueryPortInformationProcess
  13073. function ZwQueryPortInformationProcess(): ULONG; stdcall;
  13074. begin
  13075. GetProcedureAddress(_NtQueryPortInformationProcess, ntdll, 'NtQueryPortInformationProcess');
  13076. Result := TFNNtQueryPortInformationProcess(_NtQueryPortInformationProcess)();
  13077. end;
  13078. // Dynamic version of NtQueryQuotaInformationFile
  13079. function NtQueryQuotaInformationFile(
  13080. FileHandle : HANDLE;
  13081. IoStatusBlock : PIO_STATUS_BLOCK;
  13082. Buffer : PFILE_USER_QUOTA_INFORMATION;
  13083. BufferLength : ULONG;
  13084. ReturnSingleEntry : BOOLEAN;
  13085. QuotaList : PFILE_QUOTA_LIST_INFORMATION;
  13086. QuotaListLength : ULONG;
  13087. ResumeSid : PSID;
  13088. RestartScan : BOOLEAN
  13089. ): NTSTATUS; stdcall;
  13090. begin
  13091. GetProcedureAddress(_NtQueryQuotaInformationFile, ntdll, 'NtQueryQuotaInformationFile');
  13092. Result := TFNNtQueryQuotaInformationFile(_NtQueryQuotaInformationFile)(
  13093. FileHandle, IoStatusBlock, Buffer, BufferLength, ReturnSingleEntry, QuotaList, QuotaListLength, ResumeSid, RestartScan
  13094. );
  13095. end;
  13096. // Dynamic version of NtQueryQuotaInformationFile
  13097. function ZwQueryQuotaInformationFile(
  13098. FileHandle : HANDLE;
  13099. IoStatusBlock : PIO_STATUS_BLOCK;
  13100. Buffer : PFILE_USER_QUOTA_INFORMATION;
  13101. BufferLength : ULONG;
  13102. ReturnSingleEntry : BOOLEAN;
  13103. QuotaList : PFILE_QUOTA_LIST_INFORMATION;
  13104. QuotaListLength : ULONG;
  13105. ResumeSid : PSID;
  13106. RestartScan : BOOLEAN
  13107. ): NTSTATUS; stdcall;
  13108. begin
  13109. GetProcedureAddress(_NtQueryQuotaInformationFile, ntdll, 'NtQueryQuotaInformationFile');
  13110. Result := TFNNtQueryQuotaInformationFile(_NtQueryQuotaInformationFile)(
  13111. FileHandle, IoStatusBlock, Buffer, BufferLength, ReturnSingleEntry, QuotaList, QuotaListLength, ResumeSid, RestartScan
  13112. );
  13113. end;
  13114. // Dynamic version of NtQuerySection
  13115. function NtQuerySection(
  13116. SectionHandle : HANDLE;
  13117. SectionInformationClass : SECTION_INFORMATION_CLASS;
  13118. SectionInformation : PVOID;
  13119. SectionInformationLength : ULONG;
  13120. ResultLength : PULONG
  13121. ): NTSTATUS; stdcall;
  13122. begin
  13123. GetProcedureAddress(_NtQuerySection, ntdll, 'NtQuerySection');
  13124. Result := TFNNtQuerySection(_NtQuerySection)(
  13125. SectionHandle, SectionInformationClass, SectionInformation, SectionInformationLength, ResultLength
  13126. );
  13127. end;
  13128. // Dynamic version of NtQuerySection
  13129. function ZwQuerySection(
  13130. SectionHandle : HANDLE;
  13131. SectionInformationClass : SECTION_INFORMATION_CLASS;
  13132. SectionInformation : PVOID;
  13133. SectionInformationLength : ULONG;
  13134. ResultLength : PULONG
  13135. ): NTSTATUS; stdcall;
  13136. begin
  13137. GetProcedureAddress(_NtQuerySection, ntdll, 'NtQuerySection');
  13138. Result := TFNNtQuerySection(_NtQuerySection)(
  13139. SectionHandle, SectionInformationClass, SectionInformation, SectionInformationLength, ResultLength
  13140. );
  13141. end;
  13142. // Dynamic version of NtQuerySecurityObject
  13143. function NtQuerySecurityObject(
  13144. Handle : HANDLE;
  13145. RequestedInformation : SECURITY_INFORMATION;
  13146. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  13147. SecurityDescriptorLength : ULONG;
  13148. ReturnLength : PULONG
  13149. ): NTSTATUS; stdcall;
  13150. begin
  13151. GetProcedureAddress(_NtQuerySecurityObject, ntdll, 'NtQuerySecurityObject');
  13152. Result := TFNNtQuerySecurityObject(_NtQuerySecurityObject)(
  13153. Handle, RequestedInformation, SecurityDescriptor, SecurityDescriptorLength, ReturnLength
  13154. );
  13155. end;
  13156. // Dynamic version of NtQuerySecurityObject
  13157. function ZwQuerySecurityObject(
  13158. Handle : HANDLE;
  13159. RequestedInformation : SECURITY_INFORMATION;
  13160. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  13161. SecurityDescriptorLength : ULONG;
  13162. ReturnLength : PULONG
  13163. ): NTSTATUS; stdcall;
  13164. begin
  13165. GetProcedureAddress(_NtQuerySecurityObject, ntdll, 'NtQuerySecurityObject');
  13166. Result := TFNNtQuerySecurityObject(_NtQuerySecurityObject)(
  13167. Handle, RequestedInformation, SecurityDescriptor, SecurityDescriptorLength, ReturnLength
  13168. );
  13169. end;
  13170. // Dynamic version of NtQuerySemaphore
  13171. function NtQuerySemaphore(
  13172. SemaphoreHandle : HANDLE;
  13173. SemaphoreInformationClass : SEMAPHORE_INFORMATION_CLASS;
  13174. SemaphoreInformation : PVOID;
  13175. SemaphoreInformationLength : ULONG;
  13176. ResultLength : PULONG
  13177. ): NTSTATUS; stdcall;
  13178. begin
  13179. GetProcedureAddress(_NtQuerySemaphore, ntdll, 'NtQuerySemaphore');
  13180. Result := TFNNtQuerySemaphore(_NtQuerySemaphore)(
  13181. SemaphoreHandle, SemaphoreInformationClass, SemaphoreInformation, SemaphoreInformationLength, ResultLength
  13182. );
  13183. end;
  13184. // Dynamic version of NtQuerySemaphore
  13185. function ZwQuerySemaphore(
  13186. SemaphoreHandle : HANDLE;
  13187. SemaphoreInformationClass : SEMAPHORE_INFORMATION_CLASS;
  13188. SemaphoreInformation : PVOID;
  13189. SemaphoreInformationLength : ULONG;
  13190. ResultLength : PULONG
  13191. ): NTSTATUS; stdcall;
  13192. begin
  13193. GetProcedureAddress(_NtQuerySemaphore, ntdll, 'NtQuerySemaphore');
  13194. Result := TFNNtQuerySemaphore(_NtQuerySemaphore)(
  13195. SemaphoreHandle, SemaphoreInformationClass, SemaphoreInformation, SemaphoreInformationLength, ResultLength
  13196. );
  13197. end;
  13198. // Dynamic version of NtQuerySymbolicLinkObject
  13199. function NtQuerySymbolicLinkObject(
  13200. SymbolicLinkHandle : HANDLE;
  13201. TargetName : PUNICODE_STRING;
  13202. ReturnLength : PULONG
  13203. ): NTSTATUS; stdcall;
  13204. begin
  13205. GetProcedureAddress(_NtQuerySymbolicLinkObject, ntdll, 'NtQuerySymbolicLinkObject');
  13206. Result := TFNNtQuerySymbolicLinkObject(_NtQuerySymbolicLinkObject)(
  13207. SymbolicLinkHandle, TargetName, ReturnLength
  13208. );
  13209. end;
  13210. // Dynamic version of NtQuerySymbolicLinkObject
  13211. function ZwQuerySymbolicLinkObject(
  13212. SymbolicLinkHandle : HANDLE;
  13213. TargetName : PUNICODE_STRING;
  13214. ReturnLength : PULONG
  13215. ): NTSTATUS; stdcall;
  13216. begin
  13217. GetProcedureAddress(_NtQuerySymbolicLinkObject, ntdll, 'NtQuerySymbolicLinkObject');
  13218. Result := TFNNtQuerySymbolicLinkObject(_NtQuerySymbolicLinkObject)(
  13219. SymbolicLinkHandle, TargetName, ReturnLength
  13220. );
  13221. end;
  13222. // Dynamic version of NtQuerySystemEnvironmentValue
  13223. function NtQuerySystemEnvironmentValue(
  13224. Name : PUNICODE_STRING;
  13225. Value : PVOID;
  13226. ValueLength : ULONG;
  13227. ReturnLength : PULONG
  13228. ): NTSTATUS; stdcall;
  13229. begin
  13230. GetProcedureAddress(_NtQuerySystemEnvironmentValue, ntdll, 'NtQuerySystemEnvironmentValue');
  13231. Result := TFNNtQuerySystemEnvironmentValue(_NtQuerySystemEnvironmentValue)(
  13232. Name, Value, ValueLength, ReturnLength
  13233. );
  13234. end;
  13235. // Dynamic version of NtQuerySystemEnvironmentValue
  13236. function ZwQuerySystemEnvironmentValue(
  13237. Name : PUNICODE_STRING;
  13238. Value : PVOID;
  13239. ValueLength : ULONG;
  13240. ReturnLength : PULONG
  13241. ): NTSTATUS; stdcall;
  13242. begin
  13243. GetProcedureAddress(_NtQuerySystemEnvironmentValue, ntdll, 'NtQuerySystemEnvironmentValue');
  13244. Result := TFNNtQuerySystemEnvironmentValue(_NtQuerySystemEnvironmentValue)(
  13245. Name, Value, ValueLength, ReturnLength
  13246. );
  13247. end;
  13248. // Dynamic version of NtQuerySystemInformation
  13249. function NtQuerySystemInformation(
  13250. SystemInformationClass : SYSTEM_INFORMATION_CLASS;
  13251. SystemInformation : PVOID;
  13252. SystemInformationLength : ULONG;
  13253. ReturnLength : PULONG
  13254. ): NTSTATUS; stdcall;
  13255. begin
  13256. GetProcedureAddress(_NtQuerySystemInformation, ntdll, 'NtQuerySystemInformation');
  13257. Result := TFNNtQuerySystemInformation(_NtQuerySystemInformation)(
  13258. SystemInformationClass, SystemInformation, SystemInformationLength, ReturnLength
  13259. );
  13260. end;
  13261. // Dynamic version of NtQuerySystemInformation
  13262. function ZwQuerySystemInformation(
  13263. SystemInformationClass : SYSTEM_INFORMATION_CLASS;
  13264. SystemInformation : PVOID;
  13265. SystemInformationLength : ULONG;
  13266. ReturnLength : PULONG
  13267. ): NTSTATUS; stdcall;
  13268. begin
  13269. GetProcedureAddress(_NtQuerySystemInformation, ntdll, 'NtQuerySystemInformation');
  13270. Result := TFNNtQuerySystemInformation(_NtQuerySystemInformation)(
  13271. SystemInformationClass, SystemInformation, SystemInformationLength, ReturnLength
  13272. );
  13273. end;
  13274. // Dynamic version of NtQuerySystemTime
  13275. function NtQuerySystemTime(
  13276. CurrentTime : PLARGE_INTEGER
  13277. ): NTSTATUS; stdcall;
  13278. begin
  13279. GetProcedureAddress(_NtQuerySystemTime, ntdll, 'NtQuerySystemTime');
  13280. Result := TFNNtQuerySystemTime(_NtQuerySystemTime)(
  13281. CurrentTime
  13282. );
  13283. end;
  13284. // Dynamic version of NtQuerySystemTime
  13285. function ZwQuerySystemTime(
  13286. CurrentTime : PLARGE_INTEGER
  13287. ): NTSTATUS; stdcall;
  13288. begin
  13289. GetProcedureAddress(_NtQuerySystemTime, ntdll, 'NtQuerySystemTime');
  13290. Result := TFNNtQuerySystemTime(_NtQuerySystemTime)(
  13291. CurrentTime
  13292. );
  13293. end;
  13294. // Dynamic version of NtQueryTimer
  13295. function NtQueryTimer(
  13296. TimerHandle : HANDLE;
  13297. TimerInformationClass : TIMER_INFORMATION_CLASS;
  13298. TimerInformation : PVOID;
  13299. TimerInformationLength : ULONG;
  13300. ResultLength : PULONG
  13301. ): NTSTATUS; stdcall;
  13302. begin
  13303. GetProcedureAddress(_NtQueryTimer, ntdll, 'NtQueryTimer');
  13304. Result := TFNNtQueryTimer(_NtQueryTimer)(
  13305. TimerHandle, TimerInformationClass, TimerInformation, TimerInformationLength, ResultLength
  13306. );
  13307. end;
  13308. // Dynamic version of NtQueryTimer
  13309. function ZwQueryTimer(
  13310. TimerHandle : HANDLE;
  13311. TimerInformationClass : TIMER_INFORMATION_CLASS;
  13312. TimerInformation : PVOID;
  13313. TimerInformationLength : ULONG;
  13314. ResultLength : PULONG
  13315. ): NTSTATUS; stdcall;
  13316. begin
  13317. GetProcedureAddress(_NtQueryTimer, ntdll, 'NtQueryTimer');
  13318. Result := TFNNtQueryTimer(_NtQueryTimer)(
  13319. TimerHandle, TimerInformationClass, TimerInformation, TimerInformationLength, ResultLength
  13320. );
  13321. end;
  13322. // Dynamic version of NtQueryTimerResolution
  13323. function NtQueryTimerResolution(
  13324. CoarsestResolution : PULONG;
  13325. FinestResolution : PULONG;
  13326. ActualResolution : PULONG
  13327. ): NTSTATUS; stdcall;
  13328. begin
  13329. GetProcedureAddress(_NtQueryTimerResolution, ntdll, 'NtQueryTimerResolution');
  13330. Result := TFNNtQueryTimerResolution(_NtQueryTimerResolution)(
  13331. CoarsestResolution, FinestResolution, ActualResolution
  13332. );
  13333. end;
  13334. // Dynamic version of NtQueryTimerResolution
  13335. function ZwQueryTimerResolution(
  13336. CoarsestResolution : PULONG;
  13337. FinestResolution : PULONG;
  13338. ActualResolution : PULONG
  13339. ): NTSTATUS; stdcall;
  13340. begin
  13341. GetProcedureAddress(_NtQueryTimerResolution, ntdll, 'NtQueryTimerResolution');
  13342. Result := TFNNtQueryTimerResolution(_NtQueryTimerResolution)(
  13343. CoarsestResolution, FinestResolution, ActualResolution
  13344. );
  13345. end;
  13346. // Dynamic version of NtQueryValueKey
  13347. function NtQueryValueKey(
  13348. KeyHandle : HANDLE;
  13349. ValueName : PUNICODE_STRING;
  13350. KeyValueInformationClass : KEY_VALUE_INFORMATION_CLASS;
  13351. KeyValueInformation : PVOID;
  13352. KeyValueInformationLength : ULONG;
  13353. ResultLength : PULONG
  13354. ): NTSTATUS; stdcall;
  13355. begin
  13356. GetProcedureAddress(_NtQueryValueKey, ntdll, 'NtQueryValueKey');
  13357. Result := TFNNtQueryValueKey(_NtQueryValueKey)(
  13358. KeyHandle, ValueName, KeyValueInformationClass, KeyValueInformation, KeyValueInformationLength, ResultLength
  13359. );
  13360. end;
  13361. // Dynamic version of NtQueryValueKey
  13362. function ZwQueryValueKey(
  13363. KeyHandle : HANDLE;
  13364. ValueName : PUNICODE_STRING;
  13365. KeyValueInformationClass : KEY_VALUE_INFORMATION_CLASS;
  13366. KeyValueInformation : PVOID;
  13367. KeyValueInformationLength : ULONG;
  13368. ResultLength : PULONG
  13369. ): NTSTATUS; stdcall;
  13370. begin
  13371. GetProcedureAddress(_NtQueryValueKey, ntdll, 'NtQueryValueKey');
  13372. Result := TFNNtQueryValueKey(_NtQueryValueKey)(
  13373. KeyHandle, ValueName, KeyValueInformationClass, KeyValueInformation, KeyValueInformationLength, ResultLength
  13374. );
  13375. end;
  13376. // Dynamic version of NtQueryVirtualMemory
  13377. function NtQueryVirtualMemory(
  13378. ProcessHandle : HANDLE;
  13379. BaseAddress : PVOID;
  13380. MemoryInformationClass : MEMORY_INFORMATION_CLASS;
  13381. MemoryInformation : PVOID;
  13382. MemoryInformationLength : ULONG;
  13383. ReturnLength : PULONG
  13384. ): NTSTATUS; stdcall;
  13385. begin
  13386. GetProcedureAddress(_NtQueryVirtualMemory, ntdll, 'NtQueryVirtualMemory');
  13387. Result := TFNNtQueryVirtualMemory(_NtQueryVirtualMemory)(
  13388. ProcessHandle, BaseAddress, MemoryInformationClass, MemoryInformation, MemoryInformationLength, ReturnLength
  13389. );
  13390. end;
  13391. // Dynamic version of NtQueryVirtualMemory
  13392. function ZwQueryVirtualMemory(
  13393. ProcessHandle : HANDLE;
  13394. BaseAddress : PVOID;
  13395. MemoryInformationClass : MEMORY_INFORMATION_CLASS;
  13396. MemoryInformation : PVOID;
  13397. MemoryInformationLength : ULONG;
  13398. ReturnLength : PULONG
  13399. ): NTSTATUS; stdcall;
  13400. begin
  13401. GetProcedureAddress(_NtQueryVirtualMemory, ntdll, 'NtQueryVirtualMemory');
  13402. Result := TFNNtQueryVirtualMemory(_NtQueryVirtualMemory)(
  13403. ProcessHandle, BaseAddress, MemoryInformationClass, MemoryInformation, MemoryInformationLength, ReturnLength
  13404. );
  13405. end;
  13406. // Dynamic version of NtQueryVolumeInformationFile
  13407. function NtQueryVolumeInformationFile(
  13408. FileHandle : HANDLE;
  13409. IoStatusBlock : PIO_STATUS_BLOCK;
  13410. VolumeInformation : PVOID;
  13411. VolumeInformationLength : ULONG;
  13412. VolumeInformationClass : FS_INFORMATION_CLASS
  13413. ): NTSTATUS; stdcall;
  13414. begin
  13415. GetProcedureAddress(_NtQueryVolumeInformationFile, ntdll, 'NtQueryVolumeInformationFile');
  13416. Result := TFNNtQueryVolumeInformationFile(_NtQueryVolumeInformationFile)(
  13417. FileHandle, IoStatusBlock, VolumeInformation, VolumeInformationLength, VolumeInformationClass
  13418. );
  13419. end;
  13420. // Dynamic version of NtQueryVolumeInformationFile
  13421. function ZwQueryVolumeInformationFile(
  13422. FileHandle : HANDLE;
  13423. IoStatusBlock : PIO_STATUS_BLOCK;
  13424. VolumeInformation : PVOID;
  13425. VolumeInformationLength : ULONG;
  13426. VolumeInformationClass : FS_INFORMATION_CLASS
  13427. ): NTSTATUS; stdcall;
  13428. begin
  13429. GetProcedureAddress(_NtQueryVolumeInformationFile, ntdll, 'NtQueryVolumeInformationFile');
  13430. Result := TFNNtQueryVolumeInformationFile(_NtQueryVolumeInformationFile)(
  13431. FileHandle, IoStatusBlock, VolumeInformation, VolumeInformationLength, VolumeInformationClass
  13432. );
  13433. end;
  13434. // Dynamic version of NtQueueApcThread
  13435. function NtQueueApcThread(
  13436. ThreadHandle : HANDLE;
  13437. ApcRoutine : PKNORMAL_ROUTINE;
  13438. ApcContext : PVOID;
  13439. Argument1 : PVOID;
  13440. Argument2 : PVOID
  13441. ): NTSTATUS; stdcall;
  13442. begin
  13443. GetProcedureAddress(_NtQueueApcThread, ntdll, 'NtQueueApcThread');
  13444. Result := TFNNtQueueApcThread(_NtQueueApcThread)(
  13445. ThreadHandle, ApcRoutine, ApcContext, Argument1, Argument2
  13446. );
  13447. end;
  13448. // Dynamic version of NtQueueApcThread
  13449. function ZwQueueApcThread(
  13450. ThreadHandle : HANDLE;
  13451. ApcRoutine : PKNORMAL_ROUTINE;
  13452. ApcContext : PVOID;
  13453. Argument1 : PVOID;
  13454. Argument2 : PVOID
  13455. ): NTSTATUS; stdcall;
  13456. begin
  13457. GetProcedureAddress(_NtQueueApcThread, ntdll, 'NtQueueApcThread');
  13458. Result := TFNNtQueueApcThread(_NtQueueApcThread)(
  13459. ThreadHandle, ApcRoutine, ApcContext, Argument1, Argument2
  13460. );
  13461. end;
  13462. // Dynamic version of NtRaiseException
  13463. function NtRaiseException(
  13464. ExceptionRecord : PEXCEPTION_RECORD;
  13465. Context : PCONTEXT;
  13466. SearchFrames : BOOLEAN
  13467. ): NTSTATUS; stdcall;
  13468. begin
  13469. GetProcedureAddress(_NtRaiseException, ntdll, 'NtRaiseException');
  13470. Result := TFNNtRaiseException(_NtRaiseException)(
  13471. ExceptionRecord, Context, SearchFrames
  13472. );
  13473. end;
  13474. // Dynamic version of NtRaiseException
  13475. function ZwRaiseException(
  13476. ExceptionRecord : PEXCEPTION_RECORD;
  13477. Context : PCONTEXT;
  13478. SearchFrames : BOOLEAN
  13479. ): NTSTATUS; stdcall;
  13480. begin
  13481. GetProcedureAddress(_NtRaiseException, ntdll, 'NtRaiseException');
  13482. Result := TFNNtRaiseException(_NtRaiseException)(
  13483. ExceptionRecord, Context, SearchFrames
  13484. );
  13485. end;
  13486. // Dynamic version of NtRaiseHardError
  13487. function NtRaiseHardError(
  13488. Status : NTSTATUS;
  13489. NumberOfArguments : ULONG;
  13490. StringArgumentsMask : ULONG;
  13491. Arguments : PULONG;
  13492. MessageBoxType : ULONG;
  13493. MessageBoxResult : PULONG
  13494. ): NTSTATUS; stdcall;
  13495. begin
  13496. GetProcedureAddress(_NtRaiseHardError, ntdll, 'NtRaiseHardError');
  13497. Result := TFNNtRaiseHardError(_NtRaiseHardError)(
  13498. Status, NumberOfArguments, StringArgumentsMask, Arguments, MessageBoxType, MessageBoxResult
  13499. );
  13500. end;
  13501. // Dynamic version of NtRaiseHardError
  13502. function ZwRaiseHardError(
  13503. Status : NTSTATUS;
  13504. NumberOfArguments : ULONG;
  13505. StringArgumentsMask : ULONG;
  13506. Arguments : PULONG;
  13507. MessageBoxType : ULONG;
  13508. MessageBoxResult : PULONG
  13509. ): NTSTATUS; stdcall;
  13510. begin
  13511. GetProcedureAddress(_NtRaiseHardError, ntdll, 'NtRaiseHardError');
  13512. Result := TFNNtRaiseHardError(_NtRaiseHardError)(
  13513. Status, NumberOfArguments, StringArgumentsMask, Arguments, MessageBoxType, MessageBoxResult
  13514. );
  13515. end;
  13516. // Dynamic version of NtReadFile
  13517. function NtReadFile(
  13518. FileHandle : HANDLE;
  13519. Event : HANDLE;
  13520. ApcRoutine : PIO_APC_ROUTINE;
  13521. ApcContext : PVOID;
  13522. IoStatusBlock : PIO_STATUS_BLOCK;
  13523. Buffer : PVOID;
  13524. Length : ULONG;
  13525. ByteOffset : PLARGE_INTEGER;
  13526. Key : PULONG
  13527. ): NTSTATUS; stdcall;
  13528. begin
  13529. GetProcedureAddress(_NtReadFile, ntdll, 'NtReadFile');
  13530. Result := TFNNtReadFile(_NtReadFile)(
  13531. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, Buffer, Length, ByteOffset, Key
  13532. );
  13533. end;
  13534. // Dynamic version of NtReadFile
  13535. function ZwReadFile(
  13536. FileHandle : HANDLE;
  13537. Event : HANDLE;
  13538. ApcRoutine : PIO_APC_ROUTINE;
  13539. ApcContext : PVOID;
  13540. IoStatusBlock : PIO_STATUS_BLOCK;
  13541. Buffer : PVOID;
  13542. Length : ULONG;
  13543. ByteOffset : PLARGE_INTEGER;
  13544. Key : PULONG
  13545. ): NTSTATUS; stdcall;
  13546. begin
  13547. GetProcedureAddress(_NtReadFile, ntdll, 'NtReadFile');
  13548. Result := TFNNtReadFile(_NtReadFile)(
  13549. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, Buffer, Length, ByteOffset, Key
  13550. );
  13551. end;
  13552. // Dynamic version of NtReadFileScatter
  13553. function NtReadFileScatter(
  13554. FileHandle : HANDLE;
  13555. Event : HANDLE;
  13556. ApcRoutine : PIO_APC_ROUTINE;
  13557. ApcContext : PVOID;
  13558. IoStatusBlock : PIO_STATUS_BLOCK;
  13559. Buffer : PFILE_SEGMENT_ELEMENT;
  13560. Length : ULONG;
  13561. ByteOffset : PLARGE_INTEGER;
  13562. Key : PULONG
  13563. ): NTSTATUS; stdcall;
  13564. begin
  13565. GetProcedureAddress(_NtReadFileScatter, ntdll, 'NtReadFileScatter');
  13566. Result := TFNNtReadFileScatter(_NtReadFileScatter)(
  13567. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, Buffer, Length, ByteOffset, Key
  13568. );
  13569. end;
  13570. // Dynamic version of NtReadFileScatter
  13571. function ZwReadFileScatter(
  13572. FileHandle : HANDLE;
  13573. Event : HANDLE;
  13574. ApcRoutine : PIO_APC_ROUTINE;
  13575. ApcContext : PVOID;
  13576. IoStatusBlock : PIO_STATUS_BLOCK;
  13577. Buffer : PFILE_SEGMENT_ELEMENT;
  13578. Length : ULONG;
  13579. ByteOffset : PLARGE_INTEGER;
  13580. Key : PULONG
  13581. ): NTSTATUS; stdcall;
  13582. begin
  13583. GetProcedureAddress(_NtReadFileScatter, ntdll, 'NtReadFileScatter');
  13584. Result := TFNNtReadFileScatter(_NtReadFileScatter)(
  13585. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, Buffer, Length, ByteOffset, Key
  13586. );
  13587. end;
  13588. // Dynamic version of NtReadRequestData
  13589. function NtReadRequestData(
  13590. PortHandle : HANDLE;
  13591. Message : PPORT_MESSAGE;
  13592. Index : ULONG;
  13593. Buffer : PVOID;
  13594. BufferLength : ULONG;
  13595. ReturnLength : PULONG
  13596. ): NTSTATUS; stdcall;
  13597. begin
  13598. GetProcedureAddress(_NtReadRequestData, ntdll, 'NtReadRequestData');
  13599. Result := TFNNtReadRequestData(_NtReadRequestData)(
  13600. PortHandle, Message, Index, Buffer, BufferLength, ReturnLength
  13601. );
  13602. end;
  13603. // Dynamic version of NtReadRequestData
  13604. function ZwReadRequestData(
  13605. PortHandle : HANDLE;
  13606. Message : PPORT_MESSAGE;
  13607. Index : ULONG;
  13608. Buffer : PVOID;
  13609. BufferLength : ULONG;
  13610. ReturnLength : PULONG
  13611. ): NTSTATUS; stdcall;
  13612. begin
  13613. GetProcedureAddress(_NtReadRequestData, ntdll, 'NtReadRequestData');
  13614. Result := TFNNtReadRequestData(_NtReadRequestData)(
  13615. PortHandle, Message, Index, Buffer, BufferLength, ReturnLength
  13616. );
  13617. end;
  13618. // Dynamic version of NtReadVirtualMemory
  13619. function NtReadVirtualMemory(
  13620. ProcessHandle : HANDLE;
  13621. BaseAddress : PVOID;
  13622. Buffer : PVOID;
  13623. BufferLength : ULONG;
  13624. ReturnLength : PULONG
  13625. ): NTSTATUS; stdcall;
  13626. begin
  13627. GetProcedureAddress(_NtReadVirtualMemory, ntdll, 'NtReadVirtualMemory');
  13628. Result := TFNNtReadVirtualMemory(_NtReadVirtualMemory)(
  13629. ProcessHandle, BaseAddress, Buffer, BufferLength, ReturnLength
  13630. );
  13631. end;
  13632. // Dynamic version of NtReadVirtualMemory
  13633. function ZwReadVirtualMemory(
  13634. ProcessHandle : HANDLE;
  13635. BaseAddress : PVOID;
  13636. Buffer : PVOID;
  13637. BufferLength : ULONG;
  13638. ReturnLength : PULONG
  13639. ): NTSTATUS; stdcall;
  13640. begin
  13641. GetProcedureAddress(_NtReadVirtualMemory, ntdll, 'NtReadVirtualMemory');
  13642. Result := TFNNtReadVirtualMemory(_NtReadVirtualMemory)(
  13643. ProcessHandle, BaseAddress, Buffer, BufferLength, ReturnLength
  13644. );
  13645. end;
  13646. // Dynamic version of NtRegisterThreadTerminatePort
  13647. function NtRegisterThreadTerminatePort(
  13648. PortHandle : HANDLE
  13649. ): NTSTATUS; stdcall;
  13650. begin
  13651. GetProcedureAddress(_NtRegisterThreadTerminatePort, ntdll, 'NtRegisterThreadTerminatePort');
  13652. Result := TFNNtRegisterThreadTerminatePort(_NtRegisterThreadTerminatePort)(
  13653. PortHandle
  13654. );
  13655. end;
  13656. // Dynamic version of NtRegisterThreadTerminatePort
  13657. function ZwRegisterThreadTerminatePort(
  13658. PortHandle : HANDLE
  13659. ): NTSTATUS; stdcall;
  13660. begin
  13661. GetProcedureAddress(_NtRegisterThreadTerminatePort, ntdll, 'NtRegisterThreadTerminatePort');
  13662. Result := TFNNtRegisterThreadTerminatePort(_NtRegisterThreadTerminatePort)(
  13663. PortHandle
  13664. );
  13665. end;
  13666. // Dynamic version of NtReleaseMutant
  13667. function NtReleaseMutant(
  13668. MutantHandle : HANDLE;
  13669. PreviousState : PULONG
  13670. ): NTSTATUS; stdcall;
  13671. begin
  13672. GetProcedureAddress(_NtReleaseMutant, ntdll, 'NtReleaseMutant');
  13673. Result := TFNNtReleaseMutant(_NtReleaseMutant)(
  13674. MutantHandle, PreviousState
  13675. );
  13676. end;
  13677. // Dynamic version of NtReleaseMutant
  13678. function ZwReleaseMutant(
  13679. MutantHandle : HANDLE;
  13680. PreviousState : PULONG
  13681. ): NTSTATUS; stdcall;
  13682. begin
  13683. GetProcedureAddress(_NtReleaseMutant, ntdll, 'NtReleaseMutant');
  13684. Result := TFNNtReleaseMutant(_NtReleaseMutant)(
  13685. MutantHandle, PreviousState
  13686. );
  13687. end;
  13688. // Dynamic version of NtReleaseSemaphore
  13689. function NtReleaseSemaphore(
  13690. SemaphoreHandle : HANDLE;
  13691. ReleaseCount : LONG;
  13692. PreviousCount : PLONG
  13693. ): NTSTATUS; stdcall;
  13694. begin
  13695. GetProcedureAddress(_NtReleaseSemaphore, ntdll, 'NtReleaseSemaphore');
  13696. Result := TFNNtReleaseSemaphore(_NtReleaseSemaphore)(
  13697. SemaphoreHandle, ReleaseCount, PreviousCount
  13698. );
  13699. end;
  13700. // Dynamic version of NtReleaseSemaphore
  13701. function ZwReleaseSemaphore(
  13702. SemaphoreHandle : HANDLE;
  13703. ReleaseCount : LONG;
  13704. PreviousCount : PLONG
  13705. ): NTSTATUS; stdcall;
  13706. begin
  13707. GetProcedureAddress(_NtReleaseSemaphore, ntdll, 'NtReleaseSemaphore');
  13708. Result := TFNNtReleaseSemaphore(_NtReleaseSemaphore)(
  13709. SemaphoreHandle, ReleaseCount, PreviousCount
  13710. );
  13711. end;
  13712. // Dynamic version of NtRemoveIoCompletion
  13713. function NtRemoveIoCompletion(
  13714. IoCompletionHandle : HANDLE;
  13715. CompletionKey : PULONG;
  13716. CompletionValue : PULONG;
  13717. IoStatusBlock : PIO_STATUS_BLOCK;
  13718. Timeout : PLARGE_INTEGER
  13719. ): NTSTATUS; stdcall;
  13720. begin
  13721. GetProcedureAddress(_NtRemoveIoCompletion, ntdll, 'NtRemoveIoCompletion');
  13722. Result := TFNNtRemoveIoCompletion(_NtRemoveIoCompletion)(
  13723. IoCompletionHandle, CompletionKey, CompletionValue, IoStatusBlock, Timeout
  13724. );
  13725. end;
  13726. // Dynamic version of NtRemoveIoCompletion
  13727. function ZwRemoveIoCompletion(
  13728. IoCompletionHandle : HANDLE;
  13729. CompletionKey : PULONG;
  13730. CompletionValue : PULONG;
  13731. IoStatusBlock : PIO_STATUS_BLOCK;
  13732. Timeout : PLARGE_INTEGER
  13733. ): NTSTATUS; stdcall;
  13734. begin
  13735. GetProcedureAddress(_NtRemoveIoCompletion, ntdll, 'NtRemoveIoCompletion');
  13736. Result := TFNNtRemoveIoCompletion(_NtRemoveIoCompletion)(
  13737. IoCompletionHandle, CompletionKey, CompletionValue, IoStatusBlock, Timeout
  13738. );
  13739. end;
  13740. // Dynamic version of NtRemoveProcessDebug
  13741. function NtRemoveProcessDebug(
  13742. hProcess : HANDLE;
  13743. hDebugObject : HANDLE
  13744. ): NTSTATUS; stdcall;
  13745. begin
  13746. GetProcedureAddress(_NtRemoveProcessDebug, ntdll, 'NtRemoveProcessDebug');
  13747. Result := TFNNtRemoveProcessDebug(_NtRemoveProcessDebug)(
  13748. hProcess, hDebugObject
  13749. );
  13750. end;
  13751. // Dynamic version of NtRemoveProcessDebug
  13752. function ZwRemoveProcessDebug(
  13753. hProcess : HANDLE;
  13754. hDebugObject : HANDLE
  13755. ): NTSTATUS; stdcall;
  13756. begin
  13757. GetProcedureAddress(_NtRemoveProcessDebug, ntdll, 'NtRemoveProcessDebug');
  13758. Result := TFNNtRemoveProcessDebug(_NtRemoveProcessDebug)(
  13759. hProcess, hDebugObject
  13760. );
  13761. end;
  13762. // Dynamic version of NtReplaceKey
  13763. function NtReplaceKey(
  13764. NewFileObjectAttributes : POBJECT_ATTRIBUTES;
  13765. KeyHandle : HANDLE;
  13766. OldFileObjectAttributes : POBJECT_ATTRIBUTES
  13767. ): NTSTATUS; stdcall;
  13768. begin
  13769. GetProcedureAddress(_NtReplaceKey, ntdll, 'NtReplaceKey');
  13770. Result := TFNNtReplaceKey(_NtReplaceKey)(
  13771. NewFileObjectAttributes, KeyHandle, OldFileObjectAttributes
  13772. );
  13773. end;
  13774. // Dynamic version of NtReplaceKey
  13775. function ZwReplaceKey(
  13776. NewFileObjectAttributes : POBJECT_ATTRIBUTES;
  13777. KeyHandle : HANDLE;
  13778. OldFileObjectAttributes : POBJECT_ATTRIBUTES
  13779. ): NTSTATUS; stdcall;
  13780. begin
  13781. GetProcedureAddress(_NtReplaceKey, ntdll, 'NtReplaceKey');
  13782. Result := TFNNtReplaceKey(_NtReplaceKey)(
  13783. NewFileObjectAttributes, KeyHandle, OldFileObjectAttributes
  13784. );
  13785. end;
  13786. // Dynamic version of NtReplyPort
  13787. function NtReplyPort(
  13788. PortHandle : HANDLE;
  13789. ReplyMessage : PPORT_MESSAGE
  13790. ): NTSTATUS; stdcall;
  13791. begin
  13792. GetProcedureAddress(_NtReplyPort, ntdll, 'NtReplyPort');
  13793. Result := TFNNtReplyPort(_NtReplyPort)(
  13794. PortHandle, ReplyMessage
  13795. );
  13796. end;
  13797. // Dynamic version of NtReplyPort
  13798. function ZwReplyPort(
  13799. PortHandle : HANDLE;
  13800. ReplyMessage : PPORT_MESSAGE
  13801. ): NTSTATUS; stdcall;
  13802. begin
  13803. GetProcedureAddress(_NtReplyPort, ntdll, 'NtReplyPort');
  13804. Result := TFNNtReplyPort(_NtReplyPort)(
  13805. PortHandle, ReplyMessage
  13806. );
  13807. end;
  13808. // Dynamic version of NtReplyWaitReceivePort
  13809. function NtReplyWaitReceivePort(
  13810. PortHandle : HANDLE;
  13811. PortIdentifier : PULONG;
  13812. ReplyMessage : PPORT_MESSAGE;
  13813. Message : PPORT_MESSAGE
  13814. ): NTSTATUS; stdcall;
  13815. begin
  13816. GetProcedureAddress(_NtReplyWaitReceivePort, ntdll, 'NtReplyWaitReceivePort');
  13817. Result := TFNNtReplyWaitReceivePort(_NtReplyWaitReceivePort)(
  13818. PortHandle, PortIdentifier, ReplyMessage, Message
  13819. );
  13820. end;
  13821. // Dynamic version of NtReplyWaitReceivePort
  13822. function ZwReplyWaitReceivePort(
  13823. PortHandle : HANDLE;
  13824. PortIdentifier : PULONG;
  13825. ReplyMessage : PPORT_MESSAGE;
  13826. Message : PPORT_MESSAGE
  13827. ): NTSTATUS; stdcall;
  13828. begin
  13829. GetProcedureAddress(_NtReplyWaitReceivePort, ntdll, 'NtReplyWaitReceivePort');
  13830. Result := TFNNtReplyWaitReceivePort(_NtReplyWaitReceivePort)(
  13831. PortHandle, PortIdentifier, ReplyMessage, Message
  13832. );
  13833. end;
  13834. // Dynamic version of NtReplyWaitReceivePortEx
  13835. function NtReplyWaitReceivePortEx(
  13836. PortHandle : HANDLE;
  13837. PortIdentifier : PULONG;
  13838. ReplyMessage : PPORT_MESSAGE;
  13839. Message : PPORT_MESSAGE;
  13840. Timeout : PLARGE_INTEGER
  13841. ): NTSTATUS; stdcall;
  13842. begin
  13843. GetProcedureAddress(_NtReplyWaitReceivePortEx, ntdll, 'NtReplyWaitReceivePortEx');
  13844. Result := TFNNtReplyWaitReceivePortEx(_NtReplyWaitReceivePortEx)(
  13845. PortHandle, PortIdentifier, ReplyMessage, Message, Timeout
  13846. );
  13847. end;
  13848. // Dynamic version of NtReplyWaitReceivePortEx
  13849. function ZwReplyWaitReceivePortEx(
  13850. PortHandle : HANDLE;
  13851. PortIdentifier : PULONG;
  13852. ReplyMessage : PPORT_MESSAGE;
  13853. Message : PPORT_MESSAGE;
  13854. Timeout : PLARGE_INTEGER
  13855. ): NTSTATUS; stdcall;
  13856. begin
  13857. GetProcedureAddress(_NtReplyWaitReceivePortEx, ntdll, 'NtReplyWaitReceivePortEx');
  13858. Result := TFNNtReplyWaitReceivePortEx(_NtReplyWaitReceivePortEx)(
  13859. PortHandle, PortIdentifier, ReplyMessage, Message, Timeout
  13860. );
  13861. end;
  13862. // Dynamic version of NtReplyWaitReplyPort
  13863. function NtReplyWaitReplyPort(
  13864. PortHandle : HANDLE;
  13865. ReplyMessage : PPORT_MESSAGE
  13866. ): NTSTATUS; stdcall;
  13867. begin
  13868. GetProcedureAddress(_NtReplyWaitReplyPort, ntdll, 'NtReplyWaitReplyPort');
  13869. Result := TFNNtReplyWaitReplyPort(_NtReplyWaitReplyPort)(
  13870. PortHandle, ReplyMessage
  13871. );
  13872. end;
  13873. // Dynamic version of NtReplyWaitReplyPort
  13874. function ZwReplyWaitReplyPort(
  13875. PortHandle : HANDLE;
  13876. ReplyMessage : PPORT_MESSAGE
  13877. ): NTSTATUS; stdcall;
  13878. begin
  13879. GetProcedureAddress(_NtReplyWaitReplyPort, ntdll, 'NtReplyWaitReplyPort');
  13880. Result := TFNNtReplyWaitReplyPort(_NtReplyWaitReplyPort)(
  13881. PortHandle, ReplyMessage
  13882. );
  13883. end;
  13884. // Dynamic version of NtReplyWaitSendChannel
  13885. function NtReplyWaitSendChannel(
  13886. x : PVOID;
  13887. y : PVOID;
  13888. z : PVOID
  13889. ): NTSTATUS; stdcall;
  13890. begin
  13891. GetProcedureAddress(_NtReplyWaitSendChannel, ntdll, 'NtReplyWaitSendChannel');
  13892. Result := TFNNtReplyWaitSendChannel(_NtReplyWaitSendChannel)(
  13893. x, y, z
  13894. );
  13895. end;
  13896. // Dynamic version of NtReplyWaitSendChannel
  13897. function ZwReplyWaitSendChannel(
  13898. x : PVOID;
  13899. y : PVOID;
  13900. z : PVOID
  13901. ): NTSTATUS; stdcall;
  13902. begin
  13903. GetProcedureAddress(_NtReplyWaitSendChannel, ntdll, 'NtReplyWaitSendChannel');
  13904. Result := TFNNtReplyWaitSendChannel(_NtReplyWaitSendChannel)(
  13905. x, y, z
  13906. );
  13907. end;
  13908. // Dynamic version of NtRequestDeviceWakeup
  13909. function NtRequestDeviceWakeup(
  13910. DeviceHandle : HANDLE
  13911. ): NTSTATUS; stdcall;
  13912. begin
  13913. GetProcedureAddress(_NtRequestDeviceWakeup, ntdll, 'NtRequestDeviceWakeup');
  13914. Result := TFNNtRequestDeviceWakeup(_NtRequestDeviceWakeup)(
  13915. DeviceHandle
  13916. );
  13917. end;
  13918. // Dynamic version of NtRequestDeviceWakeup
  13919. function ZwRequestDeviceWakeup(
  13920. DeviceHandle : HANDLE
  13921. ): NTSTATUS; stdcall;
  13922. begin
  13923. GetProcedureAddress(_NtRequestDeviceWakeup, ntdll, 'NtRequestDeviceWakeup');
  13924. Result := TFNNtRequestDeviceWakeup(_NtRequestDeviceWakeup)(
  13925. DeviceHandle
  13926. );
  13927. end;
  13928. // Dynamic version of NtRequestPort
  13929. function NtRequestPort(
  13930. PortHandle : HANDLE;
  13931. RequestMessage : PPORT_MESSAGE
  13932. ): NTSTATUS; stdcall;
  13933. begin
  13934. GetProcedureAddress(_NtRequestPort, ntdll, 'NtRequestPort');
  13935. Result := TFNNtRequestPort(_NtRequestPort)(
  13936. PortHandle, RequestMessage
  13937. );
  13938. end;
  13939. // Dynamic version of NtRequestPort
  13940. function ZwRequestPort(
  13941. PortHandle : HANDLE;
  13942. RequestMessage : PPORT_MESSAGE
  13943. ): NTSTATUS; stdcall;
  13944. begin
  13945. GetProcedureAddress(_NtRequestPort, ntdll, 'NtRequestPort');
  13946. Result := TFNNtRequestPort(_NtRequestPort)(
  13947. PortHandle, RequestMessage
  13948. );
  13949. end;
  13950. // Dynamic version of NtRequestWaitReplyPort
  13951. function NtRequestWaitReplyPort(
  13952. PortHandle : HANDLE;
  13953. RequestMessage : PPORT_MESSAGE;
  13954. ReplyMessage : PPORT_MESSAGE
  13955. ): NTSTATUS; stdcall;
  13956. begin
  13957. GetProcedureAddress(_NtRequestWaitReplyPort, ntdll, 'NtRequestWaitReplyPort');
  13958. Result := TFNNtRequestWaitReplyPort(_NtRequestWaitReplyPort)(
  13959. PortHandle, RequestMessage, ReplyMessage
  13960. );
  13961. end;
  13962. // Dynamic version of NtRequestWaitReplyPort
  13963. function ZwRequestWaitReplyPort(
  13964. PortHandle : HANDLE;
  13965. RequestMessage : PPORT_MESSAGE;
  13966. ReplyMessage : PPORT_MESSAGE
  13967. ): NTSTATUS; stdcall;
  13968. begin
  13969. GetProcedureAddress(_NtRequestWaitReplyPort, ntdll, 'NtRequestWaitReplyPort');
  13970. Result := TFNNtRequestWaitReplyPort(_NtRequestWaitReplyPort)(
  13971. PortHandle, RequestMessage, ReplyMessage
  13972. );
  13973. end;
  13974. // Dynamic version of NtRequestWakeupLatency
  13975. function NtRequestWakeupLatency(
  13976. Latency : LATENCY_TIME
  13977. ): NTSTATUS; stdcall;
  13978. begin
  13979. GetProcedureAddress(_NtRequestWakeupLatency, ntdll, 'NtRequestWakeupLatency');
  13980. Result := TFNNtRequestWakeupLatency(_NtRequestWakeupLatency)(
  13981. Latency
  13982. );
  13983. end;
  13984. // Dynamic version of NtRequestWakeupLatency
  13985. function ZwRequestWakeupLatency(
  13986. Latency : LATENCY_TIME
  13987. ): NTSTATUS; stdcall;
  13988. begin
  13989. GetProcedureAddress(_NtRequestWakeupLatency, ntdll, 'NtRequestWakeupLatency');
  13990. Result := TFNNtRequestWakeupLatency(_NtRequestWakeupLatency)(
  13991. Latency
  13992. );
  13993. end;
  13994. // Dynamic version of NtResetEvent
  13995. function NtResetEvent(
  13996. EventHandle : HANDLE;
  13997. PreviousState : PULONG
  13998. ): NTSTATUS; stdcall;
  13999. begin
  14000. GetProcedureAddress(_NtResetEvent, ntdll, 'NtResetEvent');
  14001. Result := TFNNtResetEvent(_NtResetEvent)(
  14002. EventHandle, PreviousState
  14003. );
  14004. end;
  14005. // Dynamic version of NtResetEvent
  14006. function ZwResetEvent(
  14007. EventHandle : HANDLE;
  14008. PreviousState : PULONG
  14009. ): NTSTATUS; stdcall;
  14010. begin
  14011. GetProcedureAddress(_NtResetEvent, ntdll, 'NtResetEvent');
  14012. Result := TFNNtResetEvent(_NtResetEvent)(
  14013. EventHandle, PreviousState
  14014. );
  14015. end;
  14016. // Dynamic version of NtResetWriteWatch
  14017. function NtResetWriteWatch(
  14018. ProcessHandle : HANDLE;
  14019. BaseAddress : PVOID;
  14020. RegionSize : ULONG
  14021. ): NTSTATUS; stdcall;
  14022. begin
  14023. GetProcedureAddress(_NtResetWriteWatch, ntdll, 'NtResetWriteWatch');
  14024. Result := TFNNtResetWriteWatch(_NtResetWriteWatch)(
  14025. ProcessHandle, BaseAddress, RegionSize
  14026. );
  14027. end;
  14028. // Dynamic version of NtResetWriteWatch
  14029. function ZwResetWriteWatch(
  14030. ProcessHandle : HANDLE;
  14031. BaseAddress : PVOID;
  14032. RegionSize : ULONG
  14033. ): NTSTATUS; stdcall;
  14034. begin
  14035. GetProcedureAddress(_NtResetWriteWatch, ntdll, 'NtResetWriteWatch');
  14036. Result := TFNNtResetWriteWatch(_NtResetWriteWatch)(
  14037. ProcessHandle, BaseAddress, RegionSize
  14038. );
  14039. end;
  14040. // Dynamic version of NtRestoreKey
  14041. function NtRestoreKey(
  14042. KeyHandle : HANDLE;
  14043. FileHandle : HANDLE;
  14044. Flags : ULONG
  14045. ): NTSTATUS; stdcall;
  14046. begin
  14047. GetProcedureAddress(_NtRestoreKey, ntdll, 'NtRestoreKey');
  14048. Result := TFNNtRestoreKey(_NtRestoreKey)(
  14049. KeyHandle, FileHandle, Flags
  14050. );
  14051. end;
  14052. // Dynamic version of NtRestoreKey
  14053. function ZwRestoreKey(
  14054. KeyHandle : HANDLE;
  14055. FileHandle : HANDLE;
  14056. Flags : ULONG
  14057. ): NTSTATUS; stdcall;
  14058. begin
  14059. GetProcedureAddress(_NtRestoreKey, ntdll, 'NtRestoreKey');
  14060. Result := TFNNtRestoreKey(_NtRestoreKey)(
  14061. KeyHandle, FileHandle, Flags
  14062. );
  14063. end;
  14064. // Dynamic version of NtResumeProcess
  14065. function NtResumeProcess(
  14066. hProcess : HANDLE
  14067. ): NTSTATUS; stdcall;
  14068. begin
  14069. GetProcedureAddress(_NtResumeProcess, ntdll, 'NtResumeProcess');
  14070. Result := TFNNtResumeProcess(_NtResumeProcess)(
  14071. hProcess
  14072. );
  14073. end;
  14074. // Dynamic version of NtResumeProcess
  14075. function ZwResumeProcess(
  14076. hProcess : HANDLE
  14077. ): NTSTATUS; stdcall;
  14078. begin
  14079. GetProcedureAddress(_NtResumeProcess, ntdll, 'NtResumeProcess');
  14080. Result := TFNNtResumeProcess(_NtResumeProcess)(
  14081. hProcess
  14082. );
  14083. end;
  14084. // Dynamic version of NtResumeThread
  14085. function NtResumeThread(
  14086. hThread : HANDLE;
  14087. dwResumeCount : PULONG
  14088. ): NTSTATUS; stdcall;
  14089. begin
  14090. GetProcedureAddress(_NtResumeThread, ntdll, 'NtResumeThread');
  14091. Result := TFNNtResumeThread(_NtResumeThread)(
  14092. hThread, dwResumeCount
  14093. );
  14094. end;
  14095. // Dynamic version of NtResumeThread
  14096. function ZwResumeThread(
  14097. hThread : HANDLE;
  14098. dwResumeCount : PULONG
  14099. ): NTSTATUS; stdcall;
  14100. begin
  14101. GetProcedureAddress(_NtResumeThread, ntdll, 'NtResumeThread');
  14102. Result := TFNNtResumeThread(_NtResumeThread)(
  14103. hThread, dwResumeCount
  14104. );
  14105. end;
  14106. // Dynamic version of NtSaveKey
  14107. function NtSaveKey(
  14108. KeyHandle : HANDLE;
  14109. FileHandle : HANDLE
  14110. ): NTSTATUS; stdcall;
  14111. begin
  14112. GetProcedureAddress(_NtSaveKey, ntdll, 'NtSaveKey');
  14113. Result := TFNNtSaveKey(_NtSaveKey)(
  14114. KeyHandle, FileHandle
  14115. );
  14116. end;
  14117. // Dynamic version of NtSaveKey
  14118. function ZwSaveKey(
  14119. KeyHandle : HANDLE;
  14120. FileHandle : HANDLE
  14121. ): NTSTATUS; stdcall;
  14122. begin
  14123. GetProcedureAddress(_NtSaveKey, ntdll, 'NtSaveKey');
  14124. Result := TFNNtSaveKey(_NtSaveKey)(
  14125. KeyHandle, FileHandle
  14126. );
  14127. end;
  14128. // Dynamic version of NtSaveKeyEx
  14129. function NtSaveKeyEx(
  14130. KeyHandle : HANDLE;
  14131. FileHandle : HANDLE;
  14132. Flags : DWORD
  14133. ): NTSTATUS; stdcall;
  14134. begin
  14135. GetProcedureAddress(_NtSaveKeyEx, ntdll, 'NtSaveKeyEx');
  14136. Result := TFNNtSaveKeyEx(_NtSaveKeyEx)(
  14137. KeyHandle, FileHandle, Flags
  14138. );
  14139. end;
  14140. // Dynamic version of NtSaveKeyEx
  14141. function ZwSaveKeyEx(
  14142. KeyHandle : HANDLE;
  14143. FileHandle : HANDLE;
  14144. Flags : DWORD
  14145. ): NTSTATUS; stdcall;
  14146. begin
  14147. GetProcedureAddress(_NtSaveKeyEx, ntdll, 'NtSaveKeyEx');
  14148. Result := TFNNtSaveKeyEx(_NtSaveKeyEx)(
  14149. KeyHandle, FileHandle, Flags
  14150. );
  14151. end;
  14152. // Dynamic version of NtSaveMergedKeys
  14153. function NtSaveMergedKeys(
  14154. KeyHandle1 : HANDLE;
  14155. KeyHandle2 : HANDLE;
  14156. FileHandle : HANDLE
  14157. ): NTSTATUS; stdcall;
  14158. begin
  14159. GetProcedureAddress(_NtSaveMergedKeys, ntdll, 'NtSaveMergedKeys');
  14160. Result := TFNNtSaveMergedKeys(_NtSaveMergedKeys)(
  14161. KeyHandle1, KeyHandle2, FileHandle
  14162. );
  14163. end;
  14164. // Dynamic version of NtSaveMergedKeys
  14165. function ZwSaveMergedKeys(
  14166. KeyHandle1 : HANDLE;
  14167. KeyHandle2 : HANDLE;
  14168. FileHandle : HANDLE
  14169. ): NTSTATUS; stdcall;
  14170. begin
  14171. GetProcedureAddress(_NtSaveMergedKeys, ntdll, 'NtSaveMergedKeys');
  14172. Result := TFNNtSaveMergedKeys(_NtSaveMergedKeys)(
  14173. KeyHandle1, KeyHandle2, FileHandle
  14174. );
  14175. end;
  14176. // Dynamic version of NtSecureConnectPort
  14177. function NtSecureConnectPort(
  14178. PortHandle : PHANDLE;
  14179. PortName : PUNICODE_STRING;
  14180. SecurityQos : PSECURITY_QUALITY_OF_SERVICE;
  14181. WriteSection : PPORT_SECTION_WRITE;
  14182. ServerSid : PSID;
  14183. ReadSection : PPORT_SECTION_READ;
  14184. MaxMessageSize : PULONG;
  14185. ConnectData : PVOID;
  14186. ConnectDataLength : PULONG
  14187. ): NTSTATUS; stdcall;
  14188. begin
  14189. GetProcedureAddress(_NtSecureConnectPort, ntdll, 'NtSecureConnectPort');
  14190. Result := TFNNtSecureConnectPort(_NtSecureConnectPort)(
  14191. PortHandle, PortName, SecurityQos, WriteSection, ServerSid, ReadSection, MaxMessageSize, ConnectData, ConnectDataLength
  14192. );
  14193. end;
  14194. // Dynamic version of NtSecureConnectPort
  14195. function ZwSecureConnectPort(
  14196. PortHandle : PHANDLE;
  14197. PortName : PUNICODE_STRING;
  14198. SecurityQos : PSECURITY_QUALITY_OF_SERVICE;
  14199. WriteSection : PPORT_SECTION_WRITE;
  14200. ServerSid : PSID;
  14201. ReadSection : PPORT_SECTION_READ;
  14202. MaxMessageSize : PULONG;
  14203. ConnectData : PVOID;
  14204. ConnectDataLength : PULONG
  14205. ): NTSTATUS; stdcall;
  14206. begin
  14207. GetProcedureAddress(_NtSecureConnectPort, ntdll, 'NtSecureConnectPort');
  14208. Result := TFNNtSecureConnectPort(_NtSecureConnectPort)(
  14209. PortHandle, PortName, SecurityQos, WriteSection, ServerSid, ReadSection, MaxMessageSize, ConnectData, ConnectDataLength
  14210. );
  14211. end;
  14212. // Dynamic version of NtSendWaitReplyChannel
  14213. function NtSendWaitReplyChannel(
  14214. x : PVOID;
  14215. y : PVOID;
  14216. z : PVOID;
  14217. z2 : PVOID
  14218. ): NTSTATUS; stdcall;
  14219. begin
  14220. GetProcedureAddress(_NtSendWaitReplyChannel, ntdll, 'NtSendWaitReplyChannel');
  14221. Result := TFNNtSendWaitReplyChannel(_NtSendWaitReplyChannel)(
  14222. x, y, z, z2
  14223. );
  14224. end;
  14225. // Dynamic version of NtSendWaitReplyChannel
  14226. function ZwSendWaitReplyChannel(
  14227. x : PVOID;
  14228. y : PVOID;
  14229. z : PVOID;
  14230. z2 : PVOID
  14231. ): NTSTATUS; stdcall;
  14232. begin
  14233. GetProcedureAddress(_NtSendWaitReplyChannel, ntdll, 'NtSendWaitReplyChannel');
  14234. Result := TFNNtSendWaitReplyChannel(_NtSendWaitReplyChannel)(
  14235. x, y, z, z2
  14236. );
  14237. end;
  14238. // Dynamic version of NtSetContextChannel
  14239. function NtSetContextChannel(
  14240. x : PVOID
  14241. ): NTSTATUS; stdcall;
  14242. begin
  14243. GetProcedureAddress(_NtSetContextChannel, ntdll, 'NtSetContextChannel');
  14244. Result := TFNNtSetContextChannel(_NtSetContextChannel)(
  14245. x
  14246. );
  14247. end;
  14248. // Dynamic version of NtSetContextChannel
  14249. function ZwSetContextChannel(
  14250. x : PVOID
  14251. ): NTSTATUS; stdcall;
  14252. begin
  14253. GetProcedureAddress(_NtSetContextChannel, ntdll, 'NtSetContextChannel');
  14254. Result := TFNNtSetContextChannel(_NtSetContextChannel)(
  14255. x
  14256. );
  14257. end;
  14258. // Dynamic version of NtSetContextThread
  14259. function NtSetContextThread(
  14260. ThreadHandle : HANDLE;
  14261. Context : PCONTEXT
  14262. ): NTSTATUS; stdcall;
  14263. begin
  14264. GetProcedureAddress(_NtSetContextThread, ntdll, 'NtSetContextThread');
  14265. Result := TFNNtSetContextThread(_NtSetContextThread)(
  14266. ThreadHandle, Context
  14267. );
  14268. end;
  14269. // Dynamic version of NtSetContextThread
  14270. function ZwSetContextThread(
  14271. ThreadHandle : HANDLE;
  14272. Context : PCONTEXT
  14273. ): NTSTATUS; stdcall;
  14274. begin
  14275. GetProcedureAddress(_NtSetContextThread, ntdll, 'NtSetContextThread');
  14276. Result := TFNNtSetContextThread(_NtSetContextThread)(
  14277. ThreadHandle, Context
  14278. );
  14279. end;
  14280. // Dynamic version of NtSetDefaultHardErrorPort
  14281. function NtSetDefaultHardErrorPort(
  14282. PortHandle : HANDLE
  14283. ): NTSTATUS; stdcall;
  14284. begin
  14285. GetProcedureAddress(_NtSetDefaultHardErrorPort, ntdll, 'NtSetDefaultHardErrorPort');
  14286. Result := TFNNtSetDefaultHardErrorPort(_NtSetDefaultHardErrorPort)(
  14287. PortHandle
  14288. );
  14289. end;
  14290. // Dynamic version of NtSetDefaultHardErrorPort
  14291. function ZwSetDefaultHardErrorPort(
  14292. PortHandle : HANDLE
  14293. ): NTSTATUS; stdcall;
  14294. begin
  14295. GetProcedureAddress(_NtSetDefaultHardErrorPort, ntdll, 'NtSetDefaultHardErrorPort');
  14296. Result := TFNNtSetDefaultHardErrorPort(_NtSetDefaultHardErrorPort)(
  14297. PortHandle
  14298. );
  14299. end;
  14300. // Dynamic version of NtSetDefaultLocale
  14301. function NtSetDefaultLocale(
  14302. ThreadOrSystem : BOOLEAN;
  14303. Locale : LCID
  14304. ): NTSTATUS; stdcall;
  14305. begin
  14306. GetProcedureAddress(_NtSetDefaultLocale, ntdll, 'NtSetDefaultLocale');
  14307. Result := TFNNtSetDefaultLocale(_NtSetDefaultLocale)(
  14308. ThreadOrSystem, Locale
  14309. );
  14310. end;
  14311. // Dynamic version of NtSetDefaultLocale
  14312. function ZwSetDefaultLocale(
  14313. ThreadOrSystem : BOOLEAN;
  14314. Locale : LCID
  14315. ): NTSTATUS; stdcall;
  14316. begin
  14317. GetProcedureAddress(_NtSetDefaultLocale, ntdll, 'NtSetDefaultLocale');
  14318. Result := TFNNtSetDefaultLocale(_NtSetDefaultLocale)(
  14319. ThreadOrSystem, Locale
  14320. );
  14321. end;
  14322. // Dynamic version of NtSetDefaultUILanguage
  14323. function NtSetDefaultUILanguage(
  14324. LanguageId : LANGID
  14325. ): NTSTATUS; stdcall;
  14326. begin
  14327. GetProcedureAddress(_NtSetDefaultUILanguage, ntdll, 'NtSetDefaultUILanguage');
  14328. Result := TFNNtSetDefaultUILanguage(_NtSetDefaultUILanguage)(
  14329. LanguageId
  14330. );
  14331. end;
  14332. // Dynamic version of NtSetDefaultUILanguage
  14333. function ZwSetDefaultUILanguage(
  14334. LanguageId : LANGID
  14335. ): NTSTATUS; stdcall;
  14336. begin
  14337. GetProcedureAddress(_NtSetDefaultUILanguage, ntdll, 'NtSetDefaultUILanguage');
  14338. Result := TFNNtSetDefaultUILanguage(_NtSetDefaultUILanguage)(
  14339. LanguageId
  14340. );
  14341. end;
  14342. // Dynamic version of NtSetEaFile
  14343. function NtSetEaFile(
  14344. FileHandle : HANDLE;
  14345. IoStatusBlock : PIO_STATUS_BLOCK;
  14346. Buffer : PFILE_FULL_EA_INFORMATION;
  14347. BufferLength : ULONG
  14348. ): NTSTATUS; stdcall;
  14349. begin
  14350. GetProcedureAddress(_NtSetEaFile, ntdll, 'NtSetEaFile');
  14351. Result := TFNNtSetEaFile(_NtSetEaFile)(
  14352. FileHandle, IoStatusBlock, Buffer, BufferLength
  14353. );
  14354. end;
  14355. // Dynamic version of NtSetEaFile
  14356. function ZwSetEaFile(
  14357. FileHandle : HANDLE;
  14358. IoStatusBlock : PIO_STATUS_BLOCK;
  14359. Buffer : PFILE_FULL_EA_INFORMATION;
  14360. BufferLength : ULONG
  14361. ): NTSTATUS; stdcall;
  14362. begin
  14363. GetProcedureAddress(_NtSetEaFile, ntdll, 'NtSetEaFile');
  14364. Result := TFNNtSetEaFile(_NtSetEaFile)(
  14365. FileHandle, IoStatusBlock, Buffer, BufferLength
  14366. );
  14367. end;
  14368. // Dynamic version of NtSetEvent
  14369. function NtSetEvent(
  14370. EventHandle : HANDLE;
  14371. PreviousState : PULONG
  14372. ): NTSTATUS; stdcall;
  14373. begin
  14374. GetProcedureAddress(_NtSetEvent, ntdll, 'NtSetEvent');
  14375. Result := TFNNtSetEvent(_NtSetEvent)(
  14376. EventHandle, PreviousState
  14377. );
  14378. end;
  14379. // Dynamic version of NtSetEvent
  14380. function ZwSetEvent(
  14381. EventHandle : HANDLE;
  14382. PreviousState : PULONG
  14383. ): NTSTATUS; stdcall;
  14384. begin
  14385. GetProcedureAddress(_NtSetEvent, ntdll, 'NtSetEvent');
  14386. Result := TFNNtSetEvent(_NtSetEvent)(
  14387. EventHandle, PreviousState
  14388. );
  14389. end;
  14390. // Dynamic version of NtSetHighEventPair
  14391. function NtSetHighEventPair(
  14392. EventPairHandle : HANDLE
  14393. ): NTSTATUS; stdcall;
  14394. begin
  14395. GetProcedureAddress(_NtSetHighEventPair, ntdll, 'NtSetHighEventPair');
  14396. Result := TFNNtSetHighEventPair(_NtSetHighEventPair)(
  14397. EventPairHandle
  14398. );
  14399. end;
  14400. // Dynamic version of NtSetHighEventPair
  14401. function ZwSetHighEventPair(
  14402. EventPairHandle : HANDLE
  14403. ): NTSTATUS; stdcall;
  14404. begin
  14405. GetProcedureAddress(_NtSetHighEventPair, ntdll, 'NtSetHighEventPair');
  14406. Result := TFNNtSetHighEventPair(_NtSetHighEventPair)(
  14407. EventPairHandle
  14408. );
  14409. end;
  14410. // Dynamic version of NtSetHighWaitLowEventPair
  14411. function NtSetHighWaitLowEventPair(
  14412. EventPairHandle : HANDLE
  14413. ): NTSTATUS; stdcall;
  14414. begin
  14415. GetProcedureAddress(_NtSetHighWaitLowEventPair, ntdll, 'NtSetHighWaitLowEventPair');
  14416. Result := TFNNtSetHighWaitLowEventPair(_NtSetHighWaitLowEventPair)(
  14417. EventPairHandle
  14418. );
  14419. end;
  14420. // Dynamic version of NtSetHighWaitLowEventPair
  14421. function ZwSetHighWaitLowEventPair(
  14422. EventPairHandle : HANDLE
  14423. ): NTSTATUS; stdcall;
  14424. begin
  14425. GetProcedureAddress(_NtSetHighWaitLowEventPair, ntdll, 'NtSetHighWaitLowEventPair');
  14426. Result := TFNNtSetHighWaitLowEventPair(_NtSetHighWaitLowEventPair)(
  14427. EventPairHandle
  14428. );
  14429. end;
  14430. // Dynamic version of NtSetHighWaitLowThread
  14431. function NtSetHighWaitLowThread(): NTSTATUS; stdcall;
  14432. begin
  14433. GetProcedureAddress(_NtSetHighWaitLowThread, ntdll, 'NtSetHighWaitLowThread');
  14434. Result := TFNNtSetHighWaitLowThread(_NtSetHighWaitLowThread)();
  14435. end;
  14436. // Dynamic version of NtSetHighWaitLowThread
  14437. function ZwSetHighWaitLowThread(): NTSTATUS; stdcall;
  14438. begin
  14439. GetProcedureAddress(_NtSetHighWaitLowThread, ntdll, 'NtSetHighWaitLowThread');
  14440. Result := TFNNtSetHighWaitLowThread(_NtSetHighWaitLowThread)();
  14441. end;
  14442. // Dynamic version of NtSetInformationFile
  14443. function NtSetInformationFile(
  14444. FileHandle : HANDLE;
  14445. IoStatusBlock : PIO_STATUS_BLOCK;
  14446. FileInformation : PVOID;
  14447. FileInformationLength : ULONG;
  14448. FileInformationClass : FILE_INFORMATION_CLASS
  14449. ): NTSTATUS; stdcall;
  14450. begin
  14451. GetProcedureAddress(_NtSetInformationFile, ntdll, 'NtSetInformationFile');
  14452. Result := TFNNtSetInformationFile(_NtSetInformationFile)(
  14453. FileHandle, IoStatusBlock, FileInformation, FileInformationLength, FileInformationClass
  14454. );
  14455. end;
  14456. // Dynamic version of NtSetInformationFile
  14457. function ZwSetInformationFile(
  14458. FileHandle : HANDLE;
  14459. IoStatusBlock : PIO_STATUS_BLOCK;
  14460. FileInformation : PVOID;
  14461. FileInformationLength : ULONG;
  14462. FileInformationClass : FILE_INFORMATION_CLASS
  14463. ): NTSTATUS; stdcall;
  14464. begin
  14465. GetProcedureAddress(_NtSetInformationFile, ntdll, 'NtSetInformationFile');
  14466. Result := TFNNtSetInformationFile(_NtSetInformationFile)(
  14467. FileHandle, IoStatusBlock, FileInformation, FileInformationLength, FileInformationClass
  14468. );
  14469. end;
  14470. // Dynamic version of NtSetInformationJobObject
  14471. function NtSetInformationJobObject(
  14472. JobHandle : HANDLE;
  14473. JobInformationClass : JOBOBJECTINFOCLASS;
  14474. JobInformation : PVOID;
  14475. JobInformationLength : ULONG
  14476. ): NTSTATUS; stdcall;
  14477. begin
  14478. GetProcedureAddress(_NtSetInformationJobObject, ntdll, 'NtSetInformationJobObject');
  14479. Result := TFNNtSetInformationJobObject(_NtSetInformationJobObject)(
  14480. JobHandle, JobInformationClass, JobInformation, JobInformationLength
  14481. );
  14482. end;
  14483. // Dynamic version of NtSetInformationJobObject
  14484. function ZwSetInformationJobObject(
  14485. JobHandle : HANDLE;
  14486. JobInformationClass : JOBOBJECTINFOCLASS;
  14487. JobInformation : PVOID;
  14488. JobInformationLength : ULONG
  14489. ): NTSTATUS; stdcall;
  14490. begin
  14491. GetProcedureAddress(_NtSetInformationJobObject, ntdll, 'NtSetInformationJobObject');
  14492. Result := TFNNtSetInformationJobObject(_NtSetInformationJobObject)(
  14493. JobHandle, JobInformationClass, JobInformation, JobInformationLength
  14494. );
  14495. end;
  14496. // Dynamic version of NtSetInformationKey
  14497. function NtSetInformationKey(
  14498. KeyHandle : HANDLE;
  14499. KeyInformationClass : KEY_SET_INFORMATION_CLASS;
  14500. KeyInformation : PVOID;
  14501. KeyInformationLength : ULONG
  14502. ): NTSTATUS; stdcall;
  14503. begin
  14504. GetProcedureAddress(_NtSetInformationKey, ntdll, 'NtSetInformationKey');
  14505. Result := TFNNtSetInformationKey(_NtSetInformationKey)(
  14506. KeyHandle, KeyInformationClass, KeyInformation, KeyInformationLength
  14507. );
  14508. end;
  14509. // Dynamic version of NtSetInformationKey
  14510. function ZwSetInformationKey(
  14511. KeyHandle : HANDLE;
  14512. KeyInformationClass : KEY_SET_INFORMATION_CLASS;
  14513. KeyInformation : PVOID;
  14514. KeyInformationLength : ULONG
  14515. ): NTSTATUS; stdcall;
  14516. begin
  14517. GetProcedureAddress(_NtSetInformationKey, ntdll, 'NtSetInformationKey');
  14518. Result := TFNNtSetInformationKey(_NtSetInformationKey)(
  14519. KeyHandle, KeyInformationClass, KeyInformation, KeyInformationLength
  14520. );
  14521. end;
  14522. // Dynamic version of NtSetInformationObject
  14523. function NtSetInformationObject(
  14524. ObjectHandle : HANDLE;
  14525. ObjectInformationClass : OBJECT_INFORMATION_CLASS;
  14526. ObjectInformation : PVOID;
  14527. ObjectInformationLength : ULONG
  14528. ): NTSTATUS; stdcall;
  14529. begin
  14530. GetProcedureAddress(_NtSetInformationObject, ntdll, 'NtSetInformationObject');
  14531. Result := TFNNtSetInformationObject(_NtSetInformationObject)(
  14532. ObjectHandle, ObjectInformationClass, ObjectInformation, ObjectInformationLength
  14533. );
  14534. end;
  14535. // Dynamic version of NtSetInformationObject
  14536. function ZwSetInformationObject(
  14537. ObjectHandle : HANDLE;
  14538. ObjectInformationClass : OBJECT_INFORMATION_CLASS;
  14539. ObjectInformation : PVOID;
  14540. ObjectInformationLength : ULONG
  14541. ): NTSTATUS; stdcall;
  14542. begin
  14543. GetProcedureAddress(_NtSetInformationObject, ntdll, 'NtSetInformationObject');
  14544. Result := TFNNtSetInformationObject(_NtSetInformationObject)(
  14545. ObjectHandle, ObjectInformationClass, ObjectInformation, ObjectInformationLength
  14546. );
  14547. end;
  14548. // Dynamic version of NtSetInformationProcess
  14549. function NtSetInformationProcess(
  14550. ProcessHandle : HANDLE;
  14551. ProcessInformationClass : PROCESSINFOCLASS;
  14552. ProcessInformation : PVOID;
  14553. ProcessInformationLength : ULONG
  14554. ): NTSTATUS; stdcall;
  14555. begin
  14556. GetProcedureAddress(_NtSetInformationProcess, ntdll, 'NtSetInformationProcess');
  14557. Result := TFNNtSetInformationProcess(_NtSetInformationProcess)(
  14558. ProcessHandle, ProcessInformationClass, ProcessInformation, ProcessInformationLength
  14559. );
  14560. end;
  14561. // Dynamic version of NtSetInformationProcess
  14562. function ZwSetInformationProcess(
  14563. ProcessHandle : HANDLE;
  14564. ProcessInformationClass : PROCESSINFOCLASS;
  14565. ProcessInformation : PVOID;
  14566. ProcessInformationLength : ULONG
  14567. ): NTSTATUS; stdcall;
  14568. begin
  14569. GetProcedureAddress(_NtSetInformationProcess, ntdll, 'NtSetInformationProcess');
  14570. Result := TFNNtSetInformationProcess(_NtSetInformationProcess)(
  14571. ProcessHandle, ProcessInformationClass, ProcessInformation, ProcessInformationLength
  14572. );
  14573. end;
  14574. // Dynamic version of NtSetInformationThread
  14575. function NtSetInformationThread(
  14576. ThreadHandle : HANDLE;
  14577. ThreadInformationClass : THREADINFOCLASS;
  14578. ThreadInformation : PVOID;
  14579. ThreadInformationLength : ULONG
  14580. ): NTSTATUS; stdcall;
  14581. begin
  14582. GetProcedureAddress(_NtSetInformationThread, ntdll, 'NtSetInformationThread');
  14583. Result := TFNNtSetInformationThread(_NtSetInformationThread)(
  14584. ThreadHandle, ThreadInformationClass, ThreadInformation, ThreadInformationLength
  14585. );
  14586. end;
  14587. // Dynamic version of NtSetInformationThread
  14588. function ZwSetInformationThread(
  14589. ThreadHandle : HANDLE;
  14590. ThreadInformationClass : THREADINFOCLASS;
  14591. ThreadInformation : PVOID;
  14592. ThreadInformationLength : ULONG
  14593. ): NTSTATUS; stdcall;
  14594. begin
  14595. GetProcedureAddress(_NtSetInformationThread, ntdll, 'NtSetInformationThread');
  14596. Result := TFNNtSetInformationThread(_NtSetInformationThread)(
  14597. ThreadHandle, ThreadInformationClass, ThreadInformation, ThreadInformationLength
  14598. );
  14599. end;
  14600. // Dynamic version of NtSetInformationToken
  14601. function NtSetInformationToken(
  14602. TokenHandle : HANDLE;
  14603. TokenInformationClass : TOKEN_INFORMATION_CLASS;
  14604. TokenInformation : PVOID;
  14605. TokenInformationLength : ULONG
  14606. ): NTSTATUS; stdcall;
  14607. begin
  14608. GetProcedureAddress(_NtSetInformationToken, ntdll, 'NtSetInformationToken');
  14609. Result := TFNNtSetInformationToken(_NtSetInformationToken)(
  14610. TokenHandle, TokenInformationClass, TokenInformation, TokenInformationLength
  14611. );
  14612. end;
  14613. // Dynamic version of NtSetInformationToken
  14614. function ZwSetInformationToken(
  14615. TokenHandle : HANDLE;
  14616. TokenInformationClass : TOKEN_INFORMATION_CLASS;
  14617. TokenInformation : PVOID;
  14618. TokenInformationLength : ULONG
  14619. ): NTSTATUS; stdcall;
  14620. begin
  14621. GetProcedureAddress(_NtSetInformationToken, ntdll, 'NtSetInformationToken');
  14622. Result := TFNNtSetInformationToken(_NtSetInformationToken)(
  14623. TokenHandle, TokenInformationClass, TokenInformation, TokenInformationLength
  14624. );
  14625. end;
  14626. // Dynamic version of NtSetIntervalProfile
  14627. function NtSetIntervalProfile(
  14628. Interval : ULONG;
  14629. Source : KPROFILE_SOURCE
  14630. ): NTSTATUS; stdcall;
  14631. begin
  14632. GetProcedureAddress(_NtSetIntervalProfile, ntdll, 'NtSetIntervalProfile');
  14633. Result := TFNNtSetIntervalProfile(_NtSetIntervalProfile)(
  14634. Interval, Source
  14635. );
  14636. end;
  14637. // Dynamic version of NtSetIntervalProfile
  14638. function ZwSetIntervalProfile(
  14639. Interval : ULONG;
  14640. Source : KPROFILE_SOURCE
  14641. ): NTSTATUS; stdcall;
  14642. begin
  14643. GetProcedureAddress(_NtSetIntervalProfile, ntdll, 'NtSetIntervalProfile');
  14644. Result := TFNNtSetIntervalProfile(_NtSetIntervalProfile)(
  14645. Interval, Source
  14646. );
  14647. end;
  14648. // Dynamic version of NtSetIoCompletion
  14649. function NtSetIoCompletion(
  14650. IoCompletionHandle : HANDLE;
  14651. CompletionKey : ULONG;
  14652. CompletionValue : ULONG;
  14653. Status : NTSTATUS;
  14654. Information : ULONG
  14655. ): NTSTATUS; stdcall;
  14656. begin
  14657. GetProcedureAddress(_NtSetIoCompletion, ntdll, 'NtSetIoCompletion');
  14658. Result := TFNNtSetIoCompletion(_NtSetIoCompletion)(
  14659. IoCompletionHandle, CompletionKey, CompletionValue, Status, Information
  14660. );
  14661. end;
  14662. // Dynamic version of NtSetIoCompletion
  14663. function ZwSetIoCompletion(
  14664. IoCompletionHandle : HANDLE;
  14665. CompletionKey : ULONG;
  14666. CompletionValue : ULONG;
  14667. Status : NTSTATUS;
  14668. Information : ULONG
  14669. ): NTSTATUS; stdcall;
  14670. begin
  14671. GetProcedureAddress(_NtSetIoCompletion, ntdll, 'NtSetIoCompletion');
  14672. Result := TFNNtSetIoCompletion(_NtSetIoCompletion)(
  14673. IoCompletionHandle, CompletionKey, CompletionValue, Status, Information
  14674. );
  14675. end;
  14676. // Dynamic version of NtSetLdtEntries
  14677. function NtSetLdtEntries(
  14678. Selector1 : ULONG;
  14679. LdtEntry1 : LDT_ENTRY;
  14680. Selector2 : ULONG;
  14681. LdtEntry2 : LDT_ENTRY
  14682. ): NTSTATUS; stdcall;
  14683. begin
  14684. GetProcedureAddress(_NtSetLdtEntries, ntdll, 'NtSetLdtEntries');
  14685. Result := TFNNtSetLdtEntries(_NtSetLdtEntries)(
  14686. Selector1, LdtEntry1, Selector2, LdtEntry2
  14687. );
  14688. end;
  14689. // Dynamic version of NtSetLdtEntries
  14690. function ZwSetLdtEntries(
  14691. Selector1 : ULONG;
  14692. LdtEntry1 : LDT_ENTRY;
  14693. Selector2 : ULONG;
  14694. LdtEntry2 : LDT_ENTRY
  14695. ): NTSTATUS; stdcall;
  14696. begin
  14697. GetProcedureAddress(_NtSetLdtEntries, ntdll, 'NtSetLdtEntries');
  14698. Result := TFNNtSetLdtEntries(_NtSetLdtEntries)(
  14699. Selector1, LdtEntry1, Selector2, LdtEntry2
  14700. );
  14701. end;
  14702. // Dynamic version of NtSetLowEventPair
  14703. function NtSetLowEventPair(
  14704. EventPairHandle : HANDLE
  14705. ): NTSTATUS; stdcall;
  14706. begin
  14707. GetProcedureAddress(_NtSetLowEventPair, ntdll, 'NtSetLowEventPair');
  14708. Result := TFNNtSetLowEventPair(_NtSetLowEventPair)(
  14709. EventPairHandle
  14710. );
  14711. end;
  14712. // Dynamic version of NtSetLowEventPair
  14713. function ZwSetLowEventPair(
  14714. EventPairHandle : HANDLE
  14715. ): NTSTATUS; stdcall;
  14716. begin
  14717. GetProcedureAddress(_NtSetLowEventPair, ntdll, 'NtSetLowEventPair');
  14718. Result := TFNNtSetLowEventPair(_NtSetLowEventPair)(
  14719. EventPairHandle
  14720. );
  14721. end;
  14722. // Dynamic version of NtSetLowWaitHighEventPair
  14723. function NtSetLowWaitHighEventPair(
  14724. EventPairHandle : HANDLE
  14725. ): NTSTATUS; stdcall;
  14726. begin
  14727. GetProcedureAddress(_NtSetLowWaitHighEventPair, ntdll, 'NtSetLowWaitHighEventPair');
  14728. Result := TFNNtSetLowWaitHighEventPair(_NtSetLowWaitHighEventPair)(
  14729. EventPairHandle
  14730. );
  14731. end;
  14732. // Dynamic version of NtSetLowWaitHighEventPair
  14733. function ZwSetLowWaitHighEventPair(
  14734. EventPairHandle : HANDLE
  14735. ): NTSTATUS; stdcall;
  14736. begin
  14737. GetProcedureAddress(_NtSetLowWaitHighEventPair, ntdll, 'NtSetLowWaitHighEventPair');
  14738. Result := TFNNtSetLowWaitHighEventPair(_NtSetLowWaitHighEventPair)(
  14739. EventPairHandle
  14740. );
  14741. end;
  14742. // Dynamic version of NtSetLowWaitHighThread
  14743. function NtSetLowWaitHighThread(): NTSTATUS; stdcall;
  14744. begin
  14745. GetProcedureAddress(_NtSetLowWaitHighThread, ntdll, 'NtSetLowWaitHighThread');
  14746. Result := TFNNtSetLowWaitHighThread(_NtSetLowWaitHighThread)();
  14747. end;
  14748. // Dynamic version of NtSetLowWaitHighThread
  14749. function ZwSetLowWaitHighThread(): NTSTATUS; stdcall;
  14750. begin
  14751. GetProcedureAddress(_NtSetLowWaitHighThread, ntdll, 'NtSetLowWaitHighThread');
  14752. Result := TFNNtSetLowWaitHighThread(_NtSetLowWaitHighThread)();
  14753. end;
  14754. // Dynamic version of NtSetQuotaInformationFile
  14755. function NtSetQuotaInformationFile(
  14756. FileHandle : HANDLE;
  14757. IoStatusBlock : PIO_STATUS_BLOCK;
  14758. Buffer : PFILE_USER_QUOTA_INFORMATION;
  14759. BufferLength : ULONG
  14760. ): NTSTATUS; stdcall;
  14761. begin
  14762. GetProcedureAddress(_NtSetQuotaInformationFile, ntdll, 'NtSetQuotaInformationFile');
  14763. Result := TFNNtSetQuotaInformationFile(_NtSetQuotaInformationFile)(
  14764. FileHandle, IoStatusBlock, Buffer, BufferLength
  14765. );
  14766. end;
  14767. // Dynamic version of NtSetQuotaInformationFile
  14768. function ZwSetQuotaInformationFile(
  14769. FileHandle : HANDLE;
  14770. IoStatusBlock : PIO_STATUS_BLOCK;
  14771. Buffer : PFILE_USER_QUOTA_INFORMATION;
  14772. BufferLength : ULONG
  14773. ): NTSTATUS; stdcall;
  14774. begin
  14775. GetProcedureAddress(_NtSetQuotaInformationFile, ntdll, 'NtSetQuotaInformationFile');
  14776. Result := TFNNtSetQuotaInformationFile(_NtSetQuotaInformationFile)(
  14777. FileHandle, IoStatusBlock, Buffer, BufferLength
  14778. );
  14779. end;
  14780. // Dynamic version of NtSetSecurityObject
  14781. function NtSetSecurityObject(
  14782. Handle : HANDLE;
  14783. SecurityInformation : SECURITY_INFORMATION;
  14784. SecurityDescriptor : PSECURITY_DESCRIPTOR
  14785. ): NTSTATUS; stdcall;
  14786. begin
  14787. GetProcedureAddress(_NtSetSecurityObject, ntdll, 'NtSetSecurityObject');
  14788. Result := TFNNtSetSecurityObject(_NtSetSecurityObject)(
  14789. Handle, SecurityInformation, SecurityDescriptor
  14790. );
  14791. end;
  14792. // Dynamic version of NtSetSecurityObject
  14793. function ZwSetSecurityObject(
  14794. Handle : HANDLE;
  14795. SecurityInformation : SECURITY_INFORMATION;
  14796. SecurityDescriptor : PSECURITY_DESCRIPTOR
  14797. ): NTSTATUS; stdcall;
  14798. begin
  14799. GetProcedureAddress(_NtSetSecurityObject, ntdll, 'NtSetSecurityObject');
  14800. Result := TFNNtSetSecurityObject(_NtSetSecurityObject)(
  14801. Handle, SecurityInformation, SecurityDescriptor
  14802. );
  14803. end;
  14804. // Dynamic version of NtSetSystemEnvironmentValue
  14805. function NtSetSystemEnvironmentValue(
  14806. Name : PUNICODE_STRING;
  14807. Value : PUNICODE_STRING
  14808. ): NTSTATUS; stdcall;
  14809. begin
  14810. GetProcedureAddress(_NtSetSystemEnvironmentValue, ntdll, 'NtSetSystemEnvironmentValue');
  14811. Result := TFNNtSetSystemEnvironmentValue(_NtSetSystemEnvironmentValue)(
  14812. Name, Value
  14813. );
  14814. end;
  14815. // Dynamic version of NtSetSystemEnvironmentValue
  14816. function ZwSetSystemEnvironmentValue(
  14817. Name : PUNICODE_STRING;
  14818. Value : PUNICODE_STRING
  14819. ): NTSTATUS; stdcall;
  14820. begin
  14821. GetProcedureAddress(_NtSetSystemEnvironmentValue, ntdll, 'NtSetSystemEnvironmentValue');
  14822. Result := TFNNtSetSystemEnvironmentValue(_NtSetSystemEnvironmentValue)(
  14823. Name, Value
  14824. );
  14825. end;
  14826. // Dynamic version of NtSetSystemInformation
  14827. function NtSetSystemInformation(
  14828. SystemInformationClass : SYSTEM_INFORMATION_CLASS;
  14829. SystemInformation : PVOID;
  14830. SystemInformationLength : ULONG
  14831. ): NTSTATUS; stdcall;
  14832. begin
  14833. GetProcedureAddress(_NtSetSystemInformation, ntdll, 'NtSetSystemInformation');
  14834. Result := TFNNtSetSystemInformation(_NtSetSystemInformation)(
  14835. SystemInformationClass, SystemInformation, SystemInformationLength
  14836. );
  14837. end;
  14838. // Dynamic version of NtSetSystemInformation
  14839. function ZwSetSystemInformation(
  14840. SystemInformationClass : SYSTEM_INFORMATION_CLASS;
  14841. SystemInformation : PVOID;
  14842. SystemInformationLength : ULONG
  14843. ): NTSTATUS; stdcall;
  14844. begin
  14845. GetProcedureAddress(_NtSetSystemInformation, ntdll, 'NtSetSystemInformation');
  14846. Result := TFNNtSetSystemInformation(_NtSetSystemInformation)(
  14847. SystemInformationClass, SystemInformation, SystemInformationLength
  14848. );
  14849. end;
  14850. // Dynamic version of NtSetSystemPowerState
  14851. function NtSetSystemPowerState(
  14852. SystemAction : POWER_ACTION;
  14853. MinSystemState : SYSTEM_POWER_STATE;
  14854. Flags : ULONG
  14855. ): NTSTATUS; stdcall;
  14856. begin
  14857. GetProcedureAddress(_NtSetSystemPowerState, ntdll, 'NtSetSystemPowerState');
  14858. Result := TFNNtSetSystemPowerState(_NtSetSystemPowerState)(
  14859. SystemAction, MinSystemState, Flags
  14860. );
  14861. end;
  14862. // Dynamic version of NtSetSystemPowerState
  14863. function ZwSetSystemPowerState(
  14864. SystemAction : POWER_ACTION;
  14865. MinSystemState : SYSTEM_POWER_STATE;
  14866. Flags : ULONG
  14867. ): NTSTATUS; stdcall;
  14868. begin
  14869. GetProcedureAddress(_NtSetSystemPowerState, ntdll, 'NtSetSystemPowerState');
  14870. Result := TFNNtSetSystemPowerState(_NtSetSystemPowerState)(
  14871. SystemAction, MinSystemState, Flags
  14872. );
  14873. end;
  14874. // Dynamic version of NtSetSystemTime
  14875. function NtSetSystemTime(
  14876. NewTime : PLARGE_INTEGER;
  14877. OldTime : PLARGE_INTEGER
  14878. ): NTSTATUS; stdcall;
  14879. begin
  14880. GetProcedureAddress(_NtSetSystemTime, ntdll, 'NtSetSystemTime');
  14881. Result := TFNNtSetSystemTime(_NtSetSystemTime)(
  14882. NewTime, OldTime
  14883. );
  14884. end;
  14885. // Dynamic version of NtSetSystemTime
  14886. function ZwSetSystemTime(
  14887. NewTime : PLARGE_INTEGER;
  14888. OldTime : PLARGE_INTEGER
  14889. ): NTSTATUS; stdcall;
  14890. begin
  14891. GetProcedureAddress(_NtSetSystemTime, ntdll, 'NtSetSystemTime');
  14892. Result := TFNNtSetSystemTime(_NtSetSystemTime)(
  14893. NewTime, OldTime
  14894. );
  14895. end;
  14896. // Dynamic version of NtSetThreadExecutionState
  14897. function NtSetThreadExecutionState(
  14898. ExecutionState : EXECUTION_STATE;
  14899. PreviousExecutionState : PEXECUTION_STATE
  14900. ): NTSTATUS; stdcall;
  14901. begin
  14902. GetProcedureAddress(_NtSetThreadExecutionState, ntdll, 'NtSetThreadExecutionState');
  14903. Result := TFNNtSetThreadExecutionState(_NtSetThreadExecutionState)(
  14904. ExecutionState, PreviousExecutionState
  14905. );
  14906. end;
  14907. // Dynamic version of NtSetThreadExecutionState
  14908. function ZwSetThreadExecutionState(
  14909. ExecutionState : EXECUTION_STATE;
  14910. PreviousExecutionState : PEXECUTION_STATE
  14911. ): NTSTATUS; stdcall;
  14912. begin
  14913. GetProcedureAddress(_NtSetThreadExecutionState, ntdll, 'NtSetThreadExecutionState');
  14914. Result := TFNNtSetThreadExecutionState(_NtSetThreadExecutionState)(
  14915. ExecutionState, PreviousExecutionState
  14916. );
  14917. end;
  14918. // Dynamic version of NtSetTimer
  14919. function NtSetTimer(
  14920. TimerHandle : HANDLE;
  14921. DueTime : PLARGE_INTEGER;
  14922. TimerApcRoutine : PTIMER_APC_ROUTINE;
  14923. TimerContext : PVOID;
  14924. Resume : BOOLEAN;
  14925. Period : LONG;
  14926. PreviousState : PBOOLEAN
  14927. ): NTSTATUS; stdcall;
  14928. begin
  14929. GetProcedureAddress(_NtSetTimer, ntdll, 'NtSetTimer');
  14930. Result := TFNNtSetTimer(_NtSetTimer)(
  14931. TimerHandle, DueTime, TimerApcRoutine, TimerContext, Resume, Period, PreviousState
  14932. );
  14933. end;
  14934. // Dynamic version of NtSetTimer
  14935. function ZwSetTimer(
  14936. TimerHandle : HANDLE;
  14937. DueTime : PLARGE_INTEGER;
  14938. TimerApcRoutine : PTIMER_APC_ROUTINE;
  14939. TimerContext : PVOID;
  14940. Resume : BOOLEAN;
  14941. Period : LONG;
  14942. PreviousState : PBOOLEAN
  14943. ): NTSTATUS; stdcall;
  14944. begin
  14945. GetProcedureAddress(_NtSetTimer, ntdll, 'NtSetTimer');
  14946. Result := TFNNtSetTimer(_NtSetTimer)(
  14947. TimerHandle, DueTime, TimerApcRoutine, TimerContext, Resume, Period, PreviousState
  14948. );
  14949. end;
  14950. // Dynamic version of NtSetTimerResolution
  14951. function NtSetTimerResolution(
  14952. RequestedResolution : ULONG;
  14953. Set_ : BOOLEAN;
  14954. ActualResolution : PULONG
  14955. ): NTSTATUS; stdcall;
  14956. begin
  14957. GetProcedureAddress(_NtSetTimerResolution, ntdll, 'NtSetTimerResolution');
  14958. Result := TFNNtSetTimerResolution(_NtSetTimerResolution)(
  14959. RequestedResolution, Set_, ActualResolution
  14960. );
  14961. end;
  14962. // Dynamic version of NtSetTimerResolution
  14963. function ZwSetTimerResolution(
  14964. RequestedResolution : ULONG;
  14965. Set_ : BOOLEAN;
  14966. ActualResolution : PULONG
  14967. ): NTSTATUS; stdcall;
  14968. begin
  14969. GetProcedureAddress(_NtSetTimerResolution, ntdll, 'NtSetTimerResolution');
  14970. Result := TFNNtSetTimerResolution(_NtSetTimerResolution)(
  14971. RequestedResolution, Set_, ActualResolution
  14972. );
  14973. end;
  14974. // Dynamic version of NtSetUuidSeed
  14975. function NtSetUuidSeed(
  14976. UuidSeed : PUCHAR
  14977. ): NTSTATUS; stdcall;
  14978. begin
  14979. GetProcedureAddress(_NtSetUuidSeed, ntdll, 'NtSetUuidSeed');
  14980. Result := TFNNtSetUuidSeed(_NtSetUuidSeed)(
  14981. UuidSeed
  14982. );
  14983. end;
  14984. // Dynamic version of NtSetUuidSeed
  14985. function ZwSetUuidSeed(
  14986. UuidSeed : PUCHAR
  14987. ): NTSTATUS; stdcall;
  14988. begin
  14989. GetProcedureAddress(_NtSetUuidSeed, ntdll, 'NtSetUuidSeed');
  14990. Result := TFNNtSetUuidSeed(_NtSetUuidSeed)(
  14991. UuidSeed
  14992. );
  14993. end;
  14994. // Dynamic version of NtSetValueKey
  14995. function NtSetValueKey(
  14996. KeyHandle : HANDLE;
  14997. ValueName : PUNICODE_STRING;
  14998. TitleIndex : ULONG;
  14999. Type_ : ULONG;
  15000. Data : PVOID;
  15001. DataSize : ULONG
  15002. ): NTSTATUS; stdcall;
  15003. begin
  15004. GetProcedureAddress(_NtSetValueKey, ntdll, 'NtSetValueKey');
  15005. Result := TFNNtSetValueKey(_NtSetValueKey)(
  15006. KeyHandle, ValueName, TitleIndex, Type_, Data, DataSize
  15007. );
  15008. end;
  15009. // Dynamic version of NtSetValueKey
  15010. function ZwSetValueKey(
  15011. KeyHandle : HANDLE;
  15012. ValueName : PUNICODE_STRING;
  15013. TitleIndex : ULONG;
  15014. Type_ : ULONG;
  15015. Data : PVOID;
  15016. DataSize : ULONG
  15017. ): NTSTATUS; stdcall;
  15018. begin
  15019. GetProcedureAddress(_NtSetValueKey, ntdll, 'NtSetValueKey');
  15020. Result := TFNNtSetValueKey(_NtSetValueKey)(
  15021. KeyHandle, ValueName, TitleIndex, Type_, Data, DataSize
  15022. );
  15023. end;
  15024. // Dynamic version of NtSetVolumeInformationFile
  15025. function NtSetVolumeInformationFile(
  15026. FileHandle : HANDLE;
  15027. IoStatusBlock : PIO_STATUS_BLOCK;
  15028. Buffer : PVOID;
  15029. BufferLength : ULONG;
  15030. VolumeInformationClass : FS_INFORMATION_CLASS
  15031. ): NTSTATUS; stdcall;
  15032. begin
  15033. GetProcedureAddress(_NtSetVolumeInformationFile, ntdll, 'NtSetVolumeInformationFile');
  15034. Result := TFNNtSetVolumeInformationFile(_NtSetVolumeInformationFile)(
  15035. FileHandle, IoStatusBlock, Buffer, BufferLength, VolumeInformationClass
  15036. );
  15037. end;
  15038. // Dynamic version of NtSetVolumeInformationFile
  15039. function ZwSetVolumeInformationFile(
  15040. FileHandle : HANDLE;
  15041. IoStatusBlock : PIO_STATUS_BLOCK;
  15042. Buffer : PVOID;
  15043. BufferLength : ULONG;
  15044. VolumeInformationClass : FS_INFORMATION_CLASS
  15045. ): NTSTATUS; stdcall;
  15046. begin
  15047. GetProcedureAddress(_NtSetVolumeInformationFile, ntdll, 'NtSetVolumeInformationFile');
  15048. Result := TFNNtSetVolumeInformationFile(_NtSetVolumeInformationFile)(
  15049. FileHandle, IoStatusBlock, Buffer, BufferLength, VolumeInformationClass
  15050. );
  15051. end;
  15052. // Dynamic version of NtShutdownSystem
  15053. function NtShutdownSystem(
  15054. Action : SHUTDOWN_ACTION
  15055. ): NTSTATUS; stdcall;
  15056. begin
  15057. GetProcedureAddress(_NtShutdownSystem, ntdll, 'NtShutdownSystem');
  15058. Result := TFNNtShutdownSystem(_NtShutdownSystem)(
  15059. Action
  15060. );
  15061. end;
  15062. // Dynamic version of NtShutdownSystem
  15063. function ZwShutdownSystem(
  15064. Action : SHUTDOWN_ACTION
  15065. ): NTSTATUS; stdcall;
  15066. begin
  15067. GetProcedureAddress(_NtShutdownSystem, ntdll, 'NtShutdownSystem');
  15068. Result := TFNNtShutdownSystem(_NtShutdownSystem)(
  15069. Action
  15070. );
  15071. end;
  15072. // Dynamic version of NtSignalAndWaitForSingleObject
  15073. function NtSignalAndWaitForSingleObject(
  15074. HandleToSignal : HANDLE;
  15075. HandleToWait : HANDLE;
  15076. Alertable : BOOLEAN;
  15077. Timeout : PLARGE_INTEGER
  15078. ): NTSTATUS; stdcall;
  15079. begin
  15080. GetProcedureAddress(_NtSignalAndWaitForSingleObject, ntdll, 'NtSignalAndWaitForSingleObject');
  15081. Result := TFNNtSignalAndWaitForSingleObject(_NtSignalAndWaitForSingleObject)(
  15082. HandleToSignal, HandleToWait, Alertable, Timeout
  15083. );
  15084. end;
  15085. // Dynamic version of NtSignalAndWaitForSingleObject
  15086. function ZwSignalAndWaitForSingleObject(
  15087. HandleToSignal : HANDLE;
  15088. HandleToWait : HANDLE;
  15089. Alertable : BOOLEAN;
  15090. Timeout : PLARGE_INTEGER
  15091. ): NTSTATUS; stdcall;
  15092. begin
  15093. GetProcedureAddress(_NtSignalAndWaitForSingleObject, ntdll, 'NtSignalAndWaitForSingleObject');
  15094. Result := TFNNtSignalAndWaitForSingleObject(_NtSignalAndWaitForSingleObject)(
  15095. HandleToSignal, HandleToWait, Alertable, Timeout
  15096. );
  15097. end;
  15098. // Dynamic version of NtStartProfile
  15099. function NtStartProfile(
  15100. ProfileHandle : HANDLE
  15101. ): NTSTATUS; stdcall;
  15102. begin
  15103. GetProcedureAddress(_NtStartProfile, ntdll, 'NtStartProfile');
  15104. Result := TFNNtStartProfile(_NtStartProfile)(
  15105. ProfileHandle
  15106. );
  15107. end;
  15108. // Dynamic version of NtStartProfile
  15109. function ZwStartProfile(
  15110. ProfileHandle : HANDLE
  15111. ): NTSTATUS; stdcall;
  15112. begin
  15113. GetProcedureAddress(_NtStartProfile, ntdll, 'NtStartProfile');
  15114. Result := TFNNtStartProfile(_NtStartProfile)(
  15115. ProfileHandle
  15116. );
  15117. end;
  15118. // Dynamic version of NtStopProfile
  15119. function NtStopProfile(
  15120. ProfileHandle : HANDLE
  15121. ): NTSTATUS; stdcall;
  15122. begin
  15123. GetProcedureAddress(_NtStopProfile, ntdll, 'NtStopProfile');
  15124. Result := TFNNtStopProfile(_NtStopProfile)(
  15125. ProfileHandle
  15126. );
  15127. end;
  15128. // Dynamic version of NtStopProfile
  15129. function ZwStopProfile(
  15130. ProfileHandle : HANDLE
  15131. ): NTSTATUS; stdcall;
  15132. begin
  15133. GetProcedureAddress(_NtStopProfile, ntdll, 'NtStopProfile');
  15134. Result := TFNNtStopProfile(_NtStopProfile)(
  15135. ProfileHandle
  15136. );
  15137. end;
  15138. // Dynamic version of NtSuspendProcess
  15139. function NtSuspendProcess(
  15140. hProcess : HANDLE
  15141. ): NTSTATUS; stdcall;
  15142. begin
  15143. GetProcedureAddress(_NtSuspendProcess, ntdll, 'NtSuspendProcess');
  15144. Result := TFNNtSuspendProcess(_NtSuspendProcess)(
  15145. hProcess
  15146. );
  15147. end;
  15148. // Dynamic version of NtSuspendProcess
  15149. function ZwSuspendProcess(
  15150. hProcess : HANDLE
  15151. ): NTSTATUS; stdcall;
  15152. begin
  15153. GetProcedureAddress(_NtSuspendProcess, ntdll, 'NtSuspendProcess');
  15154. Result := TFNNtSuspendProcess(_NtSuspendProcess)(
  15155. hProcess
  15156. );
  15157. end;
  15158. // Dynamic version of NtSuspendThread
  15159. function NtSuspendThread(
  15160. hThread : HANDLE;
  15161. dwLastResumeCount : PULONG
  15162. ): NTSTATUS; stdcall;
  15163. begin
  15164. GetProcedureAddress(_NtSuspendThread, ntdll, 'NtSuspendThread');
  15165. Result := TFNNtSuspendThread(_NtSuspendThread)(
  15166. hThread, dwLastResumeCount
  15167. );
  15168. end;
  15169. // Dynamic version of NtSuspendThread
  15170. function ZwSuspendThread(
  15171. hThread : HANDLE;
  15172. dwLastResumeCount : PULONG
  15173. ): NTSTATUS; stdcall;
  15174. begin
  15175. GetProcedureAddress(_NtSuspendThread, ntdll, 'NtSuspendThread');
  15176. Result := TFNNtSuspendThread(_NtSuspendThread)(
  15177. hThread, dwLastResumeCount
  15178. );
  15179. end;
  15180. // Dynamic version of NtSystemDebugControl
  15181. function NtSystemDebugControl(
  15182. ControlCode : DEBUG_CONTROL_CODE;
  15183. InputBuffer : PVOID;
  15184. InputBufferLength : ULONG;
  15185. OutputBuffer : PVOID;
  15186. OutputBufferLength : ULONG;
  15187. ReturnLength : PULONG
  15188. ): NTSTATUS; stdcall;
  15189. begin
  15190. GetProcedureAddress(_NtSystemDebugControl, ntdll, 'NtSystemDebugControl');
  15191. Result := TFNNtSystemDebugControl(_NtSystemDebugControl)(
  15192. ControlCode, InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength, ReturnLength
  15193. );
  15194. end;
  15195. // Dynamic version of NtSystemDebugControl
  15196. function ZwSystemDebugControl(
  15197. ControlCode : DEBUG_CONTROL_CODE;
  15198. InputBuffer : PVOID;
  15199. InputBufferLength : ULONG;
  15200. OutputBuffer : PVOID;
  15201. OutputBufferLength : ULONG;
  15202. ReturnLength : PULONG
  15203. ): NTSTATUS; stdcall;
  15204. begin
  15205. GetProcedureAddress(_NtSystemDebugControl, ntdll, 'NtSystemDebugControl');
  15206. Result := TFNNtSystemDebugControl(_NtSystemDebugControl)(
  15207. ControlCode, InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength, ReturnLength
  15208. );
  15209. end;
  15210. // Dynamic version of NtTerminateJobObject
  15211. function NtTerminateJobObject(
  15212. JobHandle : HANDLE;
  15213. ExitStatus : NTSTATUS
  15214. ): NTSTATUS; stdcall;
  15215. begin
  15216. GetProcedureAddress(_NtTerminateJobObject, ntdll, 'NtTerminateJobObject');
  15217. Result := TFNNtTerminateJobObject(_NtTerminateJobObject)(
  15218. JobHandle, ExitStatus
  15219. );
  15220. end;
  15221. // Dynamic version of NtTerminateJobObject
  15222. function ZwTerminateJobObject(
  15223. JobHandle : HANDLE;
  15224. ExitStatus : NTSTATUS
  15225. ): NTSTATUS; stdcall;
  15226. begin
  15227. GetProcedureAddress(_NtTerminateJobObject, ntdll, 'NtTerminateJobObject');
  15228. Result := TFNNtTerminateJobObject(_NtTerminateJobObject)(
  15229. JobHandle, ExitStatus
  15230. );
  15231. end;
  15232. // Dynamic version of NtTerminateProcess
  15233. function NtTerminateProcess(
  15234. ProcessHandle : HANDLE;
  15235. ExitStatus : NTSTATUS
  15236. ): NTSTATUS; stdcall;
  15237. begin
  15238. GetProcedureAddress(_NtTerminateProcess, ntdll, 'NtTerminateProcess');
  15239. Result := TFNNtTerminateProcess(_NtTerminateProcess)(
  15240. ProcessHandle, ExitStatus
  15241. );
  15242. end;
  15243. // Dynamic version of NtTerminateProcess
  15244. function ZwTerminateProcess(
  15245. ProcessHandle : HANDLE;
  15246. ExitStatus : NTSTATUS
  15247. ): NTSTATUS; stdcall;
  15248. begin
  15249. GetProcedureAddress(_NtTerminateProcess, ntdll, 'NtTerminateProcess');
  15250. Result := TFNNtTerminateProcess(_NtTerminateProcess)(
  15251. ProcessHandle, ExitStatus
  15252. );
  15253. end;
  15254. // Dynamic version of NtTerminateThread
  15255. function NtTerminateThread(
  15256. ThreadHandle : HANDLE;
  15257. ExitStatus : NTSTATUS
  15258. ): NTSTATUS; stdcall;
  15259. begin
  15260. GetProcedureAddress(_NtTerminateThread, ntdll, 'NtTerminateThread');
  15261. Result := TFNNtTerminateThread(_NtTerminateThread)(
  15262. ThreadHandle, ExitStatus
  15263. );
  15264. end;
  15265. // Dynamic version of NtTerminateThread
  15266. function ZwTerminateThread(
  15267. ThreadHandle : HANDLE;
  15268. ExitStatus : NTSTATUS
  15269. ): NTSTATUS; stdcall;
  15270. begin
  15271. GetProcedureAddress(_NtTerminateThread, ntdll, 'NtTerminateThread');
  15272. Result := TFNNtTerminateThread(_NtTerminateThread)(
  15273. ThreadHandle, ExitStatus
  15274. );
  15275. end;
  15276. // Dynamic version of NtTestAlert
  15277. function NtTestAlert(): NTSTATUS; stdcall;
  15278. begin
  15279. GetProcedureAddress(_NtTestAlert, ntdll, 'NtTestAlert');
  15280. Result := TFNNtTestAlert(_NtTestAlert)();
  15281. end;
  15282. // Dynamic version of NtTestAlert
  15283. function ZwTestAlert(): NTSTATUS; stdcall;
  15284. begin
  15285. GetProcedureAddress(_NtTestAlert, ntdll, 'NtTestAlert');
  15286. Result := TFNNtTestAlert(_NtTestAlert)();
  15287. end;
  15288. // Dynamic version of NtUnloadDriver
  15289. function NtUnloadDriver(
  15290. DriverServiceName : PUNICODE_STRING
  15291. ): NTSTATUS; stdcall;
  15292. begin
  15293. GetProcedureAddress(_NtUnloadDriver, ntdll, 'NtUnloadDriver');
  15294. Result := TFNNtUnloadDriver(_NtUnloadDriver)(
  15295. DriverServiceName
  15296. );
  15297. end;
  15298. // Dynamic version of NtUnloadDriver
  15299. function ZwUnloadDriver(
  15300. DriverServiceName : PUNICODE_STRING
  15301. ): NTSTATUS; stdcall;
  15302. begin
  15303. GetProcedureAddress(_NtUnloadDriver, ntdll, 'NtUnloadDriver');
  15304. Result := TFNNtUnloadDriver(_NtUnloadDriver)(
  15305. DriverServiceName
  15306. );
  15307. end;
  15308. // Dynamic version of NtUnloadKey
  15309. function NtUnloadKey(
  15310. KeyObjectAttributes : POBJECT_ATTRIBUTES
  15311. ): NTSTATUS; stdcall;
  15312. begin
  15313. GetProcedureAddress(_NtUnloadKey, ntdll, 'NtUnloadKey');
  15314. Result := TFNNtUnloadKey(_NtUnloadKey)(
  15315. KeyObjectAttributes
  15316. );
  15317. end;
  15318. // Dynamic version of NtUnloadKey
  15319. function ZwUnloadKey(
  15320. KeyObjectAttributes : POBJECT_ATTRIBUTES
  15321. ): NTSTATUS; stdcall;
  15322. begin
  15323. GetProcedureAddress(_NtUnloadKey, ntdll, 'NtUnloadKey');
  15324. Result := TFNNtUnloadKey(_NtUnloadKey)(
  15325. KeyObjectAttributes
  15326. );
  15327. end;
  15328. // Dynamic version of NtUnlockFile
  15329. function NtUnlockFile(
  15330. FileHandle : HANDLE;
  15331. IoStatusBlock : PIO_STATUS_BLOCK;
  15332. LockOffset : PULARGE_INTEGER;
  15333. LockLength : PULARGE_INTEGER;
  15334. Key : ULONG
  15335. ): NTSTATUS; stdcall;
  15336. begin
  15337. GetProcedureAddress(_NtUnlockFile, ntdll, 'NtUnlockFile');
  15338. Result := TFNNtUnlockFile(_NtUnlockFile)(
  15339. FileHandle, IoStatusBlock, LockOffset, LockLength, Key
  15340. );
  15341. end;
  15342. // Dynamic version of NtUnlockFile
  15343. function ZwUnlockFile(
  15344. FileHandle : HANDLE;
  15345. IoStatusBlock : PIO_STATUS_BLOCK;
  15346. LockOffset : PULARGE_INTEGER;
  15347. LockLength : PULARGE_INTEGER;
  15348. Key : ULONG
  15349. ): NTSTATUS; stdcall;
  15350. begin
  15351. GetProcedureAddress(_NtUnlockFile, ntdll, 'NtUnlockFile');
  15352. Result := TFNNtUnlockFile(_NtUnlockFile)(
  15353. FileHandle, IoStatusBlock, LockOffset, LockLength, Key
  15354. );
  15355. end;
  15356. // Dynamic version of NtUnlockVirtualMemory
  15357. function NtUnlockVirtualMemory(
  15358. ProcessHandle : HANDLE;
  15359. BaseAddress : PPVOID;
  15360. LockSize : PULONG;
  15361. LockType : ULONG
  15362. ): NTSTATUS; stdcall;
  15363. begin
  15364. GetProcedureAddress(_NtUnlockVirtualMemory, ntdll, 'NtUnlockVirtualMemory');
  15365. Result := TFNNtUnlockVirtualMemory(_NtUnlockVirtualMemory)(
  15366. ProcessHandle, BaseAddress, LockSize, LockType
  15367. );
  15368. end;
  15369. // Dynamic version of NtUnlockVirtualMemory
  15370. function ZwUnlockVirtualMemory(
  15371. ProcessHandle : HANDLE;
  15372. BaseAddress : PPVOID;
  15373. LockSize : PULONG;
  15374. LockType : ULONG
  15375. ): NTSTATUS; stdcall;
  15376. begin
  15377. GetProcedureAddress(_NtUnlockVirtualMemory, ntdll, 'NtUnlockVirtualMemory');
  15378. Result := TFNNtUnlockVirtualMemory(_NtUnlockVirtualMemory)(
  15379. ProcessHandle, BaseAddress, LockSize, LockType
  15380. );
  15381. end;
  15382. // Dynamic version of NtUnmapViewOfSection
  15383. function NtUnmapViewOfSection(
  15384. ProcessHandle : HANDLE;
  15385. BaseAddress : PVOID
  15386. ): NTSTATUS; stdcall;
  15387. begin
  15388. GetProcedureAddress(_NtUnmapViewOfSection, ntdll, 'NtUnmapViewOfSection');
  15389. Result := TFNNtUnmapViewOfSection(_NtUnmapViewOfSection)(
  15390. ProcessHandle, BaseAddress
  15391. );
  15392. end;
  15393. // Dynamic version of NtUnmapViewOfSection
  15394. function ZwUnmapViewOfSection(
  15395. ProcessHandle : HANDLE;
  15396. BaseAddress : PVOID
  15397. ): NTSTATUS; stdcall;
  15398. begin
  15399. GetProcedureAddress(_NtUnmapViewOfSection, ntdll, 'NtUnmapViewOfSection');
  15400. Result := TFNNtUnmapViewOfSection(_NtUnmapViewOfSection)(
  15401. ProcessHandle, BaseAddress
  15402. );
  15403. end;
  15404. // Dynamic version of NtVdmControl
  15405. function NtVdmControl(
  15406. ControlCode : ULONG;
  15407. ControlData : PVOID
  15408. ): NTSTATUS; stdcall;
  15409. begin
  15410. GetProcedureAddress(_NtVdmControl, ntdll, 'NtVdmControl');
  15411. Result := TFNNtVdmControl(_NtVdmControl)(
  15412. ControlCode, ControlData
  15413. );
  15414. end;
  15415. // Dynamic version of NtVdmControl
  15416. function ZwVdmControl(
  15417. ControlCode : ULONG;
  15418. ControlData : PVOID
  15419. ): NTSTATUS; stdcall;
  15420. begin
  15421. GetProcedureAddress(_NtVdmControl, ntdll, 'NtVdmControl');
  15422. Result := TFNNtVdmControl(_NtVdmControl)(
  15423. ControlCode, ControlData
  15424. );
  15425. end;
  15426. // Dynamic version of NtW32Call
  15427. function NtW32Call(
  15428. RoutineIndex : ULONG;
  15429. Argument : PVOID;
  15430. ArgumentLength : ULONG;
  15431. Result_ : PPVOID;
  15432. ResultLength : PULONG
  15433. ): NTSTATUS; stdcall;
  15434. begin
  15435. GetProcedureAddress(_NtW32Call, ntdll, 'NtW32Call');
  15436. Result := TFNNtW32Call(_NtW32Call)(
  15437. RoutineIndex, Argument, ArgumentLength, Result_, ResultLength
  15438. );
  15439. end;
  15440. // Dynamic version of NtW32Call
  15441. function ZwW32Call(
  15442. RoutineIndex : ULONG;
  15443. Argument : PVOID;
  15444. ArgumentLength : ULONG;
  15445. Result_ : PPVOID;
  15446. ResultLength : PULONG
  15447. ): NTSTATUS; stdcall;
  15448. begin
  15449. GetProcedureAddress(_NtW32Call, ntdll, 'NtW32Call');
  15450. Result := TFNNtW32Call(_NtW32Call)(
  15451. RoutineIndex, Argument, ArgumentLength, Result_, ResultLength
  15452. );
  15453. end;
  15454. // Dynamic version of NtWaitForMultipleObjects
  15455. function NtWaitForMultipleObjects(
  15456. HandleCount : ULONG;
  15457. Handles : PHANDLE;
  15458. WaitType : WAIT_TYPE;
  15459. Alertable : BOOLEAN;
  15460. Timeout : PLARGE_INTEGER
  15461. ): NTSTATUS; stdcall;
  15462. begin
  15463. GetProcedureAddress(_NtWaitForMultipleObjects, ntdll, 'NtWaitForMultipleObjects');
  15464. Result := TFNNtWaitForMultipleObjects(_NtWaitForMultipleObjects)(
  15465. HandleCount, Handles, WaitType, Alertable, Timeout
  15466. );
  15467. end;
  15468. // Dynamic version of NtWaitForMultipleObjects
  15469. function ZwWaitForMultipleObjects(
  15470. HandleCount : ULONG;
  15471. Handles : PHANDLE;
  15472. WaitType : WAIT_TYPE;
  15473. Alertable : BOOLEAN;
  15474. Timeout : PLARGE_INTEGER
  15475. ): NTSTATUS; stdcall;
  15476. begin
  15477. GetProcedureAddress(_NtWaitForMultipleObjects, ntdll, 'NtWaitForMultipleObjects');
  15478. Result := TFNNtWaitForMultipleObjects(_NtWaitForMultipleObjects)(
  15479. HandleCount, Handles, WaitType, Alertable, Timeout
  15480. );
  15481. end;
  15482. // Dynamic version of NtWaitForSingleObject
  15483. function NtWaitForSingleObject(
  15484. Handle : HANDLE;
  15485. Alertable : BOOLEAN;
  15486. Timeout : PLARGE_INTEGER
  15487. ): NTSTATUS; stdcall;
  15488. begin
  15489. GetProcedureAddress(_NtWaitForSingleObject, ntdll, 'NtWaitForSingleObject');
  15490. Result := TFNNtWaitForSingleObject(_NtWaitForSingleObject)(
  15491. Handle, Alertable, Timeout
  15492. );
  15493. end;
  15494. // Dynamic version of NtWaitForSingleObject
  15495. function ZwWaitForSingleObject(
  15496. Handle : HANDLE;
  15497. Alertable : BOOLEAN;
  15498. Timeout : PLARGE_INTEGER
  15499. ): NTSTATUS; stdcall;
  15500. begin
  15501. GetProcedureAddress(_NtWaitForSingleObject, ntdll, 'NtWaitForSingleObject');
  15502. Result := TFNNtWaitForSingleObject(_NtWaitForSingleObject)(
  15503. Handle, Alertable, Timeout
  15504. );
  15505. end;
  15506. // Dynamic version of NtWaitHighEventPair
  15507. function NtWaitHighEventPair(
  15508. EventPairHandle : HANDLE
  15509. ): NTSTATUS; stdcall;
  15510. begin
  15511. GetProcedureAddress(_NtWaitHighEventPair, ntdll, 'NtWaitHighEventPair');
  15512. Result := TFNNtWaitHighEventPair(_NtWaitHighEventPair)(
  15513. EventPairHandle
  15514. );
  15515. end;
  15516. // Dynamic version of NtWaitHighEventPair
  15517. function ZwWaitHighEventPair(
  15518. EventPairHandle : HANDLE
  15519. ): NTSTATUS; stdcall;
  15520. begin
  15521. GetProcedureAddress(_NtWaitHighEventPair, ntdll, 'NtWaitHighEventPair');
  15522. Result := TFNNtWaitHighEventPair(_NtWaitHighEventPair)(
  15523. EventPairHandle
  15524. );
  15525. end;
  15526. // Dynamic version of NtWaitLowEventPair
  15527. function NtWaitLowEventPair(
  15528. EventPairHandle : HANDLE
  15529. ): NTSTATUS; stdcall;
  15530. begin
  15531. GetProcedureAddress(_NtWaitLowEventPair, ntdll, 'NtWaitLowEventPair');
  15532. Result := TFNNtWaitLowEventPair(_NtWaitLowEventPair)(
  15533. EventPairHandle
  15534. );
  15535. end;
  15536. // Dynamic version of NtWaitLowEventPair
  15537. function ZwWaitLowEventPair(
  15538. EventPairHandle : HANDLE
  15539. ): NTSTATUS; stdcall;
  15540. begin
  15541. GetProcedureAddress(_NtWaitLowEventPair, ntdll, 'NtWaitLowEventPair');
  15542. Result := TFNNtWaitLowEventPair(_NtWaitLowEventPair)(
  15543. EventPairHandle
  15544. );
  15545. end;
  15546. // Dynamic version of NtWriteFile
  15547. function NtWriteFile(
  15548. FileHandle : HANDLE;
  15549. Event : HANDLE;
  15550. ApcRoutine : PIO_APC_ROUTINE;
  15551. ApcContext : PVOID;
  15552. IoStatusBlock : PIO_STATUS_BLOCK;
  15553. Buffer : PVOID;
  15554. Length : ULONG;
  15555. ByteOffset : PLARGE_INTEGER;
  15556. Key : PULONG
  15557. ): NTSTATUS; stdcall;
  15558. begin
  15559. GetProcedureAddress(_NtWriteFile, ntdll, 'NtWriteFile');
  15560. Result := TFNNtWriteFile(_NtWriteFile)(
  15561. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, Buffer, Length, ByteOffset, Key
  15562. );
  15563. end;
  15564. // Dynamic version of NtWriteFile
  15565. function ZwWriteFile(
  15566. FileHandle : HANDLE;
  15567. Event : HANDLE;
  15568. ApcRoutine : PIO_APC_ROUTINE;
  15569. ApcContext : PVOID;
  15570. IoStatusBlock : PIO_STATUS_BLOCK;
  15571. Buffer : PVOID;
  15572. Length : ULONG;
  15573. ByteOffset : PLARGE_INTEGER;
  15574. Key : PULONG
  15575. ): NTSTATUS; stdcall;
  15576. begin
  15577. GetProcedureAddress(_NtWriteFile, ntdll, 'NtWriteFile');
  15578. Result := TFNNtWriteFile(_NtWriteFile)(
  15579. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, Buffer, Length, ByteOffset, Key
  15580. );
  15581. end;
  15582. // Dynamic version of NtWriteFileGather
  15583. function NtWriteFileGather(
  15584. FileHandle : HANDLE;
  15585. Event : HANDLE;
  15586. ApcRoutine : PIO_APC_ROUTINE;
  15587. ApcContext : PVOID;
  15588. IoStatusBlock : PIO_STATUS_BLOCK;
  15589. Buffer : PFILE_SEGMENT_ELEMENT;
  15590. Length : ULONG;
  15591. ByteOffset : PLARGE_INTEGER;
  15592. Key : PULONG
  15593. ): NTSTATUS; stdcall;
  15594. begin
  15595. GetProcedureAddress(_NtWriteFileGather, ntdll, 'NtWriteFileGather');
  15596. Result := TFNNtWriteFileGather(_NtWriteFileGather)(
  15597. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, Buffer, Length, ByteOffset, Key
  15598. );
  15599. end;
  15600. // Dynamic version of NtWriteFileGather
  15601. function ZwWriteFileGather(
  15602. FileHandle : HANDLE;
  15603. Event : HANDLE;
  15604. ApcRoutine : PIO_APC_ROUTINE;
  15605. ApcContext : PVOID;
  15606. IoStatusBlock : PIO_STATUS_BLOCK;
  15607. Buffer : PFILE_SEGMENT_ELEMENT;
  15608. Length : ULONG;
  15609. ByteOffset : PLARGE_INTEGER;
  15610. Key : PULONG
  15611. ): NTSTATUS; stdcall;
  15612. begin
  15613. GetProcedureAddress(_NtWriteFileGather, ntdll, 'NtWriteFileGather');
  15614. Result := TFNNtWriteFileGather(_NtWriteFileGather)(
  15615. FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, Buffer, Length, ByteOffset, Key
  15616. );
  15617. end;
  15618. // Dynamic version of NtWriteRequestData
  15619. function NtWriteRequestData(
  15620. PortHandle : HANDLE;
  15621. Message : PPORT_MESSAGE;
  15622. Index : ULONG;
  15623. Buffer : PVOID;
  15624. BufferLength : ULONG;
  15625. ReturnLength : PULONG
  15626. ): NTSTATUS; stdcall;
  15627. begin
  15628. GetProcedureAddress(_NtWriteRequestData, ntdll, 'NtWriteRequestData');
  15629. Result := TFNNtWriteRequestData(_NtWriteRequestData)(
  15630. PortHandle, Message, Index, Buffer, BufferLength, ReturnLength
  15631. );
  15632. end;
  15633. // Dynamic version of NtWriteRequestData
  15634. function ZwWriteRequestData(
  15635. PortHandle : HANDLE;
  15636. Message : PPORT_MESSAGE;
  15637. Index : ULONG;
  15638. Buffer : PVOID;
  15639. BufferLength : ULONG;
  15640. ReturnLength : PULONG
  15641. ): NTSTATUS; stdcall;
  15642. begin
  15643. GetProcedureAddress(_NtWriteRequestData, ntdll, 'NtWriteRequestData');
  15644. Result := TFNNtWriteRequestData(_NtWriteRequestData)(
  15645. PortHandle, Message, Index, Buffer, BufferLength, ReturnLength
  15646. );
  15647. end;
  15648. // Dynamic version of NtWriteVirtualMemory
  15649. function NtWriteVirtualMemory(
  15650. ProcessHandle : HANDLE;
  15651. BaseAddress : PVOID;
  15652. Buffer : PVOID;
  15653. BufferLength : ULONG;
  15654. ReturnLength : PULONG
  15655. ): NTSTATUS; stdcall;
  15656. begin
  15657. GetProcedureAddress(_NtWriteVirtualMemory, ntdll, 'NtWriteVirtualMemory');
  15658. Result := TFNNtWriteVirtualMemory(_NtWriteVirtualMemory)(
  15659. ProcessHandle, BaseAddress, Buffer, BufferLength, ReturnLength
  15660. );
  15661. end;
  15662. // Dynamic version of NtWriteVirtualMemory
  15663. function ZwWriteVirtualMemory(
  15664. ProcessHandle : HANDLE;
  15665. BaseAddress : PVOID;
  15666. Buffer : PVOID;
  15667. BufferLength : ULONG;
  15668. ReturnLength : PULONG
  15669. ): NTSTATUS; stdcall;
  15670. begin
  15671. GetProcedureAddress(_NtWriteVirtualMemory, ntdll, 'NtWriteVirtualMemory');
  15672. Result := TFNNtWriteVirtualMemory(_NtWriteVirtualMemory)(
  15673. ProcessHandle, BaseAddress, Buffer, BufferLength, ReturnLength
  15674. );
  15675. end;
  15676. // Dynamic version of NtYieldExecution
  15677. function NtYieldExecution(): NTSTATUS; stdcall;
  15678. begin
  15679. GetProcedureAddress(_NtYieldExecution, ntdll, 'NtYieldExecution');
  15680. Result := TFNNtYieldExecution(_NtYieldExecution)();
  15681. end;
  15682. // Dynamic version of NtYieldExecution
  15683. function ZwYieldExecution(): NTSTATUS; stdcall;
  15684. begin
  15685. GetProcedureAddress(_NtYieldExecution, ntdll, 'NtYieldExecution');
  15686. Result := TFNNtYieldExecution(_NtYieldExecution)();
  15687. end;
  15688. // Dynamic version of RtlAbsoluteToSelfRelativeSD
  15689. function RtlAbsoluteToSelfRelativeSD(
  15690. pAbsoluteSD : PSECURITY_DESCRIPTOR;
  15691. pSelfRelativeSD : PSECURITY_DESCRIPTOR;
  15692. lpdwBufferLength : LPDWORD
  15693. ): NTSTATUS; stdcall;
  15694. begin
  15695. GetProcedureAddress(_RtlAbsoluteToSelfRelativeSD, ntdll, 'RtlAbsoluteToSelfRelativeSD');
  15696. Result := TFNRtlAbsoluteToSelfRelativeSD(_RtlAbsoluteToSelfRelativeSD)(
  15697. pAbsoluteSD, pSelfRelativeSD, lpdwBufferLength
  15698. );
  15699. end;
  15700. // Dynamic version of RtlAcquirePebLock
  15701. procedure RtlAcquirePebLock(); stdcall;
  15702. begin
  15703. GetProcedureAddress(_RtlAcquirePebLock, ntdll, 'RtlAcquirePebLock');
  15704. TFNRtlAcquirePebLock(_RtlAcquirePebLock)();
  15705. end;
  15706. // Dynamic version of RtlAddAccessAllowedAce
  15707. function RtlAddAccessAllowedAce(
  15708. pAcl : PACL;
  15709. dwAceRevision : DWORD;
  15710. AccessMask : ACCESS_MASK;
  15711. pSid : PSID
  15712. ): NTSTATUS; stdcall;
  15713. begin
  15714. GetProcedureAddress(_RtlAddAccessAllowedAce, ntdll, 'RtlAddAccessAllowedAce');
  15715. Result := TFNRtlAddAccessAllowedAce(_RtlAddAccessAllowedAce)(
  15716. pAcl, dwAceRevision, AccessMask, pSid
  15717. );
  15718. end;
  15719. // Dynamic version of RtlAddAccessAllowedAceEx
  15720. function RtlAddAccessAllowedAceEx(
  15721. pAcl : PACL;
  15722. dwAceRevision : DWORD;
  15723. AceFlags : DWORD;
  15724. AccessMask : ACCESS_MASK;
  15725. pSid : PSID
  15726. ): NTSTATUS; stdcall;
  15727. begin
  15728. GetProcedureAddress(_RtlAddAccessAllowedAceEx, ntdll, 'RtlAddAccessAllowedAceEx');
  15729. Result := TFNRtlAddAccessAllowedAceEx(_RtlAddAccessAllowedAceEx)(
  15730. pAcl, dwAceRevision, AceFlags, AccessMask, pSid
  15731. );
  15732. end;
  15733. // Dynamic version of RtlAddAccessDeniedAce
  15734. function RtlAddAccessDeniedAce(
  15735. pAcl : PACL;
  15736. dwAceRevision : DWORD;
  15737. AccessMask : ACCESS_MASK;
  15738. pSid : PSID
  15739. ): NTSTATUS; stdcall;
  15740. begin
  15741. GetProcedureAddress(_RtlAddAccessDeniedAce, ntdll, 'RtlAddAccessDeniedAce');
  15742. Result := TFNRtlAddAccessDeniedAce(_RtlAddAccessDeniedAce)(
  15743. pAcl, dwAceRevision, AccessMask, pSid
  15744. );
  15745. end;
  15746. // Dynamic version of RtlAddAccessDeniedAceEx
  15747. function RtlAddAccessDeniedAceEx(
  15748. pAcl : PACL;
  15749. dwAceRevision : DWORD;
  15750. AceFlags : DWORD;
  15751. AccessMask : ACCESS_MASK;
  15752. pSid : PSID
  15753. ): NTSTATUS; stdcall;
  15754. begin
  15755. GetProcedureAddress(_RtlAddAccessDeniedAceEx, ntdll, 'RtlAddAccessDeniedAceEx');
  15756. Result := TFNRtlAddAccessDeniedAceEx(_RtlAddAccessDeniedAceEx)(
  15757. pAcl, dwAceRevision, AceFlags, AccessMask, pSid
  15758. );
  15759. end;
  15760. // Dynamic version of RtlAddAce
  15761. function RtlAddAce(
  15762. pAcl : PACL;
  15763. dwAceRevision : DWORD;
  15764. dwStartingAceIndex : DWORD;
  15765. pAceList : PVOID;
  15766. nAceListLength : DWORD
  15767. ): NTSTATUS; stdcall;
  15768. begin
  15769. GetProcedureAddress(_RtlAddAce, ntdll, 'RtlAddAce');
  15770. Result := TFNRtlAddAce(_RtlAddAce)(
  15771. pAcl, dwAceRevision, dwStartingAceIndex, pAceList, nAceListLength
  15772. );
  15773. end;
  15774. // Dynamic version of RtlAddAuditAccessAce
  15775. function RtlAddAuditAccessAce(
  15776. pAcl : PACL;
  15777. dwAceRevision : DWORD;
  15778. AccessMask : ACCESS_MASK;
  15779. pSid : PSID;
  15780. bAuditSuccess : BOOLEAN;
  15781. bAuditFailure : BOOLEAN
  15782. ): NTSTATUS; stdcall;
  15783. begin
  15784. GetProcedureAddress(_RtlAddAuditAccessAce, ntdll, 'RtlAddAuditAccessAce');
  15785. Result := TFNRtlAddAuditAccessAce(_RtlAddAuditAccessAce)(
  15786. pAcl, dwAceRevision, AccessMask, pSid, bAuditSuccess, bAuditFailure
  15787. );
  15788. end;
  15789. // Dynamic version of RtlAddAuditAccessAceEx
  15790. function RtlAddAuditAccessAceEx(
  15791. pAcl : PACL;
  15792. dwAceRevision : DWORD;
  15793. AceFlags : DWORD;
  15794. AccessMask : ACCESS_MASK;
  15795. pSid : PSID;
  15796. bAuditSuccess : BOOLEAN;
  15797. bAuditFailure : BOOLEAN
  15798. ): NTSTATUS; stdcall;
  15799. begin
  15800. GetProcedureAddress(_RtlAddAuditAccessAceEx, ntdll, 'RtlAddAuditAccessAceEx');
  15801. Result := TFNRtlAddAuditAccessAceEx(_RtlAddAuditAccessAceEx)(
  15802. pAcl, dwAceRevision, AceFlags, AccessMask, pSid, bAuditSuccess, bAuditFailure
  15803. );
  15804. end;
  15805. // Dynamic version of RtlAddRange
  15806. function RtlAddRange(
  15807. RangeList : PRTL_RANGE_LIST;
  15808. Start : ULONGLONG;
  15809. End_ : ULONGLONG;
  15810. Attributes : UCHAR;
  15811. Flags : ULONG;
  15812. UserData : PVOID;
  15813. Owner : PVOID
  15814. ): NTSTATUS; stdcall;
  15815. begin
  15816. GetProcedureAddress(_RtlAddRange, ntdll, 'RtlAddRange');
  15817. Result := TFNRtlAddRange(_RtlAddRange)(
  15818. RangeList, Start, End_, Attributes, Flags, UserData, Owner
  15819. );
  15820. end;
  15821. // Dynamic version of RtlAddVectoredExceptionHandler
  15822. function RtlAddVectoredExceptionHandler(
  15823. FirstHandler : ULONG;
  15824. VectoredHandler : PVECTORED_EXCEPTION_HANDLER
  15825. ): PVOID; stdcall;
  15826. begin
  15827. GetProcedureAddress(_RtlAddVectoredExceptionHandler, ntdll, 'RtlAddVectoredExceptionHandler');
  15828. Result := TFNRtlAddVectoredExceptionHandler(_RtlAddVectoredExceptionHandler)(
  15829. FirstHandler, VectoredHandler
  15830. );
  15831. end;
  15832. // Dynamic version of RtlAdjustPrivilege
  15833. function RtlAdjustPrivilege(
  15834. Privilege : ULONG;
  15835. Enable : BOOLEAN;
  15836. CurrentThread : BOOLEAN;
  15837. Enabled : PBOOLEAN
  15838. ): NTSTATUS; stdcall;
  15839. begin
  15840. GetProcedureAddress(_RtlAdjustPrivilege, ntdll, 'RtlAdjustPrivilege');
  15841. Result := TFNRtlAdjustPrivilege(_RtlAdjustPrivilege)(
  15842. Privilege, Enable, CurrentThread, Enabled
  15843. );
  15844. end;
  15845. // Dynamic version of RtlAllocateAndInitializeSid
  15846. function RtlAllocateAndInitializeSid(
  15847. pIdentifierAuthority : PSID_IDENTIFIER_AUTHORITY;
  15848. SubAuthorityCount : BYTE;
  15849. nSubAuthority0 : DWORD;
  15850. nSubAuthority1 : DWORD;
  15851. nSubAuthority2 : DWORD;
  15852. nSubAuthority3 : DWORD;
  15853. nSubAuthority4 : DWORD;
  15854. nSubAuthority5 : DWORD;
  15855. nSubAuthority6 : DWORD;
  15856. nSubAuthority7 : DWORD;
  15857. var pSid : PSID
  15858. ): BOOL; stdcall;
  15859. begin
  15860. GetProcedureAddress(_RtlAllocateAndInitializeSid, ntdll, 'RtlAllocateAndInitializeSid');
  15861. Result := TFNRtlAllocateAndInitializeSid(_RtlAllocateAndInitializeSid)(
  15862. pIdentifierAuthority, SubAuthorityCount, nSubAuthority0, nSubAuthority1, nSubAuthority2, nSubAuthority3, nSubAuthority4, nSubAuthority5, nSubAuthority6, nSubAuthority7, pSid
  15863. );
  15864. end;
  15865. // Dynamic version of RtlAllocateHeap
  15866. function RtlAllocateHeap(
  15867. hHeap : HANDLE;
  15868. dwFlags : ULONG;
  15869. Size : ULONG
  15870. ): PVOID; stdcall;
  15871. begin
  15872. GetProcedureAddress(_RtlAllocateHeap, ntdll, 'RtlAllocateHeap');
  15873. Result := TFNRtlAllocateHeap(_RtlAllocateHeap)(
  15874. hHeap, dwFlags, Size
  15875. );
  15876. end;
  15877. // Dynamic version of RtlAnsiCharToUnicodeChar
  15878. function RtlAnsiCharToUnicodeChar(
  15879. AnsiChar : CHAR
  15880. ): WCHAR; stdcall;
  15881. begin
  15882. GetProcedureAddress(_RtlAnsiCharToUnicodeChar, ntdll, 'RtlAnsiCharToUnicodeChar');
  15883. Result := TFNRtlAnsiCharToUnicodeChar(_RtlAnsiCharToUnicodeChar)(
  15884. AnsiChar
  15885. );
  15886. end;
  15887. // Dynamic version of RtlAnsiStringToUnicodeSize
  15888. function RtlAnsiStringToUnicodeSize(
  15889. AnsiString : PANSI_STRING
  15890. ): ULONG; stdcall;
  15891. begin
  15892. GetProcedureAddress(_RtlAnsiStringToUnicodeSize, ntdll, 'RtlAnsiStringToUnicodeSize');
  15893. Result := TFNRtlAnsiStringToUnicodeSize(_RtlAnsiStringToUnicodeSize)(
  15894. AnsiString
  15895. );
  15896. end;
  15897. // Dynamic version of RtlAnsiStringToUnicodeString
  15898. function RtlAnsiStringToUnicodeString(
  15899. DestinationString : PUNICODE_STRING;
  15900. SourceString : PANSI_STRING;
  15901. AllocateDestinationString : BOOLEAN
  15902. ): NTSTATUS; stdcall;
  15903. begin
  15904. GetProcedureAddress(_RtlAnsiStringToUnicodeString, ntdll, 'RtlAnsiStringToUnicodeString');
  15905. Result := TFNRtlAnsiStringToUnicodeString(_RtlAnsiStringToUnicodeString)(
  15906. DestinationString, SourceString, AllocateDestinationString
  15907. );
  15908. end;
  15909. // Dynamic version of RtlAppendAsciizToString
  15910. function RtlAppendAsciizToString(
  15911. DestinationString : PSTRING;
  15912. AppendThisString : LPCSTR
  15913. ): NTSTATUS; stdcall;
  15914. begin
  15915. GetProcedureAddress(_RtlAppendAsciizToString, ntdll, 'RtlAppendAsciizToString');
  15916. Result := TFNRtlAppendAsciizToString(_RtlAppendAsciizToString)(
  15917. DestinationString, AppendThisString
  15918. );
  15919. end;
  15920. // Dynamic version of RtlAppendStringToString
  15921. function RtlAppendStringToString(
  15922. DestinationString : PSTRING;
  15923. AppendThisString : PSTRING
  15924. ): NTSTATUS; stdcall;
  15925. begin
  15926. GetProcedureAddress(_RtlAppendStringToString, ntdll, 'RtlAppendStringToString');
  15927. Result := TFNRtlAppendStringToString(_RtlAppendStringToString)(
  15928. DestinationString, AppendThisString
  15929. );
  15930. end;
  15931. // Dynamic version of RtlAppendUnicodeStringToString
  15932. function RtlAppendUnicodeStringToString(
  15933. DestinationString : PUNICODE_STRING;
  15934. SourceString : PUNICODE_STRING
  15935. ): NTSTATUS; stdcall;
  15936. begin
  15937. GetProcedureAddress(_RtlAppendUnicodeStringToString, ntdll, 'RtlAppendUnicodeStringToString');
  15938. Result := TFNRtlAppendUnicodeStringToString(_RtlAppendUnicodeStringToString)(
  15939. DestinationString, SourceString
  15940. );
  15941. end;
  15942. // Dynamic version of RtlAppendUnicodeToString
  15943. function RtlAppendUnicodeToString(
  15944. Destination : PUNICODE_STRING;
  15945. Source : LPCWSTR
  15946. ): NTSTATUS; stdcall;
  15947. begin
  15948. GetProcedureAddress(_RtlAppendUnicodeToString, ntdll, 'RtlAppendUnicodeToString');
  15949. Result := TFNRtlAppendUnicodeToString(_RtlAppendUnicodeToString)(
  15950. Destination, Source
  15951. );
  15952. end;
  15953. // Dynamic version of RtlAreAllAccessesGranted
  15954. function RtlAreAllAccessesGranted(
  15955. GrantedAccess : ACCESS_MASK;
  15956. WantedAccess : ACCESS_MASK
  15957. ): BOOLEAN; stdcall;
  15958. begin
  15959. GetProcedureAddress(_RtlAreAllAccessesGranted, ntdll, 'RtlAreAllAccessesGranted');
  15960. Result := TFNRtlAreAllAccessesGranted(_RtlAreAllAccessesGranted)(
  15961. GrantedAccess, WantedAccess
  15962. );
  15963. end;
  15964. // Dynamic version of RtlAreAnyAccessesGranted
  15965. function RtlAreAnyAccessesGranted(
  15966. GrantedAccess : ACCESS_MASK;
  15967. WantedAccess : ACCESS_MASK
  15968. ): BOOLEAN; stdcall;
  15969. begin
  15970. GetProcedureAddress(_RtlAreAnyAccessesGranted, ntdll, 'RtlAreAnyAccessesGranted');
  15971. Result := TFNRtlAreAnyAccessesGranted(_RtlAreAnyAccessesGranted)(
  15972. GrantedAccess, WantedAccess
  15973. );
  15974. end;
  15975. // Dynamic version of RtlAreBitsClear
  15976. function RtlAreBitsClear(
  15977. BitMapHeader : PRTL_BITMAP;
  15978. StartingIndex : ULONG;
  15979. Length : ULONG
  15980. ): BOOLEAN; stdcall;
  15981. begin
  15982. GetProcedureAddress(_RtlAreBitsClear, ntdll, 'RtlAreBitsClear');
  15983. Result := TFNRtlAreBitsClear(_RtlAreBitsClear)(
  15984. BitMapHeader, StartingIndex, Length
  15985. );
  15986. end;
  15987. // Dynamic version of RtlAreBitsSet
  15988. function RtlAreBitsSet(
  15989. BitMapHeader : PRTL_BITMAP;
  15990. StartingIndex : ULONG;
  15991. Length : ULONG
  15992. ): BOOLEAN; stdcall;
  15993. begin
  15994. GetProcedureAddress(_RtlAreBitsSet, ntdll, 'RtlAreBitsSet');
  15995. Result := TFNRtlAreBitsSet(_RtlAreBitsSet)(
  15996. BitMapHeader, StartingIndex, Length
  15997. );
  15998. end;
  15999. // Dynamic version of RtlAssert
  16000. procedure RtlAssert(
  16001. FailedAssertion : PVOID;
  16002. FileName : PVOID;
  16003. LineNumber : ULONG;
  16004. Message : PCHAR
  16005. ); stdcall;
  16006. begin
  16007. GetProcedureAddress(_RtlAssert, ntdll, 'RtlAssert');
  16008. TFNRtlAssert(_RtlAssert)(
  16009. FailedAssertion, FileName, LineNumber, Message
  16010. );
  16011. end;
  16012. // Dynamic version of RtlCaptureContext
  16013. procedure RtlCaptureContext(
  16014. ContextRecord : PCONTEXT
  16015. ); stdcall;
  16016. begin
  16017. GetProcedureAddress(_RtlCaptureContext, ntdll, 'RtlCaptureContext');
  16018. TFNRtlCaptureContext(_RtlCaptureContext)(
  16019. ContextRecord
  16020. );
  16021. end;
  16022. // Dynamic version of RtlCharToInteger
  16023. function RtlCharToInteger(
  16024. Str : PCSZ;
  16025. Base : ULONG;
  16026. Value : PULONG
  16027. ): NTSTATUS; stdcall;
  16028. begin
  16029. GetProcedureAddress(_RtlCharToInteger, ntdll, 'RtlCharToInteger');
  16030. Result := TFNRtlCharToInteger(_RtlCharToInteger)(
  16031. Str, Base, Value
  16032. );
  16033. end;
  16034. // Dynamic version of RtlCheckForOrphanedCriticalSections
  16035. procedure RtlCheckForOrphanedCriticalSections(
  16036. hThread : HANDLE
  16037. ); stdcall;
  16038. begin
  16039. GetProcedureAddress(_RtlCheckForOrphanedCriticalSections, ntdll, 'RtlCheckForOrphanedCriticalSections');
  16040. TFNRtlCheckForOrphanedCriticalSections(_RtlCheckForOrphanedCriticalSections)(
  16041. hThread
  16042. );
  16043. end;
  16044. // Dynamic version of RtlCheckRegistryKey
  16045. function RtlCheckRegistryKey(
  16046. RelativeTo : ULONG;
  16047. Path : PWSTR
  16048. ): NTSTATUS; stdcall;
  16049. begin
  16050. GetProcedureAddress(_RtlCheckRegistryKey, ntdll, 'RtlCheckRegistryKey');
  16051. Result := TFNRtlCheckRegistryKey(_RtlCheckRegistryKey)(
  16052. RelativeTo, Path
  16053. );
  16054. end;
  16055. // Dynamic version of RtlClearAllBits
  16056. procedure RtlClearAllBits(
  16057. BitMapHeader : PRTL_BITMAP
  16058. ); stdcall;
  16059. begin
  16060. GetProcedureAddress(_RtlClearAllBits, ntdll, 'RtlClearAllBits');
  16061. TFNRtlClearAllBits(_RtlClearAllBits)(
  16062. BitMapHeader
  16063. );
  16064. end;
  16065. // Dynamic version of RtlClearBits
  16066. procedure RtlClearBits(
  16067. BitMapHeader : PRTL_BITMAP;
  16068. StartingIndex : ULONG;
  16069. NumberToClear : ULONG
  16070. ); stdcall;
  16071. begin
  16072. GetProcedureAddress(_RtlClearBits, ntdll, 'RtlClearBits');
  16073. TFNRtlClearBits(_RtlClearBits)(
  16074. BitMapHeader, StartingIndex, NumberToClear
  16075. );
  16076. end;
  16077. // Dynamic version of RtlCompactHeap
  16078. function RtlCompactHeap(
  16079. hHeap : HANDLE;
  16080. dwFlags : ULONG
  16081. ): ULONG; stdcall;
  16082. begin
  16083. GetProcedureAddress(_RtlCompactHeap, ntdll, 'RtlCompactHeap');
  16084. Result := TFNRtlCompactHeap(_RtlCompactHeap)(
  16085. hHeap, dwFlags
  16086. );
  16087. end;
  16088. // Dynamic version of RtlCompareMemory
  16089. function RtlCompareMemory(
  16090. Source1 : PVOID;
  16091. Source2 : PVOID;
  16092. Length : SIZE_T
  16093. ): SIZE_T; stdcall;
  16094. begin
  16095. GetProcedureAddress(_RtlCompareMemory, ntdll, 'RtlCompareMemory');
  16096. Result := TFNRtlCompareMemory(_RtlCompareMemory)(
  16097. Source1, Source2, Length
  16098. );
  16099. end;
  16100. // Dynamic version of RtlCompareMemoryUlong
  16101. function RtlCompareMemoryUlong(
  16102. Source : PVOID;
  16103. Length : ULONG;
  16104. Value : ULONG
  16105. ): ULONG; stdcall;
  16106. begin
  16107. GetProcedureAddress(_RtlCompareMemoryUlong, ntdll, 'RtlCompareMemoryUlong');
  16108. Result := TFNRtlCompareMemoryUlong(_RtlCompareMemoryUlong)(
  16109. Source, Length, Value
  16110. );
  16111. end;
  16112. // Dynamic version of RtlCompareString
  16113. function RtlCompareString(
  16114. String1 : PSTRING;
  16115. String2 : PSTRING;
  16116. CaseInsensitive : BOOLEAN
  16117. ): LONG; stdcall;
  16118. begin
  16119. GetProcedureAddress(_RtlCompareString, ntdll, 'RtlCompareString');
  16120. Result := TFNRtlCompareString(_RtlCompareString)(
  16121. String1, String2, CaseInsensitive
  16122. );
  16123. end;
  16124. // Dynamic version of RtlCompareUnicodeString
  16125. function RtlCompareUnicodeString(
  16126. String1 : PUNICODE_STRING;
  16127. String2 : PUNICODE_STRING;
  16128. CaseInsensitive : BOOLEAN
  16129. ): LONG; stdcall;
  16130. begin
  16131. GetProcedureAddress(_RtlCompareUnicodeString, ntdll, 'RtlCompareUnicodeString');
  16132. Result := TFNRtlCompareUnicodeString(_RtlCompareUnicodeString)(
  16133. String1, String2, CaseInsensitive
  16134. );
  16135. end;
  16136. // Dynamic version of RtlConvertLongToLargeInteger
  16137. function RtlConvertLongToLargeInteger(
  16138. SignedInteger : LONG
  16139. ): LARGE_INTEGER; stdcall;
  16140. begin
  16141. GetProcedureAddress(_RtlConvertLongToLargeInteger, ntdll, 'RtlConvertLongToLargeInteger');
  16142. Result := TFNRtlConvertLongToLargeInteger(_RtlConvertLongToLargeInteger)(
  16143. SignedInteger
  16144. );
  16145. end;
  16146. // Dynamic version of RtlConvertSidToUnicodeString
  16147. function RtlConvertSidToUnicodeString(
  16148. UnicodeString : PUNICODE_STRING;
  16149. Sid : PSID;
  16150. AllocateDestinationString : BOOLEAN
  16151. ): NTSTATUS; stdcall;
  16152. begin
  16153. GetProcedureAddress(_RtlConvertSidToUnicodeString, ntdll, 'RtlConvertSidToUnicodeString');
  16154. Result := TFNRtlConvertSidToUnicodeString(_RtlConvertSidToUnicodeString)(
  16155. UnicodeString, Sid, AllocateDestinationString
  16156. );
  16157. end;
  16158. // Dynamic version of RtlConvertUlongToLargeInteger
  16159. function RtlConvertUlongToLargeInteger(
  16160. UnsignedInteger : ULONG
  16161. ): LARGE_INTEGER; stdcall;
  16162. begin
  16163. GetProcedureAddress(_RtlConvertUlongToLargeInteger, ntdll, 'RtlConvertUlongToLargeInteger');
  16164. Result := TFNRtlConvertUlongToLargeInteger(_RtlConvertUlongToLargeInteger)(
  16165. UnsignedInteger
  16166. );
  16167. end;
  16168. // Dynamic version of RtlCopyLuid
  16169. procedure RtlCopyLuid(
  16170. Destination : PLUID;
  16171. Source : PLUID
  16172. ); stdcall;
  16173. begin
  16174. GetProcedureAddress(_RtlCopyLuid, ntdll, 'RtlCopyLuid');
  16175. TFNRtlCopyLuid(_RtlCopyLuid)(
  16176. Destination, Source
  16177. );
  16178. end;
  16179. // Dynamic version of RtlCopyRangeList
  16180. function RtlCopyRangeList(
  16181. CopyRangeList : PRTL_RANGE_LIST;
  16182. RangeList : PRTL_RANGE_LIST
  16183. ): NTSTATUS; stdcall;
  16184. begin
  16185. GetProcedureAddress(_RtlCopyRangeList, ntdll, 'RtlCopyRangeList');
  16186. Result := TFNRtlCopyRangeList(_RtlCopyRangeList)(
  16187. CopyRangeList, RangeList
  16188. );
  16189. end;
  16190. // Dynamic version of RtlCopySecurityDescriptor
  16191. function RtlCopySecurityDescriptor(
  16192. Source : PSECURITY_DESCRIPTOR;
  16193. var Destination : PSECURITY_DESCRIPTOR
  16194. ): NTSTATUS; stdcall;
  16195. begin
  16196. GetProcedureAddress(_RtlCopySecurityDescriptor, ntdll, 'RtlCopySecurityDescriptor');
  16197. Result := TFNRtlCopySecurityDescriptor(_RtlCopySecurityDescriptor)(
  16198. Source, Destination
  16199. );
  16200. end;
  16201. // Dynamic version of RtlCopySid
  16202. function RtlCopySid(
  16203. DestinationLength : ULONG;
  16204. Destination : PSID;
  16205. Source : PSID
  16206. ): NTSTATUS; stdcall;
  16207. begin
  16208. GetProcedureAddress(_RtlCopySid, ntdll, 'RtlCopySid');
  16209. Result := TFNRtlCopySid(_RtlCopySid)(
  16210. DestinationLength, Destination, Source
  16211. );
  16212. end;
  16213. // Dynamic version of RtlCopyString
  16214. procedure RtlCopyString(
  16215. DestinationString : PSTRING;
  16216. SourceString : PSTRING
  16217. ); stdcall;
  16218. begin
  16219. GetProcedureAddress(_RtlCopyString, ntdll, 'RtlCopyString');
  16220. TFNRtlCopyString(_RtlCopyString)(
  16221. DestinationString, SourceString
  16222. );
  16223. end;
  16224. // Dynamic version of RtlCopyUnicodeString
  16225. procedure RtlCopyUnicodeString(
  16226. DestinationString : PUNICODE_STRING;
  16227. SourceString : PUNICODE_STRING
  16228. ); stdcall;
  16229. begin
  16230. GetProcedureAddress(_RtlCopyUnicodeString, ntdll, 'RtlCopyUnicodeString');
  16231. TFNRtlCopyUnicodeString(_RtlCopyUnicodeString)(
  16232. DestinationString, SourceString
  16233. );
  16234. end;
  16235. // Dynamic version of RtlCreateAcl
  16236. function RtlCreateAcl(
  16237. pAcl : PACL;
  16238. nAclLength : DWORD;
  16239. dwAclRevision : DWORD
  16240. ): NTSTATUS; stdcall;
  16241. begin
  16242. GetProcedureAddress(_RtlCreateAcl, ntdll, 'RtlCreateAcl');
  16243. Result := TFNRtlCreateAcl(_RtlCreateAcl)(
  16244. pAcl, nAclLength, dwAclRevision
  16245. );
  16246. end;
  16247. // Dynamic version of RtlCreateHeap
  16248. function RtlCreateHeap(
  16249. dwOptions : ULONG;
  16250. Base : PVOID;
  16251. dwMaximumSize : SIZE_T;
  16252. dwInitialSize : SIZE_T;
  16253. UnknownOptional1 : PVOID;
  16254. UnknownOptional2 : PVOID
  16255. ): HANDLE; stdcall;
  16256. begin
  16257. GetProcedureAddress(_RtlCreateHeap, ntdll, 'RtlCreateHeap');
  16258. Result := TFNRtlCreateHeap(_RtlCreateHeap)(
  16259. dwOptions, Base, dwMaximumSize, dwInitialSize, UnknownOptional1, UnknownOptional2
  16260. );
  16261. end;
  16262. // Dynamic version of RtlCreateProcessParameters
  16263. function RtlCreateProcessParameters(
  16264. ProcessParameters : PPRTL_USER_PROCESS_PARAMETERS;
  16265. ImageFile : PUNICODE_STRING;
  16266. DllPath : PUNICODE_STRING;
  16267. CurrentDirectory : PUNICODE_STRING;
  16268. CommandLine : PUNICODE_STRING;
  16269. CreationFlags : ULONG;
  16270. WindowTitle : PUNICODE_STRING;
  16271. Desktop : PUNICODE_STRING;
  16272. Reserved : PUNICODE_STRING;
  16273. Reserved2 : PUNICODE_STRING
  16274. ): NTSTATUS; stdcall;
  16275. begin
  16276. GetProcedureAddress(_RtlCreateProcessParameters, ntdll, 'RtlCreateProcessParameters');
  16277. Result := TFNRtlCreateProcessParameters(_RtlCreateProcessParameters)(
  16278. ProcessParameters, ImageFile, DllPath, CurrentDirectory, CommandLine, CreationFlags, WindowTitle, Desktop, Reserved, Reserved2
  16279. );
  16280. end;
  16281. // Dynamic version of RtlCreateQueryDebugBuffer
  16282. function RtlCreateQueryDebugBuffer(
  16283. Size : ULONG;
  16284. EventPair : BOOLEAN
  16285. ): PDEBUG_BUFFER; stdcall;
  16286. begin
  16287. GetProcedureAddress(_RtlCreateQueryDebugBuffer, ntdll, 'RtlCreateQueryDebugBuffer');
  16288. Result := TFNRtlCreateQueryDebugBuffer(_RtlCreateQueryDebugBuffer)(
  16289. Size, EventPair
  16290. );
  16291. end;
  16292. // Dynamic version of RtlCreateRegistryKey
  16293. function RtlCreateRegistryKey(
  16294. RelativeTo : ULONG;
  16295. Path : PWSTR
  16296. ): NTSTATUS; stdcall;
  16297. begin
  16298. GetProcedureAddress(_RtlCreateRegistryKey, ntdll, 'RtlCreateRegistryKey');
  16299. Result := TFNRtlCreateRegistryKey(_RtlCreateRegistryKey)(
  16300. RelativeTo, Path
  16301. );
  16302. end;
  16303. // Dynamic version of RtlCreateSecurityDescriptor
  16304. function RtlCreateSecurityDescriptor(
  16305. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  16306. Revision : ULONG
  16307. ): NTSTATUS; stdcall;
  16308. begin
  16309. GetProcedureAddress(_RtlCreateSecurityDescriptor, ntdll, 'RtlCreateSecurityDescriptor');
  16310. Result := TFNRtlCreateSecurityDescriptor(_RtlCreateSecurityDescriptor)(
  16311. SecurityDescriptor, Revision
  16312. );
  16313. end;
  16314. // Dynamic version of RtlCreateUnicodeString
  16315. function RtlCreateUnicodeString(
  16316. DestinationString : PUNICODE_STRING;
  16317. SourceString : PWSTR
  16318. ): BOOLEAN; stdcall;
  16319. begin
  16320. GetProcedureAddress(_RtlCreateUnicodeString, ntdll, 'RtlCreateUnicodeString');
  16321. Result := TFNRtlCreateUnicodeString(_RtlCreateUnicodeString)(
  16322. DestinationString, SourceString
  16323. );
  16324. end;
  16325. // Dynamic version of RtlCreateUnicodeStringFromAsciiz
  16326. function RtlCreateUnicodeStringFromAsciiz(
  16327. DestinationString : PUNICODE_STRING;
  16328. SourceString : PCHAR
  16329. ): BOOLEAN; stdcall;
  16330. begin
  16331. GetProcedureAddress(_RtlCreateUnicodeStringFromAsciiz, ntdll, 'RtlCreateUnicodeStringFromAsciiz');
  16332. Result := TFNRtlCreateUnicodeStringFromAsciiz(_RtlCreateUnicodeStringFromAsciiz)(
  16333. DestinationString, SourceString
  16334. );
  16335. end;
  16336. // Dynamic version of RtlCreateUserProcess
  16337. function RtlCreateUserProcess(
  16338. ImageFileName : PUNICODE_STRING;
  16339. Attributes : ULONG;
  16340. ProcessParameters : PRTL_USER_PROCESS_PARAMETERS;
  16341. ProcessSecurityDescriptor : PSECURITY_DESCRIPTOR;
  16342. ThreadSecurityDescriptor : PSECURITY_DESCRIPTOR;
  16343. ParentProcess : HANDLE;
  16344. InheritHandles : BOOLEAN;
  16345. DebugPort : HANDLE;
  16346. ExceptionPort : HANDLE;
  16347. ProcessInfo : PRTL_PROCESS_INFORMATION
  16348. ): NTSTATUS; stdcall;
  16349. begin
  16350. GetProcedureAddress(_RtlCreateUserProcess, ntdll, 'RtlCreateUserProcess');
  16351. Result := TFNRtlCreateUserProcess(_RtlCreateUserProcess)(
  16352. ImageFileName, Attributes, ProcessParameters, ProcessSecurityDescriptor, ThreadSecurityDescriptor, ParentProcess, InheritHandles, DebugPort, ExceptionPort, ProcessInfo
  16353. );
  16354. end;
  16355. // Dynamic version of RtlCreateUserThread
  16356. function RtlCreateUserThread(
  16357. hProcess : HANDLE;
  16358. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  16359. CreateSuspended : BOOLEAN;
  16360. StackZeroBits : ULONG;
  16361. StackReserve : ULONG;
  16362. StackCommit : ULONG;
  16363. lpStartAddress : PTHREAD_START_ROUTINE;
  16364. lpParameter : PVOID;
  16365. phThread : PHANDLE;
  16366. ClientId : PCLIENT_ID
  16367. ): NTSTATUS; stdcall;
  16368. begin
  16369. GetProcedureAddress(_RtlCreateUserThread, ntdll, 'RtlCreateUserThread');
  16370. Result := TFNRtlCreateUserThread(_RtlCreateUserThread)(
  16371. hProcess, SecurityDescriptor, CreateSuspended, StackZeroBits, StackReserve, StackCommit, lpStartAddress, lpParameter, phThread, ClientId
  16372. );
  16373. end;
  16374. // Dynamic version of RtlCutoverTimeToSystemTime
  16375. function RtlCutoverTimeToSystemTime(
  16376. TargetTimeFields : PTIME_FIELDS;
  16377. Time : PLARGE_INTEGER;
  16378. CurrentTime : PLARGE_INTEGER;
  16379. bUnknown : BOOLEAN
  16380. ): BOOLEAN; stdcall;
  16381. begin
  16382. GetProcedureAddress(_RtlCutoverTimeToSystemTime, ntdll, 'RtlCutoverTimeToSystemTime');
  16383. Result := TFNRtlCutoverTimeToSystemTime(_RtlCutoverTimeToSystemTime)(
  16384. TargetTimeFields, Time, CurrentTime, bUnknown
  16385. );
  16386. end;
  16387. // Dynamic version of RtlDeNormalizeProcessParams
  16388. function RtlDeNormalizeProcessParams(
  16389. ProcessParameters : PRTL_USER_PROCESS_PARAMETERS
  16390. ): PRTL_USER_PROCESS_PARAMETERS; stdcall;
  16391. begin
  16392. GetProcedureAddress(_RtlDeNormalizeProcessParams, ntdll, 'RtlDeNormalizeProcessParams');
  16393. Result := TFNRtlDeNormalizeProcessParams(_RtlDeNormalizeProcessParams)(
  16394. ProcessParameters
  16395. );
  16396. end;
  16397. // Dynamic version of RtlDeleteAce
  16398. function RtlDeleteAce(
  16399. pAcl : PACL;
  16400. dwAceIndex : DWORD
  16401. ): NTSTATUS; stdcall;
  16402. begin
  16403. GetProcedureAddress(_RtlDeleteAce, ntdll, 'RtlDeleteAce');
  16404. Result := TFNRtlDeleteAce(_RtlDeleteAce)(
  16405. pAcl, dwAceIndex
  16406. );
  16407. end;
  16408. // Dynamic version of RtlDeleteCriticalSection
  16409. procedure RtlDeleteCriticalSection(
  16410. lpCriticalSection : PRTL_CRITICAL_SECTION
  16411. ); stdcall;
  16412. begin
  16413. GetProcedureAddress(_RtlDeleteCriticalSection, ntdll, 'RtlDeleteCriticalSection');
  16414. TFNRtlDeleteCriticalSection(_RtlDeleteCriticalSection)(
  16415. lpCriticalSection
  16416. );
  16417. end;
  16418. // Dynamic version of RtlDeleteOwnersRanges
  16419. function RtlDeleteOwnersRanges(
  16420. RangeList : PRTL_RANGE_LIST;
  16421. Owner : PVOID
  16422. ): NTSTATUS; stdcall;
  16423. begin
  16424. GetProcedureAddress(_RtlDeleteOwnersRanges, ntdll, 'RtlDeleteOwnersRanges');
  16425. Result := TFNRtlDeleteOwnersRanges(_RtlDeleteOwnersRanges)(
  16426. RangeList, Owner
  16427. );
  16428. end;
  16429. // Dynamic version of RtlDeleteRange
  16430. function RtlDeleteRange(
  16431. RangeList : PRTL_RANGE_LIST;
  16432. Start : ULONGLONG;
  16433. End_ : ULONGLONG;
  16434. Owner : PVOID
  16435. ): NTSTATUS; stdcall;
  16436. begin
  16437. GetProcedureAddress(_RtlDeleteRange, ntdll, 'RtlDeleteRange');
  16438. Result := TFNRtlDeleteRange(_RtlDeleteRange)(
  16439. RangeList, Start, End_, Owner
  16440. );
  16441. end;
  16442. // Dynamic version of RtlDeleteRegistryValue
  16443. function RtlDeleteRegistryValue(
  16444. RelativeTo : ULONG;
  16445. Path : LPCWSTR;
  16446. ValueName : LPCWSTR
  16447. ): NTSTATUS; stdcall;
  16448. begin
  16449. GetProcedureAddress(_RtlDeleteRegistryValue, ntdll, 'RtlDeleteRegistryValue');
  16450. Result := TFNRtlDeleteRegistryValue(_RtlDeleteRegistryValue)(
  16451. RelativeTo, Path, ValueName
  16452. );
  16453. end;
  16454. // Dynamic version of RtlDestroyHeap
  16455. function RtlDestroyHeap(
  16456. HeapHandle : HANDLE
  16457. ): HANDLE; stdcall;
  16458. begin
  16459. GetProcedureAddress(_RtlDestroyHeap, ntdll, 'RtlDestroyHeap');
  16460. Result := TFNRtlDestroyHeap(_RtlDestroyHeap)(
  16461. HeapHandle
  16462. );
  16463. end;
  16464. // Dynamic version of RtlDestroyProcessParameters
  16465. function RtlDestroyProcessParameters(
  16466. ProcessParameters : PRTL_USER_PROCESS_PARAMETERS
  16467. ): NTSTATUS; stdcall;
  16468. begin
  16469. GetProcedureAddress(_RtlDestroyProcessParameters, ntdll, 'RtlDestroyProcessParameters');
  16470. Result := TFNRtlDestroyProcessParameters(_RtlDestroyProcessParameters)(
  16471. ProcessParameters
  16472. );
  16473. end;
  16474. // Dynamic version of RtlDestroyQueryDebugBuffer
  16475. function RtlDestroyQueryDebugBuffer(
  16476. DebugBuffer : PDEBUG_BUFFER
  16477. ): NTSTATUS; stdcall;
  16478. begin
  16479. GetProcedureAddress(_RtlDestroyQueryDebugBuffer, ntdll, 'RtlDestroyQueryDebugBuffer');
  16480. Result := TFNRtlDestroyQueryDebugBuffer(_RtlDestroyQueryDebugBuffer)(
  16481. DebugBuffer
  16482. );
  16483. end;
  16484. // Dynamic version of RtlDetermineDosPathNameType_U
  16485. function RtlDetermineDosPathNameType_U(
  16486. wcsPathNameType : PWSTR
  16487. ): ULONG; stdcall;
  16488. begin
  16489. GetProcedureAddress(_RtlDetermineDosPathNameType_U, ntdll, 'RtlDetermineDosPathNameType_U');
  16490. Result := TFNRtlDetermineDosPathNameType_U(_RtlDetermineDosPathNameType_U)(
  16491. wcsPathNameType
  16492. );
  16493. end;
  16494. // Dynamic version of RtlDnsHostNameToComputerName
  16495. function RtlDnsHostNameToComputerName(
  16496. ComputerName : PUNICODE_STRING;
  16497. DnsName : PUNICODE_STRING;
  16498. AllocateComputerNameString : BOOLEAN
  16499. ): NTSTATUS; stdcall;
  16500. begin
  16501. GetProcedureAddress(_RtlDnsHostNameToComputerName, ntdll, 'RtlDnsHostNameToComputerName');
  16502. Result := TFNRtlDnsHostNameToComputerName(_RtlDnsHostNameToComputerName)(
  16503. ComputerName, DnsName, AllocateComputerNameString
  16504. );
  16505. end;
  16506. // Dynamic version of RtlDoesFileExists_U
  16507. function RtlDoesFileExists_U(
  16508. FileName : PWSTR
  16509. ): BOOLEAN; stdcall;
  16510. begin
  16511. GetProcedureAddress(_RtlDoesFileExists_U, ntdll, 'RtlDoesFileExists_U');
  16512. Result := TFNRtlDoesFileExists_U(_RtlDoesFileExists_U)(
  16513. FileName
  16514. );
  16515. end;
  16516. // Dynamic version of RtlDosPathNameToNtPathName_U
  16517. function RtlDosPathNameToNtPathName_U(
  16518. DosName : PWSTR;
  16519. var NtName : UNICODE_STRING;
  16520. DosFilePath : PPWSTR;
  16521. NtFilePath : PUNICODE_STRING
  16522. ): BOOLEAN; stdcall;
  16523. begin
  16524. GetProcedureAddress(_RtlDosPathNameToNtPathName_U, ntdll, 'RtlDosPathNameToNtPathName_U');
  16525. Result := TFNRtlDosPathNameToNtPathName_U(_RtlDosPathNameToNtPathName_U)(
  16526. DosName, NtName, DosFilePath, NtFilePath
  16527. );
  16528. end;
  16529. // Dynamic version of RtlDosSearchPath_U
  16530. function RtlDosSearchPath_U(
  16531. SearchPath : PWSTR;
  16532. Name : PWSTR;
  16533. Ext : PWSTR;
  16534. cbBuf : ULONG;
  16535. Buffer : PWSTR;
  16536. var Shortname : PWSTR
  16537. ): ULONG; stdcall;
  16538. begin
  16539. GetProcedureAddress(_RtlDosSearchPath_U, ntdll, 'RtlDosSearchPath_U');
  16540. Result := TFNRtlDosSearchPath_U(_RtlDosSearchPath_U)(
  16541. SearchPath, Name, Ext, cbBuf, Buffer, Shortname
  16542. );
  16543. end;
  16544. // Dynamic version of RtlDowncaseUnicodeChar
  16545. function RtlDowncaseUnicodeChar(
  16546. Source : WCHAR
  16547. ): WCHAR; stdcall;
  16548. begin
  16549. GetProcedureAddress(_RtlDowncaseUnicodeChar, ntdll, 'RtlDowncaseUnicodeChar');
  16550. Result := TFNRtlDowncaseUnicodeChar(_RtlDowncaseUnicodeChar)(
  16551. Source
  16552. );
  16553. end;
  16554. // Dynamic version of RtlDowncaseUnicodeString
  16555. function RtlDowncaseUnicodeString(
  16556. DestinationString : PUNICODE_STRING;
  16557. SourceString : PUNICODE_STRING;
  16558. AllocateDestinationString : BOOLEAN
  16559. ): NTSTATUS; stdcall;
  16560. begin
  16561. GetProcedureAddress(_RtlDowncaseUnicodeString, ntdll, 'RtlDowncaseUnicodeString');
  16562. Result := TFNRtlDowncaseUnicodeString(_RtlDowncaseUnicodeString)(
  16563. DestinationString, SourceString, AllocateDestinationString
  16564. );
  16565. end;
  16566. // Dynamic version of RtlDuplicateUnicodeString
  16567. function RtlDuplicateUnicodeString(
  16568. AddTerminatingZero : ULONG;
  16569. Source : PUNICODE_STRING;
  16570. Destination : PUNICODE_STRING
  16571. ): NTSTATUS; stdcall;
  16572. begin
  16573. GetProcedureAddress(_RtlDuplicateUnicodeString, ntdll, 'RtlDuplicateUnicodeString');
  16574. Result := TFNRtlDuplicateUnicodeString(_RtlDuplicateUnicodeString)(
  16575. AddTerminatingZero, Source, Destination
  16576. );
  16577. end;
  16578. // Dynamic version of RtlEnableEarlyCriticalSectionEventCreation
  16579. procedure RtlEnableEarlyCriticalSectionEventCreation(); stdcall;
  16580. begin
  16581. GetProcedureAddress(_RtlEnableEarlyCriticalSectionEventCreation, ntdll, 'RtlEnableEarlyCriticalSectionEventCreation');
  16582. TFNRtlEnableEarlyCriticalSectionEventCreation(_RtlEnableEarlyCriticalSectionEventCreation)();
  16583. end;
  16584. // Dynamic version of RtlEnlargedIntegerMultiply
  16585. function RtlEnlargedIntegerMultiply(
  16586. Multiplicand : LONG;
  16587. Multiplier : LONG
  16588. ): LARGE_INTEGER; stdcall;
  16589. begin
  16590. GetProcedureAddress(_RtlEnlargedIntegerMultiply, ntdll, 'RtlEnlargedIntegerMultiply');
  16591. Result := TFNRtlEnlargedIntegerMultiply(_RtlEnlargedIntegerMultiply)(
  16592. Multiplicand, Multiplier
  16593. );
  16594. end;
  16595. // Dynamic version of RtlEnlargedUnsignedDivide
  16596. function RtlEnlargedUnsignedDivide(
  16597. Dividend : ULARGE_INTEGER;
  16598. Divisor : ULONG;
  16599. Remainder : PULONG
  16600. ): ULONG; stdcall;
  16601. begin
  16602. GetProcedureAddress(_RtlEnlargedUnsignedDivide, ntdll, 'RtlEnlargedUnsignedDivide');
  16603. Result := TFNRtlEnlargedUnsignedDivide(_RtlEnlargedUnsignedDivide)(
  16604. Dividend, Divisor, Remainder
  16605. );
  16606. end;
  16607. // Dynamic version of RtlEnlargedUnsignedMultiply
  16608. function RtlEnlargedUnsignedMultiply(
  16609. Multiplicand : ULONG;
  16610. Multiplier : ULONG
  16611. ): LARGE_INTEGER; stdcall;
  16612. begin
  16613. GetProcedureAddress(_RtlEnlargedUnsignedMultiply, ntdll, 'RtlEnlargedUnsignedMultiply');
  16614. Result := TFNRtlEnlargedUnsignedMultiply(_RtlEnlargedUnsignedMultiply)(
  16615. Multiplicand, Multiplier
  16616. );
  16617. end;
  16618. // Dynamic version of RtlEnterCriticalSection
  16619. procedure RtlEnterCriticalSection(
  16620. lpCriticalSection : PRTL_CRITICAL_SECTION
  16621. ); stdcall;
  16622. begin
  16623. GetProcedureAddress(_RtlEnterCriticalSection, ntdll, 'RtlEnterCriticalSection');
  16624. TFNRtlEnterCriticalSection(_RtlEnterCriticalSection)(
  16625. lpCriticalSection
  16626. );
  16627. end;
  16628. // Dynamic version of RtlEqualComputerName
  16629. function RtlEqualComputerName(
  16630. String1 : PUNICODE_STRING;
  16631. String2 : PUNICODE_STRING
  16632. ): BOOLEAN; stdcall;
  16633. begin
  16634. GetProcedureAddress(_RtlEqualComputerName, ntdll, 'RtlEqualComputerName');
  16635. Result := TFNRtlEqualComputerName(_RtlEqualComputerName)(
  16636. String1, String2
  16637. );
  16638. end;
  16639. // Dynamic version of RtlEqualDomainName
  16640. function RtlEqualDomainName(
  16641. String1 : PUNICODE_STRING;
  16642. String2 : PUNICODE_STRING
  16643. ): BOOLEAN; stdcall;
  16644. begin
  16645. GetProcedureAddress(_RtlEqualDomainName, ntdll, 'RtlEqualDomainName');
  16646. Result := TFNRtlEqualDomainName(_RtlEqualDomainName)(
  16647. String1, String2
  16648. );
  16649. end;
  16650. // Dynamic version of RtlEqualLuid
  16651. function RtlEqualLuid(
  16652. Luid1 : PLUID;
  16653. Luid2 : PLUID
  16654. ): BOOLEAN; stdcall;
  16655. begin
  16656. GetProcedureAddress(_RtlEqualLuid, ntdll, 'RtlEqualLuid');
  16657. Result := TFNRtlEqualLuid(_RtlEqualLuid)(
  16658. Luid1, Luid2
  16659. );
  16660. end;
  16661. // Dynamic version of RtlEqualPrefixSid
  16662. function RtlEqualPrefixSid(
  16663. pSid1 : PSID;
  16664. pSid2 : PSID
  16665. ): BOOLEAN; stdcall;
  16666. begin
  16667. GetProcedureAddress(_RtlEqualPrefixSid, ntdll, 'RtlEqualPrefixSid');
  16668. Result := TFNRtlEqualPrefixSid(_RtlEqualPrefixSid)(
  16669. pSid1, pSid2
  16670. );
  16671. end;
  16672. // Dynamic version of RtlEqualSid
  16673. function RtlEqualSid(
  16674. pSid1 : PSID;
  16675. pSid2 : PSID
  16676. ): BOOLEAN; stdcall;
  16677. begin
  16678. GetProcedureAddress(_RtlEqualSid, ntdll, 'RtlEqualSid');
  16679. Result := TFNRtlEqualSid(_RtlEqualSid)(
  16680. pSid1, pSid2
  16681. );
  16682. end;
  16683. // Dynamic version of RtlEqualString
  16684. function RtlEqualString(
  16685. String1 : PSTRING;
  16686. String2 : PSTRING;
  16687. CaseInsensitive : BOOLEAN
  16688. ): BOOLEAN; stdcall;
  16689. begin
  16690. GetProcedureAddress(_RtlEqualString, ntdll, 'RtlEqualString');
  16691. Result := TFNRtlEqualString(_RtlEqualString)(
  16692. String1, String2, CaseInsensitive
  16693. );
  16694. end;
  16695. // Dynamic version of RtlEqualUnicodeString
  16696. function RtlEqualUnicodeString(
  16697. String1 : PUNICODE_STRING;
  16698. String2 : PUNICODE_STRING;
  16699. CaseInsensitive : BOOLEAN
  16700. ): BOOLEAN; stdcall;
  16701. begin
  16702. GetProcedureAddress(_RtlEqualUnicodeString, ntdll, 'RtlEqualUnicodeString');
  16703. Result := TFNRtlEqualUnicodeString(_RtlEqualUnicodeString)(
  16704. String1, String2, CaseInsensitive
  16705. );
  16706. end;
  16707. // Dynamic version of RtlEraseUnicodeString
  16708. procedure RtlEraseUnicodeString(
  16709. Str : PUNICODE_STRING
  16710. ); stdcall;
  16711. begin
  16712. GetProcedureAddress(_RtlEraseUnicodeString, ntdll, 'RtlEraseUnicodeString');
  16713. TFNRtlEraseUnicodeString(_RtlEraseUnicodeString)(
  16714. Str
  16715. );
  16716. end;
  16717. // Dynamic version of RtlExpandEnvironmentStrings_U
  16718. function RtlExpandEnvironmentStrings_U(
  16719. Environment : PVOID;
  16720. Source : PUNICODE_STRING;
  16721. Destination : PUNICODE_STRING;
  16722. ReturnedLength : PULONG
  16723. ): NTSTATUS; stdcall;
  16724. begin
  16725. GetProcedureAddress(_RtlExpandEnvironmentStrings_U, ntdll, 'RtlExpandEnvironmentStrings_U');
  16726. Result := TFNRtlExpandEnvironmentStrings_U(_RtlExpandEnvironmentStrings_U)(
  16727. Environment, Source, Destination, ReturnedLength
  16728. );
  16729. end;
  16730. // Dynamic version of RtlExtendedIntegerMultiply
  16731. function RtlExtendedIntegerMultiply(
  16732. Multiplicand : LARGE_INTEGER;
  16733. Multiplier : LONG
  16734. ): LARGE_INTEGER; stdcall;
  16735. begin
  16736. GetProcedureAddress(_RtlExtendedIntegerMultiply, ntdll, 'RtlExtendedIntegerMultiply');
  16737. Result := TFNRtlExtendedIntegerMultiply(_RtlExtendedIntegerMultiply)(
  16738. Multiplicand, Multiplier
  16739. );
  16740. end;
  16741. // Dynamic version of RtlExtendedLargeIntegerDivide
  16742. function RtlExtendedLargeIntegerDivide(
  16743. Dividend : LARGE_INTEGER;
  16744. Divisor : ULONG;
  16745. Remainder : PULONG
  16746. ): LARGE_INTEGER; stdcall;
  16747. begin
  16748. GetProcedureAddress(_RtlExtendedLargeIntegerDivide, ntdll, 'RtlExtendedLargeIntegerDivide');
  16749. Result := TFNRtlExtendedLargeIntegerDivide(_RtlExtendedLargeIntegerDivide)(
  16750. Dividend, Divisor, Remainder
  16751. );
  16752. end;
  16753. // Dynamic version of RtlExtendedMagicDivide
  16754. function RtlExtendedMagicDivide(
  16755. Dividend : LARGE_INTEGER;
  16756. MagicDivisor : LARGE_INTEGER;
  16757. ShiftCount : CCHAR
  16758. ): LARGE_INTEGER; stdcall;
  16759. begin
  16760. GetProcedureAddress(_RtlExtendedMagicDivide, ntdll, 'RtlExtendedMagicDivide');
  16761. Result := TFNRtlExtendedMagicDivide(_RtlExtendedMagicDivide)(
  16762. Dividend, MagicDivisor, ShiftCount
  16763. );
  16764. end;
  16765. // Dynamic version of RtlFillMemory
  16766. procedure RtlFillMemory(
  16767. Destination : PVOID;
  16768. Length : SIZE_T;
  16769. Fill : UCHAR
  16770. ); stdcall;
  16771. begin
  16772. GetProcedureAddress(_RtlFillMemory, ntdll, 'RtlFillMemory');
  16773. TFNRtlFillMemory(_RtlFillMemory)(
  16774. Destination, Length, Fill
  16775. );
  16776. end;
  16777. // Dynamic version of RtlFillMemoryUlong
  16778. procedure RtlFillMemoryUlong(
  16779. Destination : PVOID;
  16780. Length : ULONG;
  16781. Fill : ULONG
  16782. ); stdcall;
  16783. begin
  16784. GetProcedureAddress(_RtlFillMemoryUlong, ntdll, 'RtlFillMemoryUlong');
  16785. TFNRtlFillMemoryUlong(_RtlFillMemoryUlong)(
  16786. Destination, Length, Fill
  16787. );
  16788. end;
  16789. // Dynamic version of RtlFindCharInUnicodeString
  16790. function RtlFindCharInUnicodeString(
  16791. dwFlags : ULONG;
  16792. UnicodeString : PUNICODE_STRING;
  16793. CharactersToFind : PUNICODE_STRING;
  16794. Positions : PUSHORT
  16795. ): NTSTATUS; stdcall;
  16796. begin
  16797. GetProcedureAddress(_RtlFindCharInUnicodeString, ntdll, 'RtlFindCharInUnicodeString');
  16798. Result := TFNRtlFindCharInUnicodeString(_RtlFindCharInUnicodeString)(
  16799. dwFlags, UnicodeString, CharactersToFind, Positions
  16800. );
  16801. end;
  16802. // Dynamic version of RtlFindClearBits
  16803. function RtlFindClearBits(
  16804. BitMapHeader : PRTL_BITMAP;
  16805. NumberToFind : ULONG;
  16806. HintIndex : ULONG
  16807. ): ULONG; stdcall;
  16808. begin
  16809. GetProcedureAddress(_RtlFindClearBits, ntdll, 'RtlFindClearBits');
  16810. Result := TFNRtlFindClearBits(_RtlFindClearBits)(
  16811. BitMapHeader, NumberToFind, HintIndex
  16812. );
  16813. end;
  16814. // Dynamic version of RtlFindClearBitsAndSet
  16815. function RtlFindClearBitsAndSet(
  16816. BitMapHeader : PRTL_BITMAP;
  16817. NumberToFind : ULONG;
  16818. HintIndex : ULONG
  16819. ): ULONG; stdcall;
  16820. begin
  16821. GetProcedureAddress(_RtlFindClearBitsAndSet, ntdll, 'RtlFindClearBitsAndSet');
  16822. Result := TFNRtlFindClearBitsAndSet(_RtlFindClearBitsAndSet)(
  16823. BitMapHeader, NumberToFind, HintIndex
  16824. );
  16825. end;
  16826. // Dynamic version of RtlFindLastBackwardRunClear
  16827. function RtlFindLastBackwardRunClear(
  16828. BitMapHeader : PRTL_BITMAP;
  16829. FromIndex : ULONG;
  16830. StartingRunIndex : PULONG
  16831. ): ULONG; stdcall;
  16832. begin
  16833. GetProcedureAddress(_RtlFindLastBackwardRunClear, ntdll, 'RtlFindLastBackwardRunClear');
  16834. Result := TFNRtlFindLastBackwardRunClear(_RtlFindLastBackwardRunClear)(
  16835. BitMapHeader, FromIndex, StartingRunIndex
  16836. );
  16837. end;
  16838. // Dynamic version of RtlFindLeastSignificantBit
  16839. function RtlFindLeastSignificantBit(
  16840. Set_ : ULONGLONG
  16841. ): CCHAR; stdcall;
  16842. begin
  16843. GetProcedureAddress(_RtlFindLeastSignificantBit, ntdll, 'RtlFindLeastSignificantBit');
  16844. Result := TFNRtlFindLeastSignificantBit(_RtlFindLeastSignificantBit)(
  16845. Set_
  16846. );
  16847. end;
  16848. // Dynamic version of RtlFindLongestRunClear
  16849. function RtlFindLongestRunClear(
  16850. BitMapHeader : PRTL_BITMAP;
  16851. StartingIndex : PULONG
  16852. ): ULONG; stdcall;
  16853. begin
  16854. GetProcedureAddress(_RtlFindLongestRunClear, ntdll, 'RtlFindLongestRunClear');
  16855. Result := TFNRtlFindLongestRunClear(_RtlFindLongestRunClear)(
  16856. BitMapHeader, StartingIndex
  16857. );
  16858. end;
  16859. // Dynamic version of RtlFindMostSignificantBit
  16860. function RtlFindMostSignificantBit(
  16861. Set_ : ULONGLONG
  16862. ): CCHAR; stdcall;
  16863. begin
  16864. GetProcedureAddress(_RtlFindMostSignificantBit, ntdll, 'RtlFindMostSignificantBit');
  16865. Result := TFNRtlFindMostSignificantBit(_RtlFindMostSignificantBit)(
  16866. Set_
  16867. );
  16868. end;
  16869. // Dynamic version of RtlFindNextForwardRunClear
  16870. function RtlFindNextForwardRunClear(
  16871. BitMapHeader : PRTL_BITMAP;
  16872. FromIndex : ULONG;
  16873. StartingRunIndex : PULONG
  16874. ): ULONG; stdcall;
  16875. begin
  16876. GetProcedureAddress(_RtlFindNextForwardRunClear, ntdll, 'RtlFindNextForwardRunClear');
  16877. Result := TFNRtlFindNextForwardRunClear(_RtlFindNextForwardRunClear)(
  16878. BitMapHeader, FromIndex, StartingRunIndex
  16879. );
  16880. end;
  16881. // Dynamic version of RtlFindRange
  16882. function RtlFindRange(
  16883. RangeList : PRTL_RANGE_LIST;
  16884. Minimum : ULONGLONG;
  16885. Maximum : ULONGLONG;
  16886. Length : ULONG;
  16887. Alignment : ULONG;
  16888. Flags : ULONG;
  16889. AttributeAvailableMask : UCHAR;
  16890. Context : PVOID;
  16891. Callback : PRTL_CONFLICT_RANGE_CALLBACK;
  16892. Start : PULONGLONG
  16893. ): NTSTATUS; stdcall;
  16894. begin
  16895. GetProcedureAddress(_RtlFindRange, ntdll, 'RtlFindRange');
  16896. Result := TFNRtlFindRange(_RtlFindRange)(
  16897. RangeList, Minimum, Maximum, Length, Alignment, Flags, AttributeAvailableMask, Context, Callback, Start
  16898. );
  16899. end;
  16900. // Dynamic version of RtlFindSetBits
  16901. function RtlFindSetBits(
  16902. BitMapHeader : PRTL_BITMAP;
  16903. NumberToFind : ULONG;
  16904. HintIndex : ULONG
  16905. ): ULONG; stdcall;
  16906. begin
  16907. GetProcedureAddress(_RtlFindSetBits, ntdll, 'RtlFindSetBits');
  16908. Result := TFNRtlFindSetBits(_RtlFindSetBits)(
  16909. BitMapHeader, NumberToFind, HintIndex
  16910. );
  16911. end;
  16912. // Dynamic version of RtlFindSetBitsAndClear
  16913. function RtlFindSetBitsAndClear(
  16914. BitMapHeader : PRTL_BITMAP;
  16915. NumberToFind : ULONG;
  16916. HintIndex : ULONG
  16917. ): ULONG; stdcall;
  16918. begin
  16919. GetProcedureAddress(_RtlFindSetBitsAndClear, ntdll, 'RtlFindSetBitsAndClear');
  16920. Result := TFNRtlFindSetBitsAndClear(_RtlFindSetBitsAndClear)(
  16921. BitMapHeader, NumberToFind, HintIndex
  16922. );
  16923. end;
  16924. // Dynamic version of RtlFirstFreeAce
  16925. function RtlFirstFreeAce(
  16926. pAcl : PACL;
  16927. var pAce : PVOID
  16928. ): BOOLEAN; stdcall;
  16929. begin
  16930. GetProcedureAddress(_RtlFirstFreeAce, ntdll, 'RtlFirstFreeAce');
  16931. Result := TFNRtlFirstFreeAce(_RtlFirstFreeAce)(
  16932. pAcl, pAce
  16933. );
  16934. end;
  16935. // Dynamic version of RtlFormatCurrentUserKeyPath
  16936. function RtlFormatCurrentUserKeyPath(
  16937. CurrentUserKeyPath : PUNICODE_STRING
  16938. ): NTSTATUS; stdcall;
  16939. begin
  16940. GetProcedureAddress(_RtlFormatCurrentUserKeyPath, ntdll, 'RtlFormatCurrentUserKeyPath');
  16941. Result := TFNRtlFormatCurrentUserKeyPath(_RtlFormatCurrentUserKeyPath)(
  16942. CurrentUserKeyPath
  16943. );
  16944. end;
  16945. // Dynamic version of RtlFreeAnsiString
  16946. procedure RtlFreeAnsiString(
  16947. AnsiString : PANSI_STRING
  16948. ); stdcall;
  16949. begin
  16950. GetProcedureAddress(_RtlFreeAnsiString, ntdll, 'RtlFreeAnsiString');
  16951. TFNRtlFreeAnsiString(_RtlFreeAnsiString)(
  16952. AnsiString
  16953. );
  16954. end;
  16955. // Dynamic version of RtlFreeHeap
  16956. function RtlFreeHeap(
  16957. hHeap : HANDLE;
  16958. dwFlags : ULONG;
  16959. MemoryPointer : PVOID
  16960. ): BOOLEAN; stdcall;
  16961. begin
  16962. GetProcedureAddress(_RtlFreeHeap, ntdll, 'RtlFreeHeap');
  16963. Result := TFNRtlFreeHeap(_RtlFreeHeap)(
  16964. hHeap, dwFlags, MemoryPointer
  16965. );
  16966. end;
  16967. // Dynamic version of RtlFreeOemString
  16968. procedure RtlFreeOemString(
  16969. OemString : POEM_STRING
  16970. ); stdcall;
  16971. begin
  16972. GetProcedureAddress(_RtlFreeOemString, ntdll, 'RtlFreeOemString');
  16973. TFNRtlFreeOemString(_RtlFreeOemString)(
  16974. OemString
  16975. );
  16976. end;
  16977. // Dynamic version of RtlFreeRangeList
  16978. procedure RtlFreeRangeList(
  16979. RangeList : PRTL_RANGE_LIST
  16980. ); stdcall;
  16981. begin
  16982. GetProcedureAddress(_RtlFreeRangeList, ntdll, 'RtlFreeRangeList');
  16983. TFNRtlFreeRangeList(_RtlFreeRangeList)(
  16984. RangeList
  16985. );
  16986. end;
  16987. // Dynamic version of RtlFreeSid
  16988. function RtlFreeSid(
  16989. pSid : PSID
  16990. ): PVOID; stdcall;
  16991. begin
  16992. GetProcedureAddress(_RtlFreeSid, ntdll, 'RtlFreeSid');
  16993. Result := TFNRtlFreeSid(_RtlFreeSid)(
  16994. pSid
  16995. );
  16996. end;
  16997. // Dynamic version of RtlFreeUnicodeString
  16998. procedure RtlFreeUnicodeString(
  16999. UnicodeString : PUNICODE_STRING
  17000. ); stdcall;
  17001. begin
  17002. GetProcedureAddress(_RtlFreeUnicodeString, ntdll, 'RtlFreeUnicodeString');
  17003. TFNRtlFreeUnicodeString(_RtlFreeUnicodeString)(
  17004. UnicodeString
  17005. );
  17006. end;
  17007. // Dynamic version of RtlGUIDFromString
  17008. function RtlGUIDFromString(
  17009. GuidString : PUNICODE_STRING;
  17010. Guid : LPGUID
  17011. ): NTSTATUS; stdcall;
  17012. begin
  17013. GetProcedureAddress(_RtlGUIDFromString, ntdll, 'RtlGUIDFromString');
  17014. Result := TFNRtlGUIDFromString(_RtlGUIDFromString)(
  17015. GuidString, Guid
  17016. );
  17017. end;
  17018. // Dynamic version of RtlGetAce
  17019. function RtlGetAce(
  17020. pAcl : PACL;
  17021. dwAceIndex : DWORD;
  17022. var pAce : PVOID
  17023. ): NTSTATUS; stdcall;
  17024. begin
  17025. GetProcedureAddress(_RtlGetAce, ntdll, 'RtlGetAce');
  17026. Result := TFNRtlGetAce(_RtlGetAce)(
  17027. pAcl, dwAceIndex, pAce
  17028. );
  17029. end;
  17030. // Dynamic version of RtlGetCallersAddress
  17031. procedure RtlGetCallersAddress(
  17032. CallersAddress : PPVOID;
  17033. CallersCaller : PPVOID
  17034. ); stdcall;
  17035. begin
  17036. GetProcedureAddress(_RtlGetCallersAddress, ntdll, 'RtlGetCallersAddress');
  17037. TFNRtlGetCallersAddress(_RtlGetCallersAddress)(
  17038. CallersAddress, CallersCaller
  17039. );
  17040. end;
  17041. // Dynamic version of RtlGetControlSecurityDescriptor
  17042. function RtlGetControlSecurityDescriptor(
  17043. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  17044. var Control : SECURITY_DESCRIPTOR_CONTROL;
  17045. var dwRevision : DWORD
  17046. ): NTSTATUS; stdcall;
  17047. begin
  17048. GetProcedureAddress(_RtlGetControlSecurityDescriptor, ntdll, 'RtlGetControlSecurityDescriptor');
  17049. Result := TFNRtlGetControlSecurityDescriptor(_RtlGetControlSecurityDescriptor)(
  17050. pSecurityDescriptor, Control, dwRevision
  17051. );
  17052. end;
  17053. // Dynamic version of RtlGetCurrentDirectory_U
  17054. function RtlGetCurrentDirectory_U(
  17055. MaximumLength : ULONG;
  17056. Buffer : PWSTR
  17057. ): ULONG; stdcall;
  17058. begin
  17059. GetProcedureAddress(_RtlGetCurrentDirectory_U, ntdll, 'RtlGetCurrentDirectory_U');
  17060. Result := TFNRtlGetCurrentDirectory_U(_RtlGetCurrentDirectory_U)(
  17061. MaximumLength, Buffer
  17062. );
  17063. end;
  17064. // Dynamic version of RtlGetCurrentPeb
  17065. function RtlGetCurrentPeb(): PPEB; stdcall;
  17066. begin
  17067. GetProcedureAddress(_RtlGetCurrentPeb, ntdll, 'RtlGetCurrentPeb');
  17068. Result := TFNRtlGetCurrentPeb(_RtlGetCurrentPeb)();
  17069. end;
  17070. // Dynamic version of RtlGetDaclSecurityDescriptor
  17071. function RtlGetDaclSecurityDescriptor(
  17072. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  17073. var bDaclPresent : BOOLEAN;
  17074. var Dacl : PACL;
  17075. var bDaclDefaulted : BOOLEAN
  17076. ): NTSTATUS; stdcall;
  17077. begin
  17078. GetProcedureAddress(_RtlGetDaclSecurityDescriptor, ntdll, 'RtlGetDaclSecurityDescriptor');
  17079. Result := TFNRtlGetDaclSecurityDescriptor(_RtlGetDaclSecurityDescriptor)(
  17080. pSecurityDescriptor, bDaclPresent, Dacl, bDaclDefaulted
  17081. );
  17082. end;
  17083. // Dynamic version of RtlGetFirstRange
  17084. function RtlGetFirstRange(
  17085. RangeList : PRTL_RANGE_LIST;
  17086. Iterator : PRTL_RANGE_LIST_ITERATOR;
  17087. var Range : PRTL_RANGE
  17088. ): NTSTATUS; stdcall;
  17089. begin
  17090. GetProcedureAddress(_RtlGetFirstRange, ntdll, 'RtlGetFirstRange');
  17091. Result := TFNRtlGetFirstRange(_RtlGetFirstRange)(
  17092. RangeList, Iterator, Range
  17093. );
  17094. end;
  17095. // Dynamic version of RtlGetFullPathName_U
  17096. function RtlGetFullPathName_U(
  17097. DosName : PWSTR;
  17098. Size : ULONG;
  17099. Buf : PWSTR;
  17100. var Shortname : PWSTR
  17101. ): ULONG; stdcall;
  17102. begin
  17103. GetProcedureAddress(_RtlGetFullPathName_U, ntdll, 'RtlGetFullPathName_U');
  17104. Result := TFNRtlGetFullPathName_U(_RtlGetFullPathName_U)(
  17105. DosName, Size, Buf, Shortname
  17106. );
  17107. end;
  17108. // Dynamic version of RtlGetGroupSecurityDescriptor
  17109. function RtlGetGroupSecurityDescriptor(
  17110. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  17111. var pGroup : PSID;
  17112. var bGroupDefaulted : BOOLEAN
  17113. ): NTSTATUS; stdcall;
  17114. begin
  17115. GetProcedureAddress(_RtlGetGroupSecurityDescriptor, ntdll, 'RtlGetGroupSecurityDescriptor');
  17116. Result := TFNRtlGetGroupSecurityDescriptor(_RtlGetGroupSecurityDescriptor)(
  17117. pSecurityDescriptor, pGroup, bGroupDefaulted
  17118. );
  17119. end;
  17120. // Dynamic version of RtlGetLastNtStatus
  17121. function RtlGetLastNtStatus(): NTSTATUS; stdcall;
  17122. begin
  17123. GetProcedureAddress(_RtlGetLastNtStatus, ntdll, 'RtlGetLastNtStatus');
  17124. Result := TFNRtlGetLastNtStatus(_RtlGetLastNtStatus)();
  17125. end;
  17126. // Dynamic version of RtlGetLongestNtPathLength
  17127. function RtlGetLongestNtPathLength(): ULONG; stdcall;
  17128. begin
  17129. GetProcedureAddress(_RtlGetLongestNtPathLength, ntdll, 'RtlGetLongestNtPathLength');
  17130. Result := TFNRtlGetLongestNtPathLength(_RtlGetLongestNtPathLength)();
  17131. end;
  17132. // Dynamic version of RtlGetNextRange
  17133. function RtlGetNextRange(
  17134. Iterator : PRTL_RANGE_LIST_ITERATOR;
  17135. var Range : PRTL_RANGE;
  17136. MoveForwards : BOOLEAN
  17137. ): NTSTATUS; stdcall;
  17138. begin
  17139. GetProcedureAddress(_RtlGetNextRange, ntdll, 'RtlGetNextRange');
  17140. Result := TFNRtlGetNextRange(_RtlGetNextRange)(
  17141. Iterator, Range, MoveForwards
  17142. );
  17143. end;
  17144. // Dynamic version of RtlGetNtGlobalFlags
  17145. function RtlGetNtGlobalFlags(): ULONG; stdcall;
  17146. begin
  17147. GetProcedureAddress(_RtlGetNtGlobalFlags, ntdll, 'RtlGetNtGlobalFlags');
  17148. Result := TFNRtlGetNtGlobalFlags(_RtlGetNtGlobalFlags)();
  17149. end;
  17150. // Dynamic version of RtlGetNtProductType
  17151. function RtlGetNtProductType(
  17152. var ProductType : ULONG
  17153. ): BOOLEAN; stdcall;
  17154. begin
  17155. GetProcedureAddress(_RtlGetNtProductType, ntdll, 'RtlGetNtProductType');
  17156. Result := TFNRtlGetNtProductType(_RtlGetNtProductType)(
  17157. ProductType
  17158. );
  17159. end;
  17160. // Dynamic version of RtlGetNtVersionNumbers
  17161. procedure RtlGetNtVersionNumbers(
  17162. var dwMajorVersion : ULONG;
  17163. var dwMinorVersion : ULONG;
  17164. UnknownCanBeNull : PDWORD
  17165. ); stdcall;
  17166. begin
  17167. GetProcedureAddress(_RtlGetNtVersionNumbers, ntdll, 'RtlGetNtVersionNumbers');
  17168. TFNRtlGetNtVersionNumbers(_RtlGetNtVersionNumbers)(
  17169. dwMajorVersion, dwMinorVersion, UnknownCanBeNull
  17170. );
  17171. end;
  17172. // Dynamic version of RtlGetOwnerSecurityDescriptor
  17173. function RtlGetOwnerSecurityDescriptor(
  17174. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  17175. var pOwner : PSID;
  17176. var OwnerDefaulted : BOOLEAN
  17177. ): NTSTATUS; stdcall;
  17178. begin
  17179. GetProcedureAddress(_RtlGetOwnerSecurityDescriptor, ntdll, 'RtlGetOwnerSecurityDescriptor');
  17180. Result := TFNRtlGetOwnerSecurityDescriptor(_RtlGetOwnerSecurityDescriptor)(
  17181. pSecurityDescriptor, pOwner, OwnerDefaulted
  17182. );
  17183. end;
  17184. // Dynamic version of RtlGetProcessHeaps
  17185. function RtlGetProcessHeaps(
  17186. ArraySize : ULONG;
  17187. HeapArray : PHANDLE
  17188. ): ULONG; stdcall;
  17189. begin
  17190. GetProcedureAddress(_RtlGetProcessHeaps, ntdll, 'RtlGetProcessHeaps');
  17191. Result := TFNRtlGetProcessHeaps(_RtlGetProcessHeaps)(
  17192. ArraySize, HeapArray
  17193. );
  17194. end;
  17195. // Dynamic version of RtlGetSaclSecurityDescriptor
  17196. function RtlGetSaclSecurityDescriptor(
  17197. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  17198. var bSaclPresent : BOOLEAN;
  17199. var Sacl : PACL;
  17200. var bSaclDefaulted : BOOLEAN
  17201. ): NTSTATUS; stdcall;
  17202. begin
  17203. GetProcedureAddress(_RtlGetSaclSecurityDescriptor, ntdll, 'RtlGetSaclSecurityDescriptor');
  17204. Result := TFNRtlGetSaclSecurityDescriptor(_RtlGetSaclSecurityDescriptor)(
  17205. pSecurityDescriptor, bSaclPresent, Sacl, bSaclDefaulted
  17206. );
  17207. end;
  17208. // Dynamic version of RtlGetVersion
  17209. function RtlGetVersion(
  17210. lpVersionInformation : PRTL_OSVERSIONINFOW
  17211. ): NTSTATUS; stdcall;
  17212. begin
  17213. GetProcedureAddress(_RtlGetVersion, ntdll, 'RtlGetVersion');
  17214. Result := TFNRtlGetVersion(_RtlGetVersion)(
  17215. lpVersionInformation
  17216. );
  17217. end;
  17218. // Dynamic version of RtlIdentifierAuthoritySid
  17219. function RtlIdentifierAuthoritySid(
  17220. Sid : PSID
  17221. ): PSID_IDENTIFIER_AUTHORITY; stdcall;
  17222. begin
  17223. GetProcedureAddress(_RtlIdentifierAuthoritySid, ntdll, 'RtlIdentifierAuthoritySid');
  17224. Result := TFNRtlIdentifierAuthoritySid(_RtlIdentifierAuthoritySid)(
  17225. Sid
  17226. );
  17227. end;
  17228. // Dynamic version of RtlImageDirectoryEntryToData
  17229. function RtlImageDirectoryEntryToData(
  17230. ImageBase : HMODULE;
  17231. MappedAsImage : BOOLEAN;
  17232. DirectoryEntry : USHORT;
  17233. Size : PULONG
  17234. ): PVOID; stdcall;
  17235. begin
  17236. GetProcedureAddress(_RtlImageDirectoryEntryToData, ntdll, 'RtlImageDirectoryEntryToData');
  17237. Result := TFNRtlImageDirectoryEntryToData(_RtlImageDirectoryEntryToData)(
  17238. ImageBase, MappedAsImage, DirectoryEntry, Size
  17239. );
  17240. end;
  17241. // Dynamic version of RtlImageNtHeader
  17242. function RtlImageNtHeader(
  17243. ImageBase : HMODULE
  17244. ): PIMAGE_NT_HEADERS; stdcall;
  17245. begin
  17246. GetProcedureAddress(_RtlImageNtHeader, ntdll, 'RtlImageNtHeader');
  17247. Result := TFNRtlImageNtHeader(_RtlImageNtHeader)(
  17248. ImageBase
  17249. );
  17250. end;
  17251. // Dynamic version of RtlImageNtHeaderEx
  17252. function RtlImageNtHeaderEx(
  17253. dwFlags : DWORD;
  17254. ImageBase : HMODULE
  17255. ): PIMAGE_NT_HEADERS; stdcall;
  17256. begin
  17257. GetProcedureAddress(_RtlImageNtHeaderEx, ntdll, 'RtlImageNtHeaderEx');
  17258. Result := TFNRtlImageNtHeaderEx(_RtlImageNtHeaderEx)(
  17259. dwFlags, ImageBase
  17260. );
  17261. end;
  17262. // Dynamic version of RtlImageRvaToSection
  17263. function RtlImageRvaToSection(
  17264. NtHeaders : PIMAGE_NT_HEADERS;
  17265. ImageBase : HMODULE;
  17266. Rva : ULONG
  17267. ): PIMAGE_SECTION_HEADER; stdcall;
  17268. begin
  17269. GetProcedureAddress(_RtlImageRvaToSection, ntdll, 'RtlImageRvaToSection');
  17270. Result := TFNRtlImageRvaToSection(_RtlImageRvaToSection)(
  17271. NtHeaders, ImageBase, Rva
  17272. );
  17273. end;
  17274. // Dynamic version of RtlImageRvaToVa
  17275. function RtlImageRvaToVa(
  17276. NtHeaders : PIMAGE_NT_HEADERS;
  17277. ImageBase : HMODULE;
  17278. Rva : ULONG;
  17279. var LastRvaSection : PIMAGE_SECTION_HEADER
  17280. ): PVOID; stdcall;
  17281. begin
  17282. GetProcedureAddress(_RtlImageRvaToVa, ntdll, 'RtlImageRvaToVa');
  17283. Result := TFNRtlImageRvaToVa(_RtlImageRvaToVa)(
  17284. NtHeaders, ImageBase, Rva, LastRvaSection
  17285. );
  17286. end;
  17287. // Dynamic version of RtlImpersonateSelf
  17288. function RtlImpersonateSelf(
  17289. ImpersonationLevel : SECURITY_IMPERSONATION_LEVEL
  17290. ): NTSTATUS; stdcall;
  17291. begin
  17292. GetProcedureAddress(_RtlImpersonateSelf, ntdll, 'RtlImpersonateSelf');
  17293. Result := TFNRtlImpersonateSelf(_RtlImpersonateSelf)(
  17294. ImpersonationLevel
  17295. );
  17296. end;
  17297. // Dynamic version of RtlInitAnsiString
  17298. procedure RtlInitAnsiString(
  17299. DestinationString : PANSI_STRING;
  17300. SourceString : PCSZ
  17301. ); stdcall;
  17302. begin
  17303. GetProcedureAddress(_RtlInitAnsiString, ntdll, 'RtlInitAnsiString');
  17304. TFNRtlInitAnsiString(_RtlInitAnsiString)(
  17305. DestinationString, SourceString
  17306. );
  17307. end;
  17308. // Dynamic version of RtlInitAnsiStringEx
  17309. function RtlInitAnsiStringEx(
  17310. DestinationString : PANSI_STRING;
  17311. SourceString : PCSZ
  17312. ): NTSTATUS; stdcall;
  17313. begin
  17314. GetProcedureAddress(_RtlInitAnsiStringEx, ntdll, 'RtlInitAnsiStringEx');
  17315. Result := TFNRtlInitAnsiStringEx(_RtlInitAnsiStringEx)(
  17316. DestinationString, SourceString
  17317. );
  17318. end;
  17319. // Dynamic version of RtlInitString
  17320. procedure RtlInitString(
  17321. DestinationString : PSTRING;
  17322. SourceString : PCSZ
  17323. ); stdcall;
  17324. begin
  17325. GetProcedureAddress(_RtlInitString, ntdll, 'RtlInitString');
  17326. TFNRtlInitString(_RtlInitString)(
  17327. DestinationString, SourceString
  17328. );
  17329. end;
  17330. // Dynamic version of RtlInitUnicodeString
  17331. procedure RtlInitUnicodeString(
  17332. DestinationString : PUNICODE_STRING;
  17333. SourceString : LPCWSTR
  17334. ); stdcall;
  17335. begin
  17336. GetProcedureAddress(_RtlInitUnicodeString, ntdll, 'RtlInitUnicodeString');
  17337. TFNRtlInitUnicodeString(_RtlInitUnicodeString)(
  17338. DestinationString, SourceString
  17339. );
  17340. end;
  17341. // Dynamic version of RtlInitUnicodeStringEx
  17342. function RtlInitUnicodeStringEx(
  17343. DestinationString : PUNICODE_STRING;
  17344. SourceString : LPCWSTR
  17345. ): NTSTATUS; stdcall;
  17346. begin
  17347. GetProcedureAddress(_RtlInitUnicodeStringEx, ntdll, 'RtlInitUnicodeStringEx');
  17348. Result := TFNRtlInitUnicodeStringEx(_RtlInitUnicodeStringEx)(
  17349. DestinationString, SourceString
  17350. );
  17351. end;
  17352. // Dynamic version of RtlInitializeBitMap
  17353. procedure RtlInitializeBitMap(
  17354. BitMapHeader : PRTL_BITMAP;
  17355. BitMapBuffer : PULONG;
  17356. SizeOfBitMap : ULONG
  17357. ); stdcall;
  17358. begin
  17359. GetProcedureAddress(_RtlInitializeBitMap, ntdll, 'RtlInitializeBitMap');
  17360. TFNRtlInitializeBitMap(_RtlInitializeBitMap)(
  17361. BitMapHeader, BitMapBuffer, SizeOfBitMap
  17362. );
  17363. end;
  17364. // Dynamic version of RtlInitializeCriticalSection
  17365. function RtlInitializeCriticalSection(
  17366. lpCriticalSection : PRTL_CRITICAL_SECTION
  17367. ): NTSTATUS; stdcall;
  17368. begin
  17369. GetProcedureAddress(_RtlInitializeCriticalSection, ntdll, 'RtlInitializeCriticalSection');
  17370. Result := TFNRtlInitializeCriticalSection(_RtlInitializeCriticalSection)(
  17371. lpCriticalSection
  17372. );
  17373. end;
  17374. // Dynamic version of RtlInitializeCriticalSectionAndSpinCount
  17375. function RtlInitializeCriticalSectionAndSpinCount(
  17376. lpCriticalSection : PRTL_CRITICAL_SECTION;
  17377. dwSpinCount : ULONG
  17378. ): NTSTATUS; stdcall;
  17379. begin
  17380. GetProcedureAddress(_RtlInitializeCriticalSectionAndSpinCount, ntdll, 'RtlInitializeCriticalSectionAndSpinCount');
  17381. Result := TFNRtlInitializeCriticalSectionAndSpinCount(_RtlInitializeCriticalSectionAndSpinCount)(
  17382. lpCriticalSection, dwSpinCount
  17383. );
  17384. end;
  17385. // Dynamic version of RtlInitializeRangeList
  17386. procedure RtlInitializeRangeList(
  17387. RangeList : PRTL_RANGE_LIST
  17388. ); stdcall;
  17389. begin
  17390. GetProcedureAddress(_RtlInitializeRangeList, ntdll, 'RtlInitializeRangeList');
  17391. TFNRtlInitializeRangeList(_RtlInitializeRangeList)(
  17392. RangeList
  17393. );
  17394. end;
  17395. // Dynamic version of RtlInitializeSListHead
  17396. procedure RtlInitializeSListHead(
  17397. ListHead : PSLIST_HEADER
  17398. ); stdcall;
  17399. begin
  17400. GetProcedureAddress(_RtlInitializeSListHead, ntdll, 'RtlInitializeSListHead');
  17401. TFNRtlInitializeSListHead(_RtlInitializeSListHead)(
  17402. ListHead
  17403. );
  17404. end;
  17405. // Dynamic version of RtlInitializeSid
  17406. function RtlInitializeSid(
  17407. pSid : PSID;
  17408. pIdentifierAuthority : PSID_IDENTIFIER_AUTHORITY;
  17409. nSubAuthorityCount : UCHAR
  17410. ): NTSTATUS; stdcall;
  17411. begin
  17412. GetProcedureAddress(_RtlInitializeSid, ntdll, 'RtlInitializeSid');
  17413. Result := TFNRtlInitializeSid(_RtlInitializeSid)(
  17414. pSid, pIdentifierAuthority, nSubAuthorityCount
  17415. );
  17416. end;
  17417. // Dynamic version of RtlInt64ToUnicodeString
  17418. function RtlInt64ToUnicodeString(
  17419. Value : ULONGLONG;
  17420. Base : ULONG;
  17421. Str : PUNICODE_STRING
  17422. ): NTSTATUS; stdcall;
  17423. begin
  17424. GetProcedureAddress(_RtlInt64ToUnicodeString, ntdll, 'RtlInt64ToUnicodeString');
  17425. Result := TFNRtlInt64ToUnicodeString(_RtlInt64ToUnicodeString)(
  17426. Value, Base, Str
  17427. );
  17428. end;
  17429. // Dynamic version of RtlIntegerToChar
  17430. function RtlIntegerToChar(
  17431. Value : ULONG;
  17432. Base : ULONG;
  17433. Length : ULONG;
  17434. Str : PCHAR
  17435. ): NTSTATUS; stdcall;
  17436. begin
  17437. GetProcedureAddress(_RtlIntegerToChar, ntdll, 'RtlIntegerToChar');
  17438. Result := TFNRtlIntegerToChar(_RtlIntegerToChar)(
  17439. Value, Base, Length, Str
  17440. );
  17441. end;
  17442. // Dynamic version of RtlIntegerToUnicodeString
  17443. function RtlIntegerToUnicodeString(
  17444. Value : ULONG;
  17445. Base : ULONG;
  17446. Str : PUNICODE_STRING
  17447. ): NTSTATUS; stdcall;
  17448. begin
  17449. GetProcedureAddress(_RtlIntegerToUnicodeString, ntdll, 'RtlIntegerToUnicodeString');
  17450. Result := TFNRtlIntegerToUnicodeString(_RtlIntegerToUnicodeString)(
  17451. Value, Base, Str
  17452. );
  17453. end;
  17454. // Dynamic version of RtlInterlockedFlushSList
  17455. function RtlInterlockedFlushSList(
  17456. ListHead : PSLIST_HEADER
  17457. ): PSLIST_ENTRY; stdcall;
  17458. begin
  17459. GetProcedureAddress(_RtlInterlockedFlushSList, ntdll, 'RtlInterlockedFlushSList');
  17460. Result := TFNRtlInterlockedFlushSList(_RtlInterlockedFlushSList)(
  17461. ListHead
  17462. );
  17463. end;
  17464. // Dynamic version of RtlInterlockedPopEntrySList
  17465. function RtlInterlockedPopEntrySList(
  17466. ListHead : PSLIST_HEADER
  17467. ): PSLIST_ENTRY; stdcall;
  17468. begin
  17469. GetProcedureAddress(_RtlInterlockedPopEntrySList, ntdll, 'RtlInterlockedPopEntrySList');
  17470. Result := TFNRtlInterlockedPopEntrySList(_RtlInterlockedPopEntrySList)(
  17471. ListHead
  17472. );
  17473. end;
  17474. // Dynamic version of RtlInterlockedPushEntrySList
  17475. function RtlInterlockedPushEntrySList(
  17476. ListHead : PSLIST_HEADER;
  17477. ListEntry : PSLIST_ENTRY
  17478. ): PSLIST_ENTRY; stdcall;
  17479. begin
  17480. GetProcedureAddress(_RtlInterlockedPushEntrySList, ntdll, 'RtlInterlockedPushEntrySList');
  17481. Result := TFNRtlInterlockedPushEntrySList(_RtlInterlockedPushEntrySList)(
  17482. ListHead, ListEntry
  17483. );
  17484. end;
  17485. // Dynamic version of RtlInvertRangeList
  17486. function RtlInvertRangeList(
  17487. InvertedRangeList : PRTL_RANGE_LIST;
  17488. RangeList : PRTL_RANGE_LIST
  17489. ): NTSTATUS; stdcall;
  17490. begin
  17491. GetProcedureAddress(_RtlInvertRangeList, ntdll, 'RtlInvertRangeList');
  17492. Result := TFNRtlInvertRangeList(_RtlInvertRangeList)(
  17493. InvertedRangeList, RangeList
  17494. );
  17495. end;
  17496. // Dynamic version of RtlIpv4AddressToStringA
  17497. function RtlIpv4AddressToStringA(
  17498. IP : PULONG;
  17499. Buffer : LPSTR
  17500. ): LPSTR; stdcall;
  17501. begin
  17502. GetProcedureAddress(_RtlIpv4AddressToStringA, ntdll, 'RtlIpv4AddressToStringA');
  17503. Result := TFNRtlIpv4AddressToStringA(_RtlIpv4AddressToStringA)(
  17504. IP, Buffer
  17505. );
  17506. end;
  17507. // Dynamic version of RtlIpv4AddressToStringW
  17508. function RtlIpv4AddressToStringW(
  17509. IP : PULONG;
  17510. Buffer : LPWSTR
  17511. ): LPWSTR; stdcall;
  17512. begin
  17513. GetProcedureAddress(_RtlIpv4AddressToStringW, ntdll, 'RtlIpv4AddressToStringW');
  17514. Result := TFNRtlIpv4AddressToStringW(_RtlIpv4AddressToStringW)(
  17515. IP, Buffer
  17516. );
  17517. end;
  17518. // Dynamic version of RtlIsDosDeviceName_U
  17519. function RtlIsDosDeviceName_U(
  17520. TestString : LPCWSTR
  17521. ): ULONG; stdcall;
  17522. begin
  17523. GetProcedureAddress(_RtlIsDosDeviceName_U, ntdll, 'RtlIsDosDeviceName_U');
  17524. Result := TFNRtlIsDosDeviceName_U(_RtlIsDosDeviceName_U)(
  17525. TestString
  17526. );
  17527. end;
  17528. // Dynamic version of RtlIsNameLegalDOS8Dot3
  17529. function RtlIsNameLegalDOS8Dot3(
  17530. Name : PUNICODE_STRING;
  17531. OemName : POEM_STRING;
  17532. NameContainsSpaces : PBOOLEAN
  17533. ): BOOLEAN; stdcall;
  17534. begin
  17535. GetProcedureAddress(_RtlIsNameLegalDOS8Dot3, ntdll, 'RtlIsNameLegalDOS8Dot3');
  17536. Result := TFNRtlIsNameLegalDOS8Dot3(_RtlIsNameLegalDOS8Dot3)(
  17537. Name, OemName, NameContainsSpaces
  17538. );
  17539. end;
  17540. // Dynamic version of RtlIsRangeAvailable
  17541. function RtlIsRangeAvailable(
  17542. RangeList : PRTL_RANGE_LIST;
  17543. Start : ULONGLONG;
  17544. End_ : ULONGLONG;
  17545. Flags : ULONG;
  17546. AttributeAvailableMask : UCHAR;
  17547. Context : PVOID;
  17548. Callback : PRTL_CONFLICT_RANGE_CALLBACK;
  17549. Available : PBOOLEAN
  17550. ): NTSTATUS; stdcall;
  17551. begin
  17552. GetProcedureAddress(_RtlIsRangeAvailable, ntdll, 'RtlIsRangeAvailable');
  17553. Result := TFNRtlIsRangeAvailable(_RtlIsRangeAvailable)(
  17554. RangeList, Start, End_, Flags, AttributeAvailableMask, Context, Callback, Available
  17555. );
  17556. end;
  17557. // Dynamic version of RtlIsTextUnicode
  17558. function RtlIsTextUnicode(
  17559. lpBuffer : PVOID;
  17560. cb : Integer;
  17561. lpi : LPINT
  17562. ): BOOLEAN; stdcall;
  17563. begin
  17564. GetProcedureAddress(_RtlIsTextUnicode, ntdll, 'RtlIsTextUnicode');
  17565. Result := TFNRtlIsTextUnicode(_RtlIsTextUnicode)(
  17566. lpBuffer, cb, lpi
  17567. );
  17568. end;
  17569. // Dynamic version of RtlLargeIntegerAdd
  17570. function RtlLargeIntegerAdd(
  17571. Addend1 : LARGE_INTEGER;
  17572. Addend2 : LARGE_INTEGER
  17573. ): LARGE_INTEGER; stdcall;
  17574. begin
  17575. GetProcedureAddress(_RtlLargeIntegerAdd, ntdll, 'RtlLargeIntegerAdd');
  17576. Result := TFNRtlLargeIntegerAdd(_RtlLargeIntegerAdd)(
  17577. Addend1, Addend2
  17578. );
  17579. end;
  17580. // Dynamic version of RtlLargeIntegerArithmeticShift
  17581. function RtlLargeIntegerArithmeticShift(
  17582. LargeInteger : LARGE_INTEGER;
  17583. ShiftCount : CCHAR
  17584. ): LARGE_INTEGER; stdcall;
  17585. begin
  17586. GetProcedureAddress(_RtlLargeIntegerArithmeticShift, ntdll, 'RtlLargeIntegerArithmeticShift');
  17587. Result := TFNRtlLargeIntegerArithmeticShift(_RtlLargeIntegerArithmeticShift)(
  17588. LargeInteger, ShiftCount
  17589. );
  17590. end;
  17591. // Dynamic version of RtlLargeIntegerDivide
  17592. function RtlLargeIntegerDivide(
  17593. Dividend : LARGE_INTEGER;
  17594. Divisor : LARGE_INTEGER;
  17595. Remainder : PLARGE_INTEGER
  17596. ): LARGE_INTEGER; stdcall;
  17597. begin
  17598. GetProcedureAddress(_RtlLargeIntegerDivide, ntdll, 'RtlLargeIntegerDivide');
  17599. Result := TFNRtlLargeIntegerDivide(_RtlLargeIntegerDivide)(
  17600. Dividend, Divisor, Remainder
  17601. );
  17602. end;
  17603. // Dynamic version of RtlLargeIntegerNegate
  17604. function RtlLargeIntegerNegate(
  17605. NegateThis : LARGE_INTEGER
  17606. ): LARGE_INTEGER; stdcall;
  17607. begin
  17608. GetProcedureAddress(_RtlLargeIntegerNegate, ntdll, 'RtlLargeIntegerNegate');
  17609. Result := TFNRtlLargeIntegerNegate(_RtlLargeIntegerNegate)(
  17610. NegateThis
  17611. );
  17612. end;
  17613. // Dynamic version of RtlLargeIntegerShiftLeft
  17614. function RtlLargeIntegerShiftLeft(
  17615. LargeInteger : LARGE_INTEGER;
  17616. ShiftCount : CCHAR
  17617. ): LARGE_INTEGER; stdcall;
  17618. begin
  17619. GetProcedureAddress(_RtlLargeIntegerShiftLeft, ntdll, 'RtlLargeIntegerShiftLeft');
  17620. Result := TFNRtlLargeIntegerShiftLeft(_RtlLargeIntegerShiftLeft)(
  17621. LargeInteger, ShiftCount
  17622. );
  17623. end;
  17624. // Dynamic version of RtlLargeIntegerShiftRight
  17625. function RtlLargeIntegerShiftRight(
  17626. LargeInteger : LARGE_INTEGER;
  17627. ShiftCount : CCHAR
  17628. ): LARGE_INTEGER; stdcall;
  17629. begin
  17630. GetProcedureAddress(_RtlLargeIntegerShiftRight, ntdll, 'RtlLargeIntegerShiftRight');
  17631. Result := TFNRtlLargeIntegerShiftRight(_RtlLargeIntegerShiftRight)(
  17632. LargeInteger, ShiftCount
  17633. );
  17634. end;
  17635. // Dynamic version of RtlLargeIntegerSubtract
  17636. function RtlLargeIntegerSubtract(
  17637. Number : LARGE_INTEGER;
  17638. Subtrahend : LARGE_INTEGER
  17639. ): LARGE_INTEGER; stdcall;
  17640. begin
  17641. GetProcedureAddress(_RtlLargeIntegerSubtract, ntdll, 'RtlLargeIntegerSubtract');
  17642. Result := TFNRtlLargeIntegerSubtract(_RtlLargeIntegerSubtract)(
  17643. Number, Subtrahend
  17644. );
  17645. end;
  17646. // Dynamic version of RtlLargeIntegerToChar
  17647. function RtlLargeIntegerToChar(
  17648. Value : PLARGE_INTEGER;
  17649. Base : ULONG;
  17650. BufferLength : ULONG;
  17651. Buffer : PCHAR
  17652. ): NTSTATUS; stdcall;
  17653. begin
  17654. GetProcedureAddress(_RtlLargeIntegerToChar, ntdll, 'RtlLargeIntegerToChar');
  17655. Result := TFNRtlLargeIntegerToChar(_RtlLargeIntegerToChar)(
  17656. Value, Base, BufferLength, Buffer
  17657. );
  17658. end;
  17659. // Dynamic version of RtlLeaveCriticalSection
  17660. procedure RtlLeaveCriticalSection(
  17661. lpCriticalSection : PRTL_CRITICAL_SECTION
  17662. ); stdcall;
  17663. begin
  17664. GetProcedureAddress(_RtlLeaveCriticalSection, ntdll, 'RtlLeaveCriticalSection');
  17665. TFNRtlLeaveCriticalSection(_RtlLeaveCriticalSection)(
  17666. lpCriticalSection
  17667. );
  17668. end;
  17669. // Dynamic version of RtlLengthRequiredSid
  17670. function RtlLengthRequiredSid(
  17671. nSubAuthorityCount : ULONG
  17672. ): ULONG; stdcall;
  17673. begin
  17674. GetProcedureAddress(_RtlLengthRequiredSid, ntdll, 'RtlLengthRequiredSid');
  17675. Result := TFNRtlLengthRequiredSid(_RtlLengthRequiredSid)(
  17676. nSubAuthorityCount
  17677. );
  17678. end;
  17679. // Dynamic version of RtlLengthSecurityDescriptor
  17680. function RtlLengthSecurityDescriptor(
  17681. SecurityDescriptor : PSECURITY_DESCRIPTOR
  17682. ): ULONG; stdcall;
  17683. begin
  17684. GetProcedureAddress(_RtlLengthSecurityDescriptor, ntdll, 'RtlLengthSecurityDescriptor');
  17685. Result := TFNRtlLengthSecurityDescriptor(_RtlLengthSecurityDescriptor)(
  17686. SecurityDescriptor
  17687. );
  17688. end;
  17689. // Dynamic version of RtlLengthSid
  17690. function RtlLengthSid(
  17691. pSid : PSID
  17692. ): ULONG; stdcall;
  17693. begin
  17694. GetProcedureAddress(_RtlLengthSid, ntdll, 'RtlLengthSid');
  17695. Result := TFNRtlLengthSid(_RtlLengthSid)(
  17696. pSid
  17697. );
  17698. end;
  17699. // Dynamic version of RtlLocalTimeToSystemTime
  17700. function RtlLocalTimeToSystemTime(
  17701. LocalTime : PLARGE_INTEGER;
  17702. SystemTime : PLARGE_INTEGER
  17703. ): NTSTATUS; stdcall;
  17704. begin
  17705. GetProcedureAddress(_RtlLocalTimeToSystemTime, ntdll, 'RtlLocalTimeToSystemTime');
  17706. Result := TFNRtlLocalTimeToSystemTime(_RtlLocalTimeToSystemTime)(
  17707. LocalTime, SystemTime
  17708. );
  17709. end;
  17710. // Dynamic version of RtlLockHeap
  17711. function RtlLockHeap(
  17712. hHeap : PVOID
  17713. ): BOOLEAN; stdcall;
  17714. begin
  17715. GetProcedureAddress(_RtlLockHeap, ntdll, 'RtlLockHeap');
  17716. Result := TFNRtlLockHeap(_RtlLockHeap)(
  17717. hHeap
  17718. );
  17719. end;
  17720. // Dynamic version of RtlMakeSelfRelativeSD
  17721. function RtlMakeSelfRelativeSD(
  17722. pAbsoluteSD : PSECURITY_DESCRIPTOR;
  17723. pSelfRelativeSD : PSECURITY_DESCRIPTOR;
  17724. lpdwBufferLength : LPDWORD
  17725. ): NTSTATUS; stdcall;
  17726. begin
  17727. GetProcedureAddress(_RtlMakeSelfRelativeSD, ntdll, 'RtlMakeSelfRelativeSD');
  17728. Result := TFNRtlMakeSelfRelativeSD(_RtlMakeSelfRelativeSD)(
  17729. pAbsoluteSD, pSelfRelativeSD, lpdwBufferLength
  17730. );
  17731. end;
  17732. // Dynamic version of RtlMapGenericMask
  17733. procedure RtlMapGenericMask(
  17734. AccessMask : PACCESS_MASK;
  17735. GenericMapping : PGENERIC_MAPPING
  17736. ); stdcall;
  17737. begin
  17738. GetProcedureAddress(_RtlMapGenericMask, ntdll, 'RtlMapGenericMask');
  17739. TFNRtlMapGenericMask(_RtlMapGenericMask)(
  17740. AccessMask, GenericMapping
  17741. );
  17742. end;
  17743. // Dynamic version of RtlMapSecurityErrorToNtStatus
  17744. function RtlMapSecurityErrorToNtStatus(
  17745. SecurityError : DWORD
  17746. ): NTSTATUS; stdcall;
  17747. begin
  17748. GetProcedureAddress(_RtlMapSecurityErrorToNtStatus, ntdll, 'RtlMapSecurityErrorToNtStatus');
  17749. Result := TFNRtlMapSecurityErrorToNtStatus(_RtlMapSecurityErrorToNtStatus)(
  17750. SecurityError
  17751. );
  17752. end;
  17753. // Dynamic version of RtlMergeRangeLists
  17754. function RtlMergeRangeLists(
  17755. MergedRangeList : PRTL_RANGE_LIST;
  17756. RangeList1 : PRTL_RANGE_LIST;
  17757. RangeList2 : PRTL_RANGE_LIST;
  17758. Flags : ULONG
  17759. ): NTSTATUS; stdcall;
  17760. begin
  17761. GetProcedureAddress(_RtlMergeRangeLists, ntdll, 'RtlMergeRangeLists');
  17762. Result := TFNRtlMergeRangeLists(_RtlMergeRangeLists)(
  17763. MergedRangeList, RangeList1, RangeList2, Flags
  17764. );
  17765. end;
  17766. // Dynamic version of RtlMoveMemory
  17767. procedure RtlMoveMemory(
  17768. Destination : PVOID;
  17769. Source : PVOID;
  17770. Length : SIZE_T
  17771. ); stdcall;
  17772. begin
  17773. GetProcedureAddress(_RtlMoveMemory, ntdll, 'RtlMoveMemory');
  17774. TFNRtlMoveMemory(_RtlMoveMemory)(
  17775. Destination, Source, Length
  17776. );
  17777. end;
  17778. // Dynamic version of RtlNormalizeProcessParams
  17779. function RtlNormalizeProcessParams(
  17780. ProcessParameters : PRTL_USER_PROCESS_PARAMETERS
  17781. ): PRTL_USER_PROCESS_PARAMETERS; stdcall;
  17782. begin
  17783. GetProcedureAddress(_RtlNormalizeProcessParams, ntdll, 'RtlNormalizeProcessParams');
  17784. Result := TFNRtlNormalizeProcessParams(_RtlNormalizeProcessParams)(
  17785. ProcessParameters
  17786. );
  17787. end;
  17788. // Dynamic version of RtlNtStatusToDosError
  17789. function RtlNtStatusToDosError(
  17790. Status : NTSTATUS
  17791. ): ULONG; stdcall;
  17792. begin
  17793. GetProcedureAddress(_RtlNtStatusToDosError, ntdll, 'RtlNtStatusToDosError');
  17794. Result := TFNRtlNtStatusToDosError(_RtlNtStatusToDosError)(
  17795. Status
  17796. );
  17797. end;
  17798. // Dynamic version of RtlNtStatusToDosErrorNoTeb
  17799. function RtlNtStatusToDosErrorNoTeb(
  17800. Status : NTSTATUS
  17801. ): ULONG; stdcall;
  17802. begin
  17803. GetProcedureAddress(_RtlNtStatusToDosErrorNoTeb, ntdll, 'RtlNtStatusToDosErrorNoTeb');
  17804. Result := TFNRtlNtStatusToDosErrorNoTeb(_RtlNtStatusToDosErrorNoTeb)(
  17805. Status
  17806. );
  17807. end;
  17808. // Dynamic version of RtlNumberOfClearBits
  17809. function RtlNumberOfClearBits(
  17810. BitMapHeader : PRTL_BITMAP
  17811. ): ULONG; stdcall;
  17812. begin
  17813. GetProcedureAddress(_RtlNumberOfClearBits, ntdll, 'RtlNumberOfClearBits');
  17814. Result := TFNRtlNumberOfClearBits(_RtlNumberOfClearBits)(
  17815. BitMapHeader
  17816. );
  17817. end;
  17818. // Dynamic version of RtlNumberOfSetBits
  17819. function RtlNumberOfSetBits(
  17820. BitMapHeader : PRTL_BITMAP
  17821. ): ULONG; stdcall;
  17822. begin
  17823. GetProcedureAddress(_RtlNumberOfSetBits, ntdll, 'RtlNumberOfSetBits');
  17824. Result := TFNRtlNumberOfSetBits(_RtlNumberOfSetBits)(
  17825. BitMapHeader
  17826. );
  17827. end;
  17828. // Dynamic version of RtlOemStringToUnicodeSize
  17829. function RtlOemStringToUnicodeSize(
  17830. AnsiString : POEM_STRING
  17831. ): ULONG; stdcall;
  17832. begin
  17833. GetProcedureAddress(_RtlOemStringToUnicodeSize, ntdll, 'RtlOemStringToUnicodeSize');
  17834. Result := TFNRtlOemStringToUnicodeSize(_RtlOemStringToUnicodeSize)(
  17835. AnsiString
  17836. );
  17837. end;
  17838. // Dynamic version of RtlOemStringToUnicodeString
  17839. function RtlOemStringToUnicodeString(
  17840. DestinationString : PUNICODE_STRING;
  17841. SourceString : POEM_STRING;
  17842. AllocateDestinationString : BOOLEAN
  17843. ): NTSTATUS; stdcall;
  17844. begin
  17845. GetProcedureAddress(_RtlOemStringToUnicodeString, ntdll, 'RtlOemStringToUnicodeString');
  17846. Result := TFNRtlOemStringToUnicodeString(_RtlOemStringToUnicodeString)(
  17847. DestinationString, SourceString, AllocateDestinationString
  17848. );
  17849. end;
  17850. // Dynamic version of RtlOemToUnicodeN
  17851. function RtlOemToUnicodeN(
  17852. UnicodeString : PWSTR;
  17853. UnicodeSize : ULONG;
  17854. var ResultSize : ULONG;
  17855. OemString : PCHAR;
  17856. OemSize : ULONG
  17857. ): NTSTATUS; stdcall;
  17858. begin
  17859. GetProcedureAddress(_RtlOemToUnicodeN, ntdll, 'RtlOemToUnicodeN');
  17860. Result := TFNRtlOemToUnicodeN(_RtlOemToUnicodeN)(
  17861. UnicodeString, UnicodeSize, ResultSize, OemString, OemSize
  17862. );
  17863. end;
  17864. // Dynamic version of RtlOpenCurrentUser
  17865. function RtlOpenCurrentUser(
  17866. samDesired : ACCESS_MASK;
  17867. phkResult : PHKEY
  17868. ): NTSTATUS; stdcall;
  17869. begin
  17870. GetProcedureAddress(_RtlOpenCurrentUser, ntdll, 'RtlOpenCurrentUser');
  17871. Result := TFNRtlOpenCurrentUser(_RtlOpenCurrentUser)(
  17872. samDesired, phkResult
  17873. );
  17874. end;
  17875. // Dynamic version of RtlPrefixString
  17876. function RtlPrefixString(
  17877. String1 : PANSI_STRING;
  17878. String2 : PANSI_STRING;
  17879. CaseInsensitive : BOOLEAN
  17880. ): BOOLEAN; stdcall;
  17881. begin
  17882. GetProcedureAddress(_RtlPrefixString, ntdll, 'RtlPrefixString');
  17883. Result := TFNRtlPrefixString(_RtlPrefixString)(
  17884. String1, String2, CaseInsensitive
  17885. );
  17886. end;
  17887. // Dynamic version of RtlPrefixUnicodeString
  17888. function RtlPrefixUnicodeString(
  17889. String1 : PUNICODE_STRING;
  17890. String2 : PUNICODE_STRING;
  17891. CaseInsensitive : BOOLEAN
  17892. ): BOOLEAN; stdcall;
  17893. begin
  17894. GetProcedureAddress(_RtlPrefixUnicodeString, ntdll, 'RtlPrefixUnicodeString');
  17895. Result := TFNRtlPrefixUnicodeString(_RtlPrefixUnicodeString)(
  17896. String1, String2, CaseInsensitive
  17897. );
  17898. end;
  17899. // Dynamic version of RtlQueryDepthSList
  17900. function RtlQueryDepthSList(
  17901. ListHead : PSLIST_HEADER
  17902. ): USHORT; stdcall;
  17903. begin
  17904. GetProcedureAddress(_RtlQueryDepthSList, ntdll, 'RtlQueryDepthSList');
  17905. Result := TFNRtlQueryDepthSList(_RtlQueryDepthSList)(
  17906. ListHead
  17907. );
  17908. end;
  17909. // Dynamic version of RtlQueryEnvironmentVariable_U
  17910. function RtlQueryEnvironmentVariable_U(
  17911. Environment : PVOID;
  17912. VarName : PUNICODE_STRING;
  17913. VarValue : PUNICODE_STRING
  17914. ): NTSTATUS; stdcall;
  17915. begin
  17916. GetProcedureAddress(_RtlQueryEnvironmentVariable_U, ntdll, 'RtlQueryEnvironmentVariable_U');
  17917. Result := TFNRtlQueryEnvironmentVariable_U(_RtlQueryEnvironmentVariable_U)(
  17918. Environment, VarName, VarValue
  17919. );
  17920. end;
  17921. // Dynamic version of RtlQueryInformationAcl
  17922. function RtlQueryInformationAcl(
  17923. pAcl : PACL;
  17924. pAclInformation : PVOID;
  17925. nAclInformationLength : DWORD;
  17926. dwAclInformationClass : ACL_INFORMATION_CLASS
  17927. ): NTSTATUS; stdcall;
  17928. begin
  17929. GetProcedureAddress(_RtlQueryInformationAcl, ntdll, 'RtlQueryInformationAcl');
  17930. Result := TFNRtlQueryInformationAcl(_RtlQueryInformationAcl)(
  17931. pAcl, pAclInformation, nAclInformationLength, dwAclInformationClass
  17932. );
  17933. end;
  17934. // Dynamic version of RtlQueryProcessDebugInformation
  17935. function RtlQueryProcessDebugInformation(
  17936. ProcessId : ULONG;
  17937. DebugInfoClassMask : ULONG;
  17938. DebugBuffer : PDEBUG_BUFFER
  17939. ): NTSTATUS; stdcall;
  17940. begin
  17941. GetProcedureAddress(_RtlQueryProcessDebugInformation, ntdll, 'RtlQueryProcessDebugInformation');
  17942. Result := TFNRtlQueryProcessDebugInformation(_RtlQueryProcessDebugInformation)(
  17943. ProcessId, DebugInfoClassMask, DebugBuffer
  17944. );
  17945. end;
  17946. // Dynamic version of RtlQueryRegistryValues
  17947. function RtlQueryRegistryValues(
  17948. RelativeTo : ULONG;
  17949. Path : LPCWSTR;
  17950. QueryTable : PRTL_QUERY_REGISTRY_TABLE;
  17951. Context : PVOID;
  17952. Environment : PVOID
  17953. ): NTSTATUS; stdcall;
  17954. begin
  17955. GetProcedureAddress(_RtlQueryRegistryValues, ntdll, 'RtlQueryRegistryValues');
  17956. Result := TFNRtlQueryRegistryValues(_RtlQueryRegistryValues)(
  17957. RelativeTo, Path, QueryTable, Context, Environment
  17958. );
  17959. end;
  17960. // Dynamic version of RtlRaiseStatus
  17961. procedure RtlRaiseStatus(
  17962. Status : NTSTATUS
  17963. ); stdcall;
  17964. begin
  17965. GetProcedureAddress(_RtlRaiseStatus, ntdll, 'RtlRaiseStatus');
  17966. TFNRtlRaiseStatus(_RtlRaiseStatus)(
  17967. Status
  17968. );
  17969. end;
  17970. // Dynamic version of RtlRandom
  17971. function RtlRandom(
  17972. Seed : PULONG
  17973. ): ULONG; stdcall;
  17974. begin
  17975. GetProcedureAddress(_RtlRandom, ntdll, 'RtlRandom');
  17976. Result := TFNRtlRandom(_RtlRandom)(
  17977. Seed
  17978. );
  17979. end;
  17980. // Dynamic version of RtlRandomEx
  17981. function RtlRandomEx(
  17982. Seed : PULONG
  17983. ): ULONG; stdcall;
  17984. begin
  17985. GetProcedureAddress(_RtlRandomEx, ntdll, 'RtlRandomEx');
  17986. Result := TFNRtlRandomEx(_RtlRandomEx)(
  17987. Seed
  17988. );
  17989. end;
  17990. // Dynamic version of RtlReAllocateHeap
  17991. function RtlReAllocateHeap(
  17992. hHeap : HANDLE;
  17993. dwFlags : ULONG;
  17994. lpMem : PVOID;
  17995. dwBytes : SIZE_T
  17996. ): PVOID; stdcall;
  17997. begin
  17998. GetProcedureAddress(_RtlReAllocateHeap, ntdll, 'RtlReAllocateHeap');
  17999. Result := TFNRtlReAllocateHeap(_RtlReAllocateHeap)(
  18000. hHeap, dwFlags, lpMem, dwBytes
  18001. );
  18002. end;
  18003. // Dynamic version of RtlReleasePebLock
  18004. procedure RtlReleasePebLock(); stdcall;
  18005. begin
  18006. GetProcedureAddress(_RtlReleasePebLock, ntdll, 'RtlReleasePebLock');
  18007. TFNRtlReleasePebLock(_RtlReleasePebLock)();
  18008. end;
  18009. // Dynamic version of RtlRemoveVectoredExceptionHandler
  18010. function RtlRemoveVectoredExceptionHandler(
  18011. VectoredHandlerHandle : PVOID
  18012. ): ULONG; stdcall;
  18013. begin
  18014. GetProcedureAddress(_RtlRemoveVectoredExceptionHandler, ntdll, 'RtlRemoveVectoredExceptionHandler');
  18015. Result := TFNRtlRemoveVectoredExceptionHandler(_RtlRemoveVectoredExceptionHandler)(
  18016. VectoredHandlerHandle
  18017. );
  18018. end;
  18019. // Dynamic version of RtlRestoreLastWin32Error
  18020. procedure RtlRestoreLastWin32Error(
  18021. dwErrCode : DWORD
  18022. ); stdcall;
  18023. begin
  18024. GetProcedureAddress(_RtlRestoreLastWin32Error, ntdll, 'RtlRestoreLastWin32Error');
  18025. TFNRtlRestoreLastWin32Error(_RtlRestoreLastWin32Error)(
  18026. dwErrCode
  18027. );
  18028. end;
  18029. // Dynamic version of RtlRunDecodeUnicodeString
  18030. procedure RtlRunDecodeUnicodeString(
  18031. CodeSeed : UCHAR;
  18032. StringToDecode : PUNICODE_STRING
  18033. ); stdcall;
  18034. begin
  18035. GetProcedureAddress(_RtlRunDecodeUnicodeString, ntdll, 'RtlRunDecodeUnicodeString');
  18036. TFNRtlRunDecodeUnicodeString(_RtlRunDecodeUnicodeString)(
  18037. CodeSeed, StringToDecode
  18038. );
  18039. end;
  18040. // Dynamic version of RtlRunEncodeUnicodeString
  18041. procedure RtlRunEncodeUnicodeString(
  18042. var CodeSeed : UCHAR;
  18043. StringToEncode : PUNICODE_STRING
  18044. ); stdcall;
  18045. begin
  18046. GetProcedureAddress(_RtlRunEncodeUnicodeString, ntdll, 'RtlRunEncodeUnicodeString');
  18047. TFNRtlRunEncodeUnicodeString(_RtlRunEncodeUnicodeString)(
  18048. CodeSeed, StringToEncode
  18049. );
  18050. end;
  18051. // Dynamic version of RtlSecondsSince1970ToTime
  18052. procedure RtlSecondsSince1970ToTime(
  18053. SecondsSince1970 : ULONG;
  18054. Time : PLARGE_INTEGER
  18055. ); stdcall;
  18056. begin
  18057. GetProcedureAddress(_RtlSecondsSince1970ToTime, ntdll, 'RtlSecondsSince1970ToTime');
  18058. TFNRtlSecondsSince1970ToTime(_RtlSecondsSince1970ToTime)(
  18059. SecondsSince1970, Time
  18060. );
  18061. end;
  18062. // Dynamic version of RtlSecondsSince1980ToTime
  18063. procedure RtlSecondsSince1980ToTime(
  18064. SecondsSince1980 : ULONG;
  18065. Time : PLARGE_INTEGER
  18066. ); stdcall;
  18067. begin
  18068. GetProcedureAddress(_RtlSecondsSince1980ToTime, ntdll, 'RtlSecondsSince1980ToTime');
  18069. TFNRtlSecondsSince1980ToTime(_RtlSecondsSince1980ToTime)(
  18070. SecondsSince1980, Time
  18071. );
  18072. end;
  18073. // Dynamic version of RtlSelfRelativeToAbsoluteSD
  18074. function RtlSelfRelativeToAbsoluteSD(
  18075. pSelfRelativeSD : PSECURITY_DESCRIPTOR;
  18076. pAbsoluteSD : PSECURITY_DESCRIPTOR;
  18077. lpdwAbsoluteSDSize : LPDWORD;
  18078. pDacl : PACL;
  18079. lpdwDaclSize : LPDWORD;
  18080. pSacl : PACL;
  18081. lpdwSaclSize : LPDWORD;
  18082. pOwner : PSID;
  18083. lpdwOwnerSize : LPDWORD;
  18084. pPrimaryGroup : PSID;
  18085. lpdwPrimaryGroupSize : LPDWORD
  18086. ): NTSTATUS; stdcall;
  18087. begin
  18088. GetProcedureAddress(_RtlSelfRelativeToAbsoluteSD, ntdll, 'RtlSelfRelativeToAbsoluteSD');
  18089. Result := TFNRtlSelfRelativeToAbsoluteSD(_RtlSelfRelativeToAbsoluteSD)(
  18090. pSelfRelativeSD, pAbsoluteSD, lpdwAbsoluteSDSize, pDacl, lpdwDaclSize, pSacl, lpdwSaclSize, pOwner, lpdwOwnerSize, pPrimaryGroup, lpdwPrimaryGroupSize
  18091. );
  18092. end;
  18093. // Dynamic version of RtlSetAllBits
  18094. procedure RtlSetAllBits(
  18095. BitMapHeader : PRTL_BITMAP
  18096. ); stdcall;
  18097. begin
  18098. GetProcedureAddress(_RtlSetAllBits, ntdll, 'RtlSetAllBits');
  18099. TFNRtlSetAllBits(_RtlSetAllBits)(
  18100. BitMapHeader
  18101. );
  18102. end;
  18103. // Dynamic version of RtlSetBits
  18104. procedure RtlSetBits(
  18105. BitMapHeader : PRTL_BITMAP;
  18106. StartingIndex : ULONG;
  18107. NumberToSet : ULONG
  18108. ); stdcall;
  18109. begin
  18110. GetProcedureAddress(_RtlSetBits, ntdll, 'RtlSetBits');
  18111. TFNRtlSetBits(_RtlSetBits)(
  18112. BitMapHeader, StartingIndex, NumberToSet
  18113. );
  18114. end;
  18115. // Dynamic version of RtlSetControlSecurityDescriptor
  18116. function RtlSetControlSecurityDescriptor(
  18117. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  18118. ControlBitsOfInterest : SECURITY_DESCRIPTOR_CONTROL;
  18119. ControlBitsToSet : SECURITY_DESCRIPTOR_CONTROL
  18120. ): NTSTATUS; stdcall;
  18121. begin
  18122. GetProcedureAddress(_RtlSetControlSecurityDescriptor, ntdll, 'RtlSetControlSecurityDescriptor');
  18123. Result := TFNRtlSetControlSecurityDescriptor(_RtlSetControlSecurityDescriptor)(
  18124. pSecurityDescriptor, ControlBitsOfInterest, ControlBitsToSet
  18125. );
  18126. end;
  18127. // Dynamic version of RtlSetCriticalSectionSpinCount
  18128. function RtlSetCriticalSectionSpinCount(
  18129. lpCriticalSection : PRTL_CRITICAL_SECTION;
  18130. dwSpinCount : ULONG
  18131. ): DWORD; stdcall;
  18132. begin
  18133. GetProcedureAddress(_RtlSetCriticalSectionSpinCount, ntdll, 'RtlSetCriticalSectionSpinCount');
  18134. Result := TFNRtlSetCriticalSectionSpinCount(_RtlSetCriticalSectionSpinCount)(
  18135. lpCriticalSection, dwSpinCount
  18136. );
  18137. end;
  18138. // Dynamic version of RtlSetCurrentDirectory_U
  18139. function RtlSetCurrentDirectory_U(
  18140. NewCurrentDirectory : PUNICODE_STRING
  18141. ): NTSTATUS; stdcall;
  18142. begin
  18143. GetProcedureAddress(_RtlSetCurrentDirectory_U, ntdll, 'RtlSetCurrentDirectory_U');
  18144. Result := TFNRtlSetCurrentDirectory_U(_RtlSetCurrentDirectory_U)(
  18145. NewCurrentDirectory
  18146. );
  18147. end;
  18148. // Dynamic version of RtlSetDaclSecurityDescriptor
  18149. function RtlSetDaclSecurityDescriptor(
  18150. SecurityDescriptor : PSECURITY_DESCRIPTOR;
  18151. DaclPresent : BOOLEAN;
  18152. Dacl : PACL;
  18153. DaclDefaulted : BOOLEAN
  18154. ): NTSTATUS; stdcall;
  18155. begin
  18156. GetProcedureAddress(_RtlSetDaclSecurityDescriptor, ntdll, 'RtlSetDaclSecurityDescriptor');
  18157. Result := TFNRtlSetDaclSecurityDescriptor(_RtlSetDaclSecurityDescriptor)(
  18158. SecurityDescriptor, DaclPresent, Dacl, DaclDefaulted
  18159. );
  18160. end;
  18161. // Dynamic version of RtlSetGroupSecurityDescriptor
  18162. function RtlSetGroupSecurityDescriptor(
  18163. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  18164. pGroup : PSID;
  18165. bGroupDefaulted : BOOLEAN
  18166. ): NTSTATUS; stdcall;
  18167. begin
  18168. GetProcedureAddress(_RtlSetGroupSecurityDescriptor, ntdll, 'RtlSetGroupSecurityDescriptor');
  18169. Result := TFNRtlSetGroupSecurityDescriptor(_RtlSetGroupSecurityDescriptor)(
  18170. pSecurityDescriptor, pGroup, bGroupDefaulted
  18171. );
  18172. end;
  18173. // Dynamic version of RtlSetInformationAcl
  18174. function RtlSetInformationAcl(
  18175. pAcl : PACL;
  18176. pAclInformation : PVOID;
  18177. nInformationLength : DWORD;
  18178. dwAclInformationClass : ACL_INFORMATION_CLASS
  18179. ): NTSTATUS; stdcall;
  18180. begin
  18181. GetProcedureAddress(_RtlSetInformationAcl, ntdll, 'RtlSetInformationAcl');
  18182. Result := TFNRtlSetInformationAcl(_RtlSetInformationAcl)(
  18183. pAcl, pAclInformation, nInformationLength, dwAclInformationClass
  18184. );
  18185. end;
  18186. // Dynamic version of RtlSetLastWin32ErrorAndNtStatusFromNtStatus
  18187. function RtlSetLastWin32ErrorAndNtStatusFromNtStatus(
  18188. Status : NTSTATUS
  18189. ): ULONG; stdcall;
  18190. begin
  18191. GetProcedureAddress(_RtlSetLastWin32ErrorAndNtStatusFromNtStatus, ntdll, 'RtlSetLastWin32ErrorAndNtStatusFromNtStatus');
  18192. Result := TFNRtlSetLastWin32ErrorAndNtStatusFromNtStatus(_RtlSetLastWin32ErrorAndNtStatusFromNtStatus)(
  18193. Status
  18194. );
  18195. end;
  18196. // Dynamic version of RtlSetOwnerSecurityDescriptor
  18197. function RtlSetOwnerSecurityDescriptor(
  18198. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  18199. pOwner : PSID;
  18200. bOwnerDefaulted : BOOLEAN
  18201. ): NTSTATUS; stdcall;
  18202. begin
  18203. GetProcedureAddress(_RtlSetOwnerSecurityDescriptor, ntdll, 'RtlSetOwnerSecurityDescriptor');
  18204. Result := TFNRtlSetOwnerSecurityDescriptor(_RtlSetOwnerSecurityDescriptor)(
  18205. pSecurityDescriptor, pOwner, bOwnerDefaulted
  18206. );
  18207. end;
  18208. // Dynamic version of RtlSetProcessIsCritical
  18209. function RtlSetProcessIsCritical(
  18210. bIsCritical : BOOLEAN;
  18211. pbOldIsCriticalValue : PBOOLEAN;
  18212. bUnknownCanBeFalse : BOOLEAN
  18213. ): NTSTATUS; stdcall;
  18214. begin
  18215. GetProcedureAddress(_RtlSetProcessIsCritical, ntdll, 'RtlSetProcessIsCritical');
  18216. Result := TFNRtlSetProcessIsCritical(_RtlSetProcessIsCritical)(
  18217. bIsCritical, pbOldIsCriticalValue, bUnknownCanBeFalse
  18218. );
  18219. end;
  18220. // Dynamic version of RtlSetSaclSecurityDescriptor
  18221. function RtlSetSaclSecurityDescriptor(
  18222. pSecurityDescriptor : PSECURITY_DESCRIPTOR;
  18223. bSaclPresent : BOOLEAN;
  18224. pSacl : PACL;
  18225. SaclDefaulted : BOOLEAN
  18226. ): NTSTATUS; stdcall;
  18227. begin
  18228. GetProcedureAddress(_RtlSetSaclSecurityDescriptor, ntdll, 'RtlSetSaclSecurityDescriptor');
  18229. Result := TFNRtlSetSaclSecurityDescriptor(_RtlSetSaclSecurityDescriptor)(
  18230. pSecurityDescriptor, bSaclPresent, pSacl, SaclDefaulted
  18231. );
  18232. end;
  18233. // Dynamic version of RtlSetThreadIsCritical
  18234. function RtlSetThreadIsCritical(
  18235. bIsCritical : BOOLEAN;
  18236. pbOldIsCriticalValue : PBOOLEAN;
  18237. bUnknownCanBeFalse : BOOLEAN
  18238. ): NTSTATUS; stdcall;
  18239. begin
  18240. GetProcedureAddress(_RtlSetThreadIsCritical, ntdll, 'RtlSetThreadIsCritical');
  18241. Result := TFNRtlSetThreadIsCritical(_RtlSetThreadIsCritical)(
  18242. bIsCritical, pbOldIsCriticalValue, bUnknownCanBeFalse
  18243. );
  18244. end;
  18245. // Dynamic version of RtlSizeHeap
  18246. function RtlSizeHeap(
  18247. hHeap : HANDLE;
  18248. dwFlags : ULONG;
  18249. lpMem : PVOID
  18250. ): SIZE_T; stdcall;
  18251. begin
  18252. GetProcedureAddress(_RtlSizeHeap, ntdll, 'RtlSizeHeap');
  18253. Result := TFNRtlSizeHeap(_RtlSizeHeap)(
  18254. hHeap, dwFlags, lpMem
  18255. );
  18256. end;
  18257. // Dynamic version of RtlStringFromGUID
  18258. function RtlStringFromGUID(
  18259. Guid : REFGUID;
  18260. GuidString : PUNICODE_STRING
  18261. ): NTSTATUS; stdcall;
  18262. begin
  18263. GetProcedureAddress(_RtlStringFromGUID, ntdll, 'RtlStringFromGUID');
  18264. Result := TFNRtlStringFromGUID(_RtlStringFromGUID)(
  18265. Guid, GuidString
  18266. );
  18267. end;
  18268. // Dynamic version of RtlSubAuthorityCountSid
  18269. function RtlSubAuthorityCountSid(
  18270. pSid : PSID
  18271. ): PUCHAR; stdcall;
  18272. begin
  18273. GetProcedureAddress(_RtlSubAuthorityCountSid, ntdll, 'RtlSubAuthorityCountSid');
  18274. Result := TFNRtlSubAuthorityCountSid(_RtlSubAuthorityCountSid)(
  18275. pSid
  18276. );
  18277. end;
  18278. // Dynamic version of RtlSubAuthoritySid
  18279. function RtlSubAuthoritySid(
  18280. pSid : PSID;
  18281. nSubAuthority : DWORD
  18282. ): PDWORD; stdcall;
  18283. begin
  18284. GetProcedureAddress(_RtlSubAuthoritySid, ntdll, 'RtlSubAuthoritySid');
  18285. Result := TFNRtlSubAuthoritySid(_RtlSubAuthoritySid)(
  18286. pSid, nSubAuthority
  18287. );
  18288. end;
  18289. // Dynamic version of RtlSystemTimeToLocalTime
  18290. function RtlSystemTimeToLocalTime(
  18291. SystemTime : PLARGE_INTEGER;
  18292. LocalTime : PLARGE_INTEGER
  18293. ): NTSTATUS; stdcall;
  18294. begin
  18295. GetProcedureAddress(_RtlSystemTimeToLocalTime, ntdll, 'RtlSystemTimeToLocalTime');
  18296. Result := TFNRtlSystemTimeToLocalTime(_RtlSystemTimeToLocalTime)(
  18297. SystemTime, LocalTime
  18298. );
  18299. end;
  18300. // Dynamic version of RtlTimeFieldsToTime
  18301. function RtlTimeFieldsToTime(
  18302. TimeFields : PTIME_FIELDS;
  18303. Time : PLARGE_INTEGER
  18304. ): BOOLEAN; stdcall;
  18305. begin
  18306. GetProcedureAddress(_RtlTimeFieldsToTime, ntdll, 'RtlTimeFieldsToTime');
  18307. Result := TFNRtlTimeFieldsToTime(_RtlTimeFieldsToTime)(
  18308. TimeFields, Time
  18309. );
  18310. end;
  18311. // Dynamic version of RtlTimeToElapsedTimeFields
  18312. procedure RtlTimeToElapsedTimeFields(
  18313. Time : PLARGE_INTEGER;
  18314. TimeFields : PTIME_FIELDS
  18315. ); stdcall;
  18316. begin
  18317. GetProcedureAddress(_RtlTimeToElapsedTimeFields, ntdll, 'RtlTimeToElapsedTimeFields');
  18318. TFNRtlTimeToElapsedTimeFields(_RtlTimeToElapsedTimeFields)(
  18319. Time, TimeFields
  18320. );
  18321. end;
  18322. // Dynamic version of RtlTimeToSecondsSince1970
  18323. function RtlTimeToSecondsSince1970(
  18324. Time : PLARGE_INTEGER;
  18325. ElapsedSeconds : PULONG
  18326. ): BOOLEAN; stdcall;
  18327. begin
  18328. GetProcedureAddress(_RtlTimeToSecondsSince1970, ntdll, 'RtlTimeToSecondsSince1970');
  18329. Result := TFNRtlTimeToSecondsSince1970(_RtlTimeToSecondsSince1970)(
  18330. Time, ElapsedSeconds
  18331. );
  18332. end;
  18333. // Dynamic version of RtlTimeToSecondsSince1980
  18334. function RtlTimeToSecondsSince1980(
  18335. Time : PLARGE_INTEGER;
  18336. ElapsedSeconds : PULONG
  18337. ): BOOLEAN; stdcall;
  18338. begin
  18339. GetProcedureAddress(_RtlTimeToSecondsSince1980, ntdll, 'RtlTimeToSecondsSince1980');
  18340. Result := TFNRtlTimeToSecondsSince1980(_RtlTimeToSecondsSince1980)(
  18341. Time, ElapsedSeconds
  18342. );
  18343. end;
  18344. // Dynamic version of RtlTimeToTimeFields
  18345. procedure RtlTimeToTimeFields(
  18346. Time : PLARGE_INTEGER;
  18347. TimeFields : PTIME_FIELDS
  18348. ); stdcall;
  18349. begin
  18350. GetProcedureAddress(_RtlTimeToTimeFields, ntdll, 'RtlTimeToTimeFields');
  18351. TFNRtlTimeToTimeFields(_RtlTimeToTimeFields)(
  18352. Time, TimeFields
  18353. );
  18354. end;
  18355. // Dynamic version of RtlTryEnterCriticalSection
  18356. function RtlTryEnterCriticalSection(
  18357. lpCriticalSection : PRTL_CRITICAL_SECTION
  18358. ): BOOL; stdcall;
  18359. begin
  18360. GetProcedureAddress(_RtlTryEnterCriticalSection, ntdll, 'RtlTryEnterCriticalSection');
  18361. Result := TFNRtlTryEnterCriticalSection(_RtlTryEnterCriticalSection)(
  18362. lpCriticalSection
  18363. );
  18364. end;
  18365. // Dynamic version of RtlUnicodeStringToAnsiSize
  18366. function RtlUnicodeStringToAnsiSize(
  18367. UnicodeString : PUNICODE_STRING
  18368. ): ULONG; stdcall;
  18369. begin
  18370. GetProcedureAddress(_RtlUnicodeStringToAnsiSize, ntdll, 'RtlUnicodeStringToAnsiSize');
  18371. Result := TFNRtlUnicodeStringToAnsiSize(_RtlUnicodeStringToAnsiSize)(
  18372. UnicodeString
  18373. );
  18374. end;
  18375. // Dynamic version of RtlUnicodeStringToAnsiString
  18376. function RtlUnicodeStringToAnsiString(
  18377. DestinationString : PANSI_STRING;
  18378. SourceString : PUNICODE_STRING;
  18379. AllocateDestinationString : BOOLEAN
  18380. ): NTSTATUS; stdcall;
  18381. begin
  18382. GetProcedureAddress(_RtlUnicodeStringToAnsiString, ntdll, 'RtlUnicodeStringToAnsiString');
  18383. Result := TFNRtlUnicodeStringToAnsiString(_RtlUnicodeStringToAnsiString)(
  18384. DestinationString, SourceString, AllocateDestinationString
  18385. );
  18386. end;
  18387. // Dynamic version of RtlUnicodeStringToCountedOemString
  18388. function RtlUnicodeStringToCountedOemString(
  18389. DestinationString : POEM_STRING;
  18390. SourceString : PUNICODE_STRING;
  18391. AllocateDestinationString : BOOLEAN
  18392. ): NTSTATUS; stdcall;
  18393. begin
  18394. GetProcedureAddress(_RtlUnicodeStringToCountedOemString, ntdll, 'RtlUnicodeStringToCountedOemString');
  18395. Result := TFNRtlUnicodeStringToCountedOemString(_RtlUnicodeStringToCountedOemString)(
  18396. DestinationString, SourceString, AllocateDestinationString
  18397. );
  18398. end;
  18399. // Dynamic version of RtlUnicodeStringToInteger
  18400. function RtlUnicodeStringToInteger(
  18401. Str : PUNICODE_STRING;
  18402. Base : ULONG;
  18403. Value : PULONG
  18404. ): NTSTATUS; stdcall;
  18405. begin
  18406. GetProcedureAddress(_RtlUnicodeStringToInteger, ntdll, 'RtlUnicodeStringToInteger');
  18407. Result := TFNRtlUnicodeStringToInteger(_RtlUnicodeStringToInteger)(
  18408. Str, Base, Value
  18409. );
  18410. end;
  18411. // Dynamic version of RtlUnicodeStringToOemSize
  18412. function RtlUnicodeStringToOemSize(
  18413. UnicodeString : PUNICODE_STRING
  18414. ): ULONG; stdcall;
  18415. begin
  18416. GetProcedureAddress(_RtlUnicodeStringToOemSize, ntdll, 'RtlUnicodeStringToOemSize');
  18417. Result := TFNRtlUnicodeStringToOemSize(_RtlUnicodeStringToOemSize)(
  18418. UnicodeString
  18419. );
  18420. end;
  18421. // Dynamic version of RtlUnicodeStringToOemString
  18422. function RtlUnicodeStringToOemString(
  18423. DestinationString : POEM_STRING;
  18424. SourceString : PCUNICODE_STRING;
  18425. AllocateDestinationString : BOOLEAN
  18426. ): NTSTATUS; stdcall;
  18427. begin
  18428. GetProcedureAddress(_RtlUnicodeStringToOemString, ntdll, 'RtlUnicodeStringToOemString');
  18429. Result := TFNRtlUnicodeStringToOemString(_RtlUnicodeStringToOemString)(
  18430. DestinationString, SourceString, AllocateDestinationString
  18431. );
  18432. end;
  18433. // Dynamic version of RtlUnicodeToMultiByteSize
  18434. function RtlUnicodeToMultiByteSize(
  18435. BytesInMultiByteString : PULONG;
  18436. UnicodeString : PWSTR;
  18437. BytesInUnicodeString : ULONG
  18438. ): NTSTATUS; stdcall;
  18439. begin
  18440. GetProcedureAddress(_RtlUnicodeToMultiByteSize, ntdll, 'RtlUnicodeToMultiByteSize');
  18441. Result := TFNRtlUnicodeToMultiByteSize(_RtlUnicodeToMultiByteSize)(
  18442. BytesInMultiByteString, UnicodeString, BytesInUnicodeString
  18443. );
  18444. end;
  18445. // Dynamic version of RtlUniform
  18446. function RtlUniform(
  18447. Seed : PULONG
  18448. ): ULONG; stdcall;
  18449. begin
  18450. GetProcedureAddress(_RtlUniform, ntdll, 'RtlUniform');
  18451. Result := TFNRtlUniform(_RtlUniform)(
  18452. Seed
  18453. );
  18454. end;
  18455. // Dynamic version of RtlUnwind
  18456. procedure RtlUnwind(
  18457. TargetFrame : PVOID;
  18458. TargetIp : PVOID;
  18459. ExceptionRecord : PEXCEPTION_RECORD;
  18460. ReturnValue : PVOID
  18461. ); stdcall;
  18462. begin
  18463. GetProcedureAddress(_RtlUnwind, ntdll, 'RtlUnwind');
  18464. TFNRtlUnwind(_RtlUnwind)(
  18465. TargetFrame, TargetIp, ExceptionRecord, ReturnValue
  18466. );
  18467. end;
  18468. // Dynamic version of RtlUpcaseUnicodeChar
  18469. function RtlUpcaseUnicodeChar(
  18470. SourceCharacter : WCHAR
  18471. ): WCHAR; stdcall;
  18472. begin
  18473. GetProcedureAddress(_RtlUpcaseUnicodeChar, ntdll, 'RtlUpcaseUnicodeChar');
  18474. Result := TFNRtlUpcaseUnicodeChar(_RtlUpcaseUnicodeChar)(
  18475. SourceCharacter
  18476. );
  18477. end;
  18478. // Dynamic version of RtlUpcaseUnicodeString
  18479. function RtlUpcaseUnicodeString(
  18480. DestinationString : PUNICODE_STRING;
  18481. SourceString : PUNICODE_STRING;
  18482. AllocateDestinationString : BOOLEAN
  18483. ): NTSTATUS; stdcall;
  18484. begin
  18485. GetProcedureAddress(_RtlUpcaseUnicodeString, ntdll, 'RtlUpcaseUnicodeString');
  18486. Result := TFNRtlUpcaseUnicodeString(_RtlUpcaseUnicodeString)(
  18487. DestinationString, SourceString, AllocateDestinationString
  18488. );
  18489. end;
  18490. // Dynamic version of RtlUpcaseUnicodeStringToAnsiString
  18491. function RtlUpcaseUnicodeStringToAnsiString(
  18492. DestinationString : PSTRING;
  18493. SourceString : PUNICODE_STRING;
  18494. AllocateDestinationString : BOOLEAN
  18495. ): NTSTATUS; stdcall;
  18496. begin
  18497. GetProcedureAddress(_RtlUpcaseUnicodeStringToAnsiString, ntdll, 'RtlUpcaseUnicodeStringToAnsiString');
  18498. Result := TFNRtlUpcaseUnicodeStringToAnsiString(_RtlUpcaseUnicodeStringToAnsiString)(
  18499. DestinationString, SourceString, AllocateDestinationString
  18500. );
  18501. end;
  18502. // Dynamic version of RtlUpcaseUnicodeStringToCountedOemString
  18503. function RtlUpcaseUnicodeStringToCountedOemString(
  18504. DestinationString : PSTRING;
  18505. SourceString : PUNICODE_STRING;
  18506. AllocateDestinationString : BOOLEAN
  18507. ): NTSTATUS; stdcall;
  18508. begin
  18509. GetProcedureAddress(_RtlUpcaseUnicodeStringToCountedOemString, ntdll, 'RtlUpcaseUnicodeStringToCountedOemString');
  18510. Result := TFNRtlUpcaseUnicodeStringToCountedOemString(_RtlUpcaseUnicodeStringToCountedOemString)(
  18511. DestinationString, SourceString, AllocateDestinationString
  18512. );
  18513. end;
  18514. // Dynamic version of RtlUpcaseUnicodeStringToOemString
  18515. function RtlUpcaseUnicodeStringToOemString(
  18516. DestinationString : PSTRING;
  18517. SourceString : PUNICODE_STRING;
  18518. AllocateDestinationString : BOOLEAN
  18519. ): NTSTATUS; stdcall;
  18520. begin
  18521. GetProcedureAddress(_RtlUpcaseUnicodeStringToOemString, ntdll, 'RtlUpcaseUnicodeStringToOemString');
  18522. Result := TFNRtlUpcaseUnicodeStringToOemString(_RtlUpcaseUnicodeStringToOemString)(
  18523. DestinationString, SourceString, AllocateDestinationString
  18524. );
  18525. end;
  18526. // Dynamic version of RtlUpcaseUnicodeToMultiByteN
  18527. function RtlUpcaseUnicodeToMultiByteN(
  18528. MbString : PCHAR;
  18529. MbSize : ULONG;
  18530. var ResultSize : ULONG;
  18531. UnicodeString : PWSTR;
  18532. UnicodeSize : ULONG
  18533. ): NTSTATUS; stdcall;
  18534. begin
  18535. GetProcedureAddress(_RtlUpcaseUnicodeToMultiByteN, ntdll, 'RtlUpcaseUnicodeToMultiByteN');
  18536. Result := TFNRtlUpcaseUnicodeToMultiByteN(_RtlUpcaseUnicodeToMultiByteN)(
  18537. MbString, MbSize, ResultSize, UnicodeString, UnicodeSize
  18538. );
  18539. end;
  18540. // Dynamic version of RtlUpcaseUnicodeToOemN
  18541. function RtlUpcaseUnicodeToOemN(
  18542. OemString : PCHAR;
  18543. OemSize : ULONG;
  18544. var ResultSize : ULONG;
  18545. UnicodeString : PWSTR;
  18546. UnicodeSize : ULONG
  18547. ): NTSTATUS; stdcall;
  18548. begin
  18549. GetProcedureAddress(_RtlUpcaseUnicodeToOemN, ntdll, 'RtlUpcaseUnicodeToOemN');
  18550. Result := TFNRtlUpcaseUnicodeToOemN(_RtlUpcaseUnicodeToOemN)(
  18551. OemString, OemSize, ResultSize, UnicodeString, UnicodeSize
  18552. );
  18553. end;
  18554. // Dynamic version of RtlUpperChar
  18555. function RtlUpperChar(
  18556. Character : CHAR
  18557. ): CHAR; stdcall;
  18558. begin
  18559. GetProcedureAddress(_RtlUpperChar, ntdll, 'RtlUpperChar');
  18560. Result := TFNRtlUpperChar(_RtlUpperChar)(
  18561. Character
  18562. );
  18563. end;
  18564. // Dynamic version of RtlUpperString
  18565. procedure RtlUpperString(
  18566. DestinationString : PSTRING;
  18567. SourceString : PSTRING
  18568. ); stdcall;
  18569. begin
  18570. GetProcedureAddress(_RtlUpperString, ntdll, 'RtlUpperString');
  18571. TFNRtlUpperString(_RtlUpperString)(
  18572. DestinationString, SourceString
  18573. );
  18574. end;
  18575. // Dynamic version of RtlValidAcl
  18576. function RtlValidAcl(
  18577. Acl : PACL
  18578. ): BOOLEAN; stdcall;
  18579. begin
  18580. GetProcedureAddress(_RtlValidAcl, ntdll, 'RtlValidAcl');
  18581. Result := TFNRtlValidAcl(_RtlValidAcl)(
  18582. Acl
  18583. );
  18584. end;
  18585. // Dynamic version of RtlValidRelativeSecurityDescriptor
  18586. function RtlValidRelativeSecurityDescriptor(
  18587. SecurityDescriptorInput : PSECURITY_DESCRIPTOR;
  18588. SecurityDescriptorLength : ULONG;
  18589. RequiredInformation : SECURITY_INFORMATION
  18590. ): BOOLEAN; stdcall;
  18591. begin
  18592. GetProcedureAddress(_RtlValidRelativeSecurityDescriptor, ntdll, 'RtlValidRelativeSecurityDescriptor');
  18593. Result := TFNRtlValidRelativeSecurityDescriptor(_RtlValidRelativeSecurityDescriptor)(
  18594. SecurityDescriptorInput, SecurityDescriptorLength, RequiredInformation
  18595. );
  18596. end;
  18597. // Dynamic version of RtlValidSecurityDescriptor
  18598. function RtlValidSecurityDescriptor(
  18599. SecurityDescriptor : PSECURITY_DESCRIPTOR
  18600. ): BOOLEAN; stdcall;
  18601. begin
  18602. GetProcedureAddress(_RtlValidSecurityDescriptor, ntdll, 'RtlValidSecurityDescriptor');
  18603. Result := TFNRtlValidSecurityDescriptor(_RtlValidSecurityDescriptor)(
  18604. SecurityDescriptor
  18605. );
  18606. end;
  18607. // Dynamic version of RtlValidSid
  18608. function RtlValidSid(
  18609. pSid : PSID
  18610. ): BOOLEAN; stdcall;
  18611. begin
  18612. GetProcedureAddress(_RtlValidSid, ntdll, 'RtlValidSid');
  18613. Result := TFNRtlValidSid(_RtlValidSid)(
  18614. pSid
  18615. );
  18616. end;
  18617. // Dynamic version of RtlValidateHeap
  18618. function RtlValidateHeap(
  18619. hHeap : HANDLE;
  18620. dwFlags : ULONG;
  18621. lpMem : LPCVOID
  18622. ): BOOL; stdcall;
  18623. begin
  18624. GetProcedureAddress(_RtlValidateHeap, ntdll, 'RtlValidateHeap');
  18625. Result := TFNRtlValidateHeap(_RtlValidateHeap)(
  18626. hHeap, dwFlags, lpMem
  18627. );
  18628. end;
  18629. // Dynamic version of RtlValidateUnicodeString
  18630. function RtlValidateUnicodeString(
  18631. dwMustBeNull : ULONG;
  18632. ValidateThis : PUNICODE_STRING
  18633. ): NTSTATUS; stdcall;
  18634. begin
  18635. GetProcedureAddress(_RtlValidateUnicodeString, ntdll, 'RtlValidateUnicodeString');
  18636. Result := TFNRtlValidateUnicodeString(_RtlValidateUnicodeString)(
  18637. dwMustBeNull, ValidateThis
  18638. );
  18639. end;
  18640. // Dynamic version of RtlVerifyVersionInfo
  18641. function RtlVerifyVersionInfo(
  18642. VersionInfo : PRTL_OSVERSIONINFOEXW;
  18643. TypeMask : ULONG;
  18644. ConditionMask : ULONGLONG
  18645. ): NTSTATUS; stdcall;
  18646. begin
  18647. GetProcedureAddress(_RtlVerifyVersionInfo, ntdll, 'RtlVerifyVersionInfo');
  18648. Result := TFNRtlVerifyVersionInfo(_RtlVerifyVersionInfo)(
  18649. VersionInfo, TypeMask, ConditionMask
  18650. );
  18651. end;
  18652. // Dynamic version of RtlVolumeDeviceToDosName
  18653. function RtlVolumeDeviceToDosName(
  18654. VolumeDeviceObject : PVOID;
  18655. DosName : PUNICODE_STRING
  18656. ): NTSTATUS; stdcall;
  18657. begin
  18658. GetProcedureAddress(_RtlVolumeDeviceToDosName, ntdll, 'RtlVolumeDeviceToDosName');
  18659. Result := TFNRtlVolumeDeviceToDosName(_RtlVolumeDeviceToDosName)(
  18660. VolumeDeviceObject, DosName
  18661. );
  18662. end;
  18663. // Dynamic version of RtlWriteRegistryValue
  18664. function RtlWriteRegistryValue(
  18665. RelativeTo : ULONG;
  18666. Path : LPCWSTR;
  18667. ValueName : LPCWSTR;
  18668. ValueType : ULONG;
  18669. ValueData : PVOID;
  18670. ValueLength : ULONG
  18671. ): NTSTATUS; stdcall;
  18672. begin
  18673. GetProcedureAddress(_RtlWriteRegistryValue, ntdll, 'RtlWriteRegistryValue');
  18674. Result := TFNRtlWriteRegistryValue(_RtlWriteRegistryValue)(
  18675. RelativeTo, Path, ValueName, ValueType, ValueData, ValueLength
  18676. );
  18677. end;
  18678. // Dynamic version of RtlZeroHeap
  18679. function RtlZeroHeap(
  18680. hHeap : HANDLE;
  18681. dwFlags : ULONG
  18682. ): BOOLEAN; stdcall;
  18683. begin
  18684. GetProcedureAddress(_RtlZeroHeap, ntdll, 'RtlZeroHeap');
  18685. Result := TFNRtlZeroHeap(_RtlZeroHeap)(
  18686. hHeap, dwFlags
  18687. );
  18688. end;
  18689. // Dynamic version of RtlZeroMemory
  18690. procedure RtlZeroMemory(
  18691. Destination : PVOID;
  18692. Length : SIZE_T
  18693. ); stdcall;
  18694. begin
  18695. GetProcedureAddress(_RtlZeroMemory, ntdll, 'RtlZeroMemory');
  18696. TFNRtlZeroMemory(_RtlZeroMemory)(
  18697. Destination, Length
  18698. );
  18699. end;
  18700. // Dynamic version of RtlpNotOwnerCriticalSection
  18701. function RtlpNotOwnerCriticalSection(
  18702. lpCriticalSection : PRTL_CRITICAL_SECTION
  18703. ): BOOLEAN; stdcall;
  18704. begin
  18705. GetProcedureAddress(_RtlpNotOwnerCriticalSection, ntdll, 'RtlpNotOwnerCriticalSection');
  18706. Result := TFNRtlpNotOwnerCriticalSection(_RtlpNotOwnerCriticalSection)(
  18707. lpCriticalSection
  18708. );
  18709. end;
  18710. // Dynamic version of RtlpNtCreateKey
  18711. function RtlpNtCreateKey(
  18712. KeyHandle : PHANDLE;
  18713. DesiredAccess : ACCESS_MASK;
  18714. ObjectAttributes : POBJECT_ATTRIBUTES;
  18715. Unused1 : ULONG;
  18716. Unused2 : ULONG;
  18717. Disposition : PULONG
  18718. ): NTSTATUS; stdcall;
  18719. begin
  18720. GetProcedureAddress(_RtlpNtCreateKey, ntdll, 'RtlpNtCreateKey');
  18721. Result := TFNRtlpNtCreateKey(_RtlpNtCreateKey)(
  18722. KeyHandle, DesiredAccess, ObjectAttributes, Unused1, Unused2, Disposition
  18723. );
  18724. end;
  18725. // Dynamic version of RtlpNtEnumerateSubKey
  18726. function RtlpNtEnumerateSubKey(
  18727. KeyHandle : HANDLE;
  18728. SubKeyName : PUNICODE_STRING;
  18729. Index : ULONG;
  18730. Unused1 : ULONG
  18731. ): NTSTATUS; stdcall;
  18732. begin
  18733. GetProcedureAddress(_RtlpNtEnumerateSubKey, ntdll, 'RtlpNtEnumerateSubKey');
  18734. Result := TFNRtlpNtEnumerateSubKey(_RtlpNtEnumerateSubKey)(
  18735. KeyHandle, SubKeyName, Index, Unused1
  18736. );
  18737. end;
  18738. // Dynamic version of RtlpNtMakeTemporaryKey
  18739. function RtlpNtMakeTemporaryKey(
  18740. KeyHandle : HANDLE
  18741. ): NTSTATUS; stdcall;
  18742. begin
  18743. GetProcedureAddress(_RtlpNtMakeTemporaryKey, ntdll, 'RtlpNtMakeTemporaryKey');
  18744. Result := TFNRtlpNtMakeTemporaryKey(_RtlpNtMakeTemporaryKey)(
  18745. KeyHandle
  18746. );
  18747. end;
  18748. // Dynamic version of RtlpNtOpenKey
  18749. function RtlpNtOpenKey(
  18750. KeyHandle : HANDLE;
  18751. DesiredAccess : ACCESS_MASK;
  18752. ObjectAttributes : POBJECT_ATTRIBUTES;
  18753. Unused : ULONG
  18754. ): NTSTATUS; stdcall;
  18755. begin
  18756. GetProcedureAddress(_RtlpNtOpenKey, ntdll, 'RtlpNtOpenKey');
  18757. Result := TFNRtlpNtOpenKey(_RtlpNtOpenKey)(
  18758. KeyHandle, DesiredAccess, ObjectAttributes, Unused
  18759. );
  18760. end;
  18761. // Dynamic version of RtlpNtQueryValueKey
  18762. function RtlpNtQueryValueKey(
  18763. KeyHandle : HANDLE;
  18764. Type_ : PULONG;
  18765. Data : PVOID;
  18766. DataSize : PULONG;
  18767. Unused : ULONG
  18768. ): NTSTATUS; stdcall;
  18769. begin
  18770. GetProcedureAddress(_RtlpNtQueryValueKey, ntdll, 'RtlpNtQueryValueKey');
  18771. Result := TFNRtlpNtQueryValueKey(_RtlpNtQueryValueKey)(
  18772. KeyHandle, Type_, Data, DataSize, Unused
  18773. );
  18774. end;
  18775. // Dynamic version of RtlpNtSetValueKey
  18776. function RtlpNtSetValueKey(
  18777. KeyHandle : HANDLE;
  18778. Type_ : ULONG;
  18779. Data : PVOID;
  18780. DataSize : ULONG
  18781. ): NTSTATUS; stdcall;
  18782. begin
  18783. GetProcedureAddress(_RtlpNtSetValueKey, ntdll, 'RtlpNtSetValueKey');
  18784. Result := TFNRtlpNtSetValueKey(_RtlpNtSetValueKey)(
  18785. KeyHandle, Type_, Data, DataSize
  18786. );
  18787. end;
  18788. // Dynamic version of RtlxAnsiStringToUnicodeSize
  18789. function RtlxAnsiStringToUnicodeSize(
  18790. AnsiString : PANSI_STRING
  18791. ): ULONG; stdcall;
  18792. begin
  18793. GetProcedureAddress(_RtlxAnsiStringToUnicodeSize, ntdll, 'RtlxAnsiStringToUnicodeSize');
  18794. Result := TFNRtlxAnsiStringToUnicodeSize(_RtlxAnsiStringToUnicodeSize)(
  18795. AnsiString
  18796. );
  18797. end;
  18798. // Dynamic version of RtlxOemStringToUnicodeSize
  18799. function RtlxOemStringToUnicodeSize(
  18800. AnsiString : POEM_STRING
  18801. ): ULONG; stdcall;
  18802. begin
  18803. GetProcedureAddress(_RtlxOemStringToUnicodeSize, ntdll, 'RtlxOemStringToUnicodeSize');
  18804. Result := TFNRtlxOemStringToUnicodeSize(_RtlxOemStringToUnicodeSize)(
  18805. AnsiString
  18806. );
  18807. end;
  18808. // Dynamic version of RtlxUnicodeStringToAnsiSize
  18809. function RtlxUnicodeStringToAnsiSize(
  18810. UnicodeString : PUNICODE_STRING
  18811. ): ULONG; stdcall;
  18812. begin
  18813. GetProcedureAddress(_RtlxUnicodeStringToAnsiSize, ntdll, 'RtlxUnicodeStringToAnsiSize');
  18814. Result := TFNRtlxUnicodeStringToAnsiSize(_RtlxUnicodeStringToAnsiSize)(
  18815. UnicodeString
  18816. );
  18817. end;
  18818. // Dynamic version of RtlxUnicodeStringToOemSize
  18819. function RtlxUnicodeStringToOemSize(
  18820. UnicodeString : PUNICODE_STRING
  18821. ): ULONG; stdcall;
  18822. begin
  18823. GetProcedureAddress(_RtlxUnicodeStringToOemSize, ntdll, 'RtlxUnicodeStringToOemSize');
  18824. Result := TFNRtlxUnicodeStringToOemSize(_RtlxUnicodeStringToOemSize)(
  18825. UnicodeString
  18826. );
  18827. end;
  18828. // Dynamic version of VerSetConditionMask
  18829. function VerSetConditionMask(
  18830. ConditionMask : ULONGLONG;
  18831. dwTypeMask : DWORD;
  18832. Condition : BYTE
  18833. ): ULONGLONG; stdcall;
  18834. begin
  18835. GetProcedureAddress(_VerSetConditionMask, ntdll, 'VerSetConditionMask');
  18836. Result := TFNVerSetConditionMask(_VerSetConditionMask)(
  18837. ConditionMask, dwTypeMask, Condition
  18838. );
  18839. end;
  18840. {$ENDIF RTDL}
  18841. (*
  18842. Function forwarders which are not implemented by this unit
  18843. because they are available only on the 64bit editions of
  18844. Windows XP and Windows 2003 Server.
  18845. [KERNEL32.dll]RtlCaptureContext -> NTDLL.RtlCaptureContext
  18846. [KERNEL32.dll]RtlCaptureStackBackTrace -> NTDLL.RtlCaptureStackBackTrace
  18847. Usually the Kernel32 functions are documented in the Platform SDK, so knowing
  18848. of these function forwarders gives you the chance to find out the prototype of
  18849. the respective Native API to which the call is forwarded.
  18850. The following usermode Native APIs are not included in this unit:
  18851. -----------------------------------------------------------------
  18852. CsrAllocateCaptureBuffer [NT3, NT4, W2K, WXP, 2K3]
  18853. CsrAllocateMessagePointer [NT3, NT4, W2K, WXP, 2K3]
  18854. CsrCaptureMessageBuffer [NT3, NT4, W2K, WXP, 2K3]
  18855. CsrCaptureMessageMultiUnicodeStringsInPlace [WXP, 2K3]
  18856. CsrCaptureMessageString [NT3, NT4, W2K, WXP, 2K3]
  18857. CsrCaptureTimeout [NT3, NT4, W2K, WXP, 2K3]
  18858. CsrClientCallServer [NT3, NT4, W2K, WXP, 2K3]
  18859. CsrClientConnectToServer [NT3, NT4, W2K, WXP, 2K3]
  18860. CsrFreeCaptureBuffer [NT3, NT4, W2K, WXP, 2K3]
  18861. CsrIdentifyAlertableThread [NT3, NT4, W2K, WXP, 2K3]
  18862. CsrNewThread [NT3, NT4, W2K, WXP, 2K3]
  18863. CsrProbeForRead [NT3, NT4, W2K, WXP, 2K3]
  18864. CsrProbeForWrite [NT3, NT4, W2K, WXP, 2K3]
  18865. CsrSetPriorityClass [NT3, NT4, W2K, WXP, 2K3]
  18866. DbgPrintEx [WXP, 2K3]
  18867. DbgPrintReturnControlC [W2K, WXP, 2K3]
  18868. DbgPrompt [NT3, NT4, W2K, WXP, 2K3]
  18869. DbgSsHandleKmApiMsg [NT3, NT4, W2K]
  18870. DbgSsInitialize [NT3, NT4, W2K]
  18871. DbgUiConnectToDbg [NT3, NT4, W2K, WXP, 2K3]
  18872. DbgUiContinue [NT3, NT4, W2K, WXP, 2K3]
  18873. DbgUiConvertStateChangeStructure [WXP, 2K3]
  18874. DbgUiDebugActiveProcess [WXP, 2K3]
  18875. DbgUiGetThreadDebugObject [WXP, 2K3]
  18876. DbgUiIssueRemoteBreakin [WXP, 2K3]
  18877. DbgUiRemoteBreakin [WXP, 2K3]
  18878. DbgUiSetThreadDebugObject [WXP, 2K3]
  18879. DbgUiStopDebugging [WXP, 2K3]
  18880. DbgUiWaitStateChange [NT3, NT4, W2K, WXP, 2K3]
  18881. DbgUserBreakPoint [NT3, NT4, W2K, WXP, 2K3]
  18882. EtwControlTraceA [2K3]
  18883. EtwControlTraceW [2K3]
  18884. EtwCreateTraceInstanceId [2K3]
  18885. EtwEnableTrace [2K3]
  18886. EtwEnumerateTraceGuids [2K3]
  18887. EtwFlushTraceA [2K3]
  18888. EtwFlushTraceW [2K3]
  18889. EtwGetTraceEnableFlags [2K3]
  18890. EtwGetTraceEnableLevel [2K3]
  18891. EtwGetTraceLoggerHandle [2K3]
  18892. EtwNotificationRegistrationA [2K3]
  18893. EtwNotificationRegistrationW [2K3]
  18894. EtwQueryAllTracesA [2K3]
  18895. EtwQueryAllTracesW [2K3]
  18896. EtwQueryTraceA [2K3]
  18897. EtwQueryTraceW [2K3]
  18898. EtwReceiveNotificationsA [2K3]
  18899. EtwReceiveNotificationsW [2K3]
  18900. EtwRegisterTraceGuidsA [2K3]
  18901. EtwRegisterTraceGuidsW [2K3]
  18902. EtwStartTraceA [2K3]
  18903. EtwStartTraceW [2K3]
  18904. EtwStopTraceA [2K3]
  18905. EtwStopTraceW [2K3]
  18906. EtwTraceEvent [2K3]
  18907. EtwTraceEventInstance [2K3]
  18908. EtwTraceMessage [2K3]
  18909. EtwTraceMessageVa [2K3]
  18910. EtwUnregisterTraceGuids [2K3]
  18911. EtwUpdateTraceA [2K3]
  18912. EtwUpdateTraceW [2K3]
  18913. EtwpGetTraceBuffer [2K3]
  18914. EtwpSetHWConfigFunction [2K3]
  18915. KiUserApcDispatcher [NT3, NT4, W2K, WXP, 2K3]
  18916. KiUserCallbackDispatcher [NT3, NT4, W2K, WXP, 2K3]
  18917. KiUserExceptionDispatcher [NT3, NT4, W2K, WXP, 2K3]
  18918. LdrAccessOutOfProcessResource [WXP, 2K3]
  18919. LdrAddRefDll [WXP, 2K3]
  18920. LdrCreateOutOfProcessImage [WXP, 2K3]
  18921. LdrDestroyOutOfProcessImage [WXP, 2K3]
  18922. LdrEnumResources [NT3, NT4, W2K, WXP, 2K3]
  18923. LdrEnumerateLoadedModules [WXP, 2K3]
  18924. LdrFindCreateProcessManifest [WXP, 2K3]
  18925. LdrFindEntryForAddress [NT3, NT4, W2K, WXP, 2K3]
  18926. LdrFindResourceDirectory_U [NT3, NT4, W2K, WXP, 2K3]
  18927. LdrFindResourceEx_U [WXP, 2K3]
  18928. LdrFindResource_U [NT3, NT4, W2K, WXP, 2K3]
  18929. LdrFlushAlternateResourceModules [W2K, WXP, 2K3]
  18930. LdrGetDllHandleEx [WXP, 2K3]
  18931. LdrHotPatchRoutine [2K3]
  18932. LdrInitShimEngineDynamic [WXP, 2K3]
  18933. LdrInitializeThunk [NT3, NT4, W2K, WXP, 2K3]
  18934. LdrLoadAlternateResourceModule [W2K, WXP, 2K3]
  18935. LdrLockLoaderLock [WXP, 2K3]
  18936. LdrProcessRelocationBlock [NT3, NT4, W2K, WXP, 2K3]
  18937. LdrQueryImageFileExecutionOptionsEx [2K3]
  18938. LdrSetAppCompatDllRedirectionCallback [WXP, 2K3]
  18939. LdrSetDllManifestProber [WXP, 2K3]
  18940. LdrUnloadAlternateResourceModule [W2K, WXP, 2K3]
  18941. LdrUnlockLoaderLock [WXP, 2K3]
  18942. LdrVerifyImageMatchesChecksum [NT3, NT4, W2K, WXP, 2K3]
  18943. NPXEMULATORTABLE [NT3, NT4, W2K]
  18944. NlsAnsiCodePage [NT4, W2K, WXP, 2K3]
  18945. NlsMbCodePageTag [NT3, NT4, W2K, WXP, 2K3]
  18946. NlsMbOemCodePageTag [NT3, NT4, W2K, WXP, 2K3]
  18947. NtAddBootEntry [WXP, 2K3]
  18948. NtAddDriverEntry [2K3]
  18949. NtApphelpCacheControl [2K3]
  18950. NtCompactKeys [WXP, 2K3]
  18951. NtCompareTokens [WXP, 2K3]
  18952. NtCompressKey [WXP, 2K3]
  18953. NtCreateDebugObject [WXP, 2K3]
  18954. NtCreateJobSet [WXP, 2K3]
  18955. NtCreateKeyedEvent [WXP, 2K3]
  18956. NtCreateProcessEx [WXP, 2K3]
  18957. NtDebugContinue [WXP, 2K3]
  18958. NtDeleteBootEntry [WXP, 2K3]
  18959. NtDeleteDriverEntry [2K3]
  18960. NtEnumerateBootEntries [WXP, 2K3]
  18961. NtEnumerateDriverEntries [2K3]
  18962. NtEnumerateSystemEnvironmentValuesEx [WXP, 2K3]
  18963. NtIsProcessInJob [WXP, 2K3]
  18964. NtLoadKeyEx [2K3]
  18965. NtLockProductActivationKeys [WXP, 2K3]
  18966. NtLockRegistryKey [WXP, 2K3]
  18967. NtModifyBootEntry [WXP, 2K3]
  18968. NtModifyDriverEntry [2K3]
  18969. NtOpenKeyedEvent [WXP, 2K3]
  18970. NtOpenProcessTokenEx [WXP, 2K3]
  18971. NtOpenThreadTokenEx [WXP, 2K3]
  18972. NtQueryBootEntryOrder [WXP, 2K3]
  18973. NtQueryBootOptions [WXP, 2K3]
  18974. NtQueryDebugFilterState [WXP, 2K3]
  18975. NtQueryDriverEntryOrder [2K3]
  18976. NtQueryOpenSubKeysEx [2K3]
  18977. NtQuerySystemEnvironmentValueEx [WXP, 2K3]
  18978. NtReleaseKeyedEvent [WXP, 2K3]
  18979. NtRenameKey [WXP, 2K3]
  18980. NtSetBootEntryOrder [WXP, 2K3]
  18981. NtSetBootOptions [WXP, 2K3]
  18982. NtSetDebugFilterState [WXP, 2K3]
  18983. NtSetDriverEntryOrder [2K3]
  18984. NtSetEventBoostPriority [WXP, 2K3]
  18985. NtSetInformationDebugObject [WXP, 2K3]
  18986. NtSetSystemEnvironmentValueEx [WXP, 2K3]
  18987. NtTraceEvent [WXP, 2K3]
  18988. NtTranslateFilePath [WXP, 2K3]
  18989. NtUnloadKey2 [2K3]
  18990. NtUnloadKeyEx [WXP, 2K3]
  18991. NtWaitForDebugEvent [WXP, 2K3]
  18992. NtWaitForKeyedEvent [WXP, 2K3]
  18993. PfxFindPrefix [NT3, NT4, W2K, WXP, 2K3]
  18994. PfxInitialize [NT3, NT4, W2K, WXP, 2K3]
  18995. PfxInsertPrefix [NT3, NT4, W2K, WXP, 2K3]
  18996. PfxRemovePrefix [NT3, NT4, W2K, WXP, 2K3]
  18997. PropertyLengthAsVariant [NT4, W2K, WXP, 2K3]
  18998. RestoreEm87Context [NT3, NT4, W2K, WXP, 2K3]
  18999. RtlAbortRXact [NT3, NT4, W2K, WXP, 2K3]
  19000. RtlAcquireResourceExclusive [NT3, NT4, W2K, WXP, 2K3]
  19001. RtlAcquireResourceShared [NT3, NT4, W2K, WXP, 2K3]
  19002. RtlActivateActivationContext [WXP, 2K3]
  19003. RtlActivateActivationContextEx [WXP, 2K3]
  19004. RtlActivateActivationContextUnsafeFast [WXP, 2K3]
  19005. RtlAddAccessAllowedObjectAce [W2K, WXP, 2K3]
  19006. RtlAddAccessDeniedObjectAce [W2K, WXP, 2K3]
  19007. RtlAddActionToRXact [NT3, NT4, W2K, WXP, 2K3]
  19008. RtlAddAtomToAtomTable [NT4, W2K, WXP, 2K3]
  19009. RtlAddAttributeActionToRXact [NT3, NT4, W2K, WXP, 2K3]
  19010. RtlAddAuditAccessObjectAce [W2K, WXP, 2K3]
  19011. RtlAddCompoundAce [NT4, W2K, WXP, 2K3]
  19012. RtlAddRefActivationContext [WXP, 2K3]
  19013. RtlAddRefMemoryStream [WXP, 2K3]
  19014. RtlAddressInSectionTable [WXP, 2K3]
  19015. RtlAllocateHandle [NT4, W2K, WXP, 2K3]
  19016. RtlAppendPathElement [WXP, 2K3]
  19017. RtlApplicationVerifierStop [WXP, 2K3]
  19018. RtlApplyRXact [NT3, NT4, W2K, WXP, 2K3]
  19019. RtlApplyRXactNoFlush [NT3, NT4, W2K, WXP, 2K3]
  19020. RtlAssert2 [WXP]
  19021. RtlCallbackLpcClient [W2K]
  19022. RtlCancelTimer [W2K, WXP, 2K3]
  19023. RtlCaptureStackBackTrace [NT3, NT4, W2K, WXP, 2K3]
  19024. RtlCaptureStackContext [WXP, 2K3]
  19025. RtlCheckProcessParameters [WXP, 2K3]
  19026. RtlCloneMemoryStream [WXP, 2K3]
  19027. RtlCommitMemoryStream [WXP, 2K3]
  19028. RtlCompressBuffer [NT3, NT4, W2K, WXP, 2K3]
  19029. RtlComputeCrc32 [WXP, 2K3]
  19030. RtlComputeImportTableHash [WXP, 2K3]
  19031. RtlComputePrivatizedDllName_U [WXP, 2K3]
  19032. RtlConsoleMultiByteToUnicodeN [NT3, NT4, W2K, WXP, 2K3]
  19033. RtlConvertExclusiveToShared [NT3, NT4, W2K, WXP, 2K3]
  19034. RtlConvertPropertyToVariant [NT4, W2K, WXP, 2K3]
  19035. RtlConvertSharedToExclusive [NT3, NT4, W2K, WXP, 2K3]
  19036. RtlConvertToAutoInheritSecurityObject [W2K, WXP, 2K3]
  19037. RtlConvertUiListToApiList [NT3, NT4, W2K, WXP, 2K3]
  19038. RtlConvertVariantToProperty [NT4, W2K, WXP, 2K3]
  19039. RtlCopyLuidAndAttributesArray [NT3, NT4, W2K, WXP, 2K3]
  19040. RtlCopyMappedMemory [2K3]
  19041. RtlCopyMemoryStreamTo [WXP, 2K3]
  19042. RtlCopyOutOfProcessMemoryStreamTo [WXP, 2K3]
  19043. RtlCopySidAndAttributesArray [NT3, NT4, W2K, WXP, 2K3]
  19044. RtlCreateActivationContext [WXP, 2K3]
  19045. RtlCreateAndSetSD [NT3, NT4, W2K, WXP, 2K3]
  19046. RtlCreateAtomTable [NT4, W2K, WXP, 2K3]
  19047. RtlCreateBootStatusDataFile [WXP, 2K3]
  19048. RtlCreateEnvironment [NT3, NT4, W2K, WXP, 2K3]
  19049. RtlCreateLpcServer [W2K]
  19050. RtlCreateSystemVolumeInformationFolder [WXP, 2K3]
  19051. RtlCreateTagHeap [NT3, NT4, W2K, WXP, 2K3]
  19052. RtlCreateTimer [W2K, WXP, 2K3]
  19053. RtlCreateTimerQueue [W2K, WXP, 2K3]
  19054. RtlCreateUserSecurityObject [NT3, NT4, W2K, WXP, 2K3]
  19055. RtlCustomCPToUnicodeN [NT3, NT4, W2K, WXP, 2K3]
  19056. RtlDeactivateActivationContext [WXP, 2K3]
  19057. RtlDeactivateActivationContextUnsafeFast [WXP, 2K3]
  19058. RtlDebugPrintTimes [W2K, WXP, 2K3]
  19059. RtlDecompressBuffer [NT3, NT4, W2K, WXP, 2K3]
  19060. RtlDecompressFragment [NT3, NT4, W2K, WXP, 2K3]
  19061. RtlDefaultNpAcl [W2K, WXP, 2K3]
  19062. RtlDeleteAtomFromAtomTable [NT4, W2K, WXP, 2K3]
  19063. RtlDeleteElementGenericTable [NT3, NT4, W2K, WXP, 2K3]
  19064. RtlDeleteElementGenericTableAvl [WXP, 2K3]
  19065. RtlDeleteNoSplay [NT4, W2K, WXP, 2K3]
  19066. RtlDeleteResource [NT3, NT4, W2K, WXP, 2K3]
  19067. RtlDeleteSecurityObject [NT3, NT4, W2K, WXP, 2K3]
  19068. RtlDeleteTimer [W2K, WXP, 2K3]
  19069. RtlDeleteTimerQueue [W2K, WXP, 2K3]
  19070. RtlDeleteTimerQueueEx [W2K, WXP, 2K3]
  19071. RtlDeregisterWait [W2K, WXP, 2K3]
  19072. RtlDeregisterWaitEx [W2K, WXP, 2K3]
  19073. RtlDestroyAtomTable [NT4, W2K, WXP, 2K3]
  19074. RtlDestroyEnvironment [NT3, NT4, W2K, WXP, 2K3]
  19075. RtlDestroyHandleTable [NT4, W2K, WXP, 2K3]
  19076. RtlDllShutdownInProgress [WXP, 2K3]
  19077. RtlDosApplyFileIsolationRedirection_Ustr [WXP, 2K3]
  19078. RtlDosPathNameToRelativeNtPathName_U [2K3]
  19079. RtlDosSearchPath_Ustr [WXP, 2K3]
  19080. RtlDumpResource [NT3, NT4, W2K, WXP, 2K3]
  19081. RtlEmptyAtomTable [NT4, W2K, WXP, 2K3]
  19082. RtlEnumProcessHeaps [NT3, NT4, W2K, WXP, 2K3]
  19083. RtlEnumerateGenericTable [NT3, NT4, W2K, WXP, 2K3]
  19084. RtlEnumerateGenericTableAvl [WXP, 2K3]
  19085. RtlEnumerateGenericTableLikeADirectory [WXP, 2K3]
  19086. RtlEnumerateGenericTableWithoutSplaying [NT3, NT4, W2K, WXP, 2K3]
  19087. RtlEnumerateGenericTableWithoutSplayingAvl [WXP, 2K3]
  19088. RtlExitUserThread [WXP, 2K3]
  19089. RtlExtendHeap [NT3, NT4, W2K, WXP, 2K3]
  19090. RtlFinalReleaseOutOfProcessMemoryStream [WXP, 2K3]
  19091. RtlFindActivationContextSectionGuid [WXP, 2K3]
  19092. RtlFindActivationContextSectionString [WXP, 2K3]
  19093. RtlFindClearRuns [WXP, 2K3]
  19094. RtlFindMessage [NT3, NT4, W2K, WXP, 2K3]
  19095. RtlFirstEntrySList [WXP, 2K3]
  19096. RtlFlushSecureMemoryCache [WXP, 2K3]
  19097. RtlFormatMessage [NT3, NT4, W2K, WXP, 2K3]
  19098. RtlFreeHandle [NT4, W2K, WXP, 2K3]
  19099. RtlFreeThreadActivationContextStack [WXP, 2K3]
  19100. RtlFreeUserThreadStack [NT4, W2K, WXP, 2K3]
  19101. RtlGenerate8dot3Name [NT3, NT4, W2K, WXP, 2K3]
  19102. RtlGetActiveActivationContext [WXP, 2K3]
  19103. RtlGetCompressionWorkSpaceSize [NT3, NT4, W2K, WXP, 2K3]
  19104. RtlGetElementGenericTable [NT3, NT4, W2K, WXP, 2K3]
  19105. RtlGetElementGenericTableAvl [WXP, 2K3]
  19106. RtlGetFrame [WXP, 2K3]
  19107. RtlGetFullPathName_UstrEx [2K3]
  19108. RtlGetLengthWithoutLastFullDosOrNtPathElement [WXP, 2K3]
  19109. RtlGetLengthWithoutTrailingPathSeperators [WXP, 2K3]
  19110. RtlGetNativeSystemInformation [WXP, 2K3]
  19111. RtlGetSecurityDescriptorRMControl [W2K, WXP, 2K3]
  19112. RtlGetSetBootStatusData [WXP, 2K3]
  19113. RtlGetThreadErrorMode [2K3]
  19114. RtlGetUnloadEventTrace [2K3]
  19115. RtlGetUserInfoHeap [NT3, NT4, W2K, WXP, 2K3]
  19116. RtlHashUnicodeString [WXP, 2K3]
  19117. RtlImpersonateLpcClient [W2K]
  19118. RtlInitCodePageTable [NT3, NT4, W2K, WXP, 2K3]
  19119. RtlInitMemoryStream [WXP, 2K3]
  19120. RtlInitNlsTables [NT3, NT4, W2K, WXP, 2K3]
  19121. RtlInitOutOfProcessMemoryStream [WXP, 2K3]
  19122. RtlInitializeAtomPackage [NT4, W2K, WXP, 2K3]
  19123. RtlInitializeContext [NT3, NT4, W2K, WXP, 2K3]
  19124. RtlInitializeGenericTable [NT3, NT4, W2K, WXP, 2K3]
  19125. RtlInitializeGenericTableAvl [WXP, 2K3]
  19126. RtlInitializeHandleTable [NT4, W2K, WXP, 2K3]
  19127. RtlInitializeRXact [NT3, NT4, W2K, WXP, 2K3]
  19128. RtlInitializeResource [NT3, NT4, W2K, WXP, 2K3]
  19129. RtlInsertElementGenericTable [NT3, NT4, W2K, WXP, 2K3]
  19130. RtlInsertElementGenericTableAvl [WXP, 2K3]
  19131. RtlInsertElementGenericTableFull [2K3]
  19132. RtlInsertElementGenericTableFullAvl [2K3]
  19133. RtlInterlockedCompareExchange64 [2K3]
  19134. RtlInterlockedPushListSList [WXP, 2K3]
  19135. RtlIpv4AddressToStringExA [2K3]
  19136. RtlIpv4AddressToStringExW [2K3]
  19137. RtlIpv4StringToAddressA [WXP, 2K3]
  19138. RtlIpv4StringToAddressExA [2K3]
  19139. RtlIpv4StringToAddressExW [2K3]
  19140. RtlIpv4StringToAddressW [WXP, 2K3]
  19141. RtlIpv6AddressToStringA [WXP, 2K3]
  19142. RtlIpv6AddressToStringExA [2K3]
  19143. RtlIpv6AddressToStringExW [2K3]
  19144. RtlIpv6AddressToStringW [WXP, 2K3]
  19145. RtlIpv6StringToAddressA [WXP, 2K3]
  19146. RtlIpv6StringToAddressExA [2K3]
  19147. RtlIpv6StringToAddressExW [2K3]
  19148. RtlIpv6StringToAddressW [WXP, 2K3]
  19149. RtlIsActivationContextActive [WXP, 2K3]
  19150. RtlIsGenericTableEmpty [NT3, NT4, W2K, WXP, 2K3]
  19151. RtlIsGenericTableEmptyAvl [WXP, 2K3]
  19152. RtlIsThreadWithinLoaderCallout [WXP, 2K3]
  19153. RtlIsValidHandle [NT4, W2K, WXP, 2K3]
  19154. RtlIsValidIndexHandle [NT4, W2K, WXP, 2K3]
  19155. RtlLockBootStatusData [WXP, 2K3]
  19156. RtlLockMemoryStreamRegion [WXP, 2K3]
  19157. RtlLogStackBackTrace [WXP, 2K3]
  19158. RtlLookupAtomInAtomTable [NT4, W2K, WXP, 2K3]
  19159. RtlLookupElementGenericTable [NT3, NT4, W2K, WXP, 2K3]
  19160. RtlLookupElementGenericTableAvl [WXP, 2K3]
  19161. RtlLookupElementGenericTableFull [2K3]
  19162. RtlLookupElementGenericTableFullAvl [2K3]
  19163. RtlMultiAppendUnicodeStringBuffer [WXP, 2K3]
  19164. RtlMultiByteToUnicodeN [NT3, NT4, W2K, WXP, 2K3]
  19165. RtlMultiByteToUnicodeSize [NT3, NT4, W2K, WXP, 2K3]
  19166. RtlMultipleAllocateHeap [2K3]
  19167. RtlMultipleFreeHeap [2K3]
  19168. RtlNewInstanceSecurityObject [NT3, NT4, W2K, WXP, 2K3]
  19169. RtlNewSecurityGrantedAccess [NT3, NT4, W2K, WXP, 2K3]
  19170. RtlNewSecurityObject [NT3, NT4, W2K, WXP, 2K3]
  19171. RtlNewSecurityObjectEx [W2K, WXP, 2K3]
  19172. RtlNewSecurityObjectWithMultipleInheritance [WXP, 2K3]
  19173. RtlNtPathNameToDosPathName [WXP, 2K3]
  19174. RtlNumberGenericTableElements [NT3, NT4, W2K, WXP, 2K3]
  19175. RtlNumberGenericTableElementsAvl [WXP, 2K3]
  19176. RtlPcToFileHeader [NT3, NT4, W2K, WXP, 2K3]
  19177. RtlPinAtomInAtomTable [NT4, W2K, WXP, 2K3]
  19178. RtlPopFrame [WXP, 2K3]
  19179. RtlProtectHeap [NT3, NT4, W2K, WXP, 2K3]
  19180. RtlPushFrame [WXP, 2K3]
  19181. RtlQueryAtomInAtomTable [NT4, W2K, WXP, 2K3]
  19182. RtlQueryHeapInformation [W2K, WXP, 2K3]
  19183. RtlQueryInformationActivationContext [WXP, 2K3]
  19184. RtlQueryInformationActiveActivationContext [WXP, 2K3]
  19185. RtlQueryInterfaceMemoryStream [WXP, 2K3]
  19186. RtlQueryProcessBackTraceInformation [NT3, NT4, W2K, WXP, 2K3]
  19187. RtlQueryProcessHeapInformation [NT3, NT4, W2K, WXP, 2K3]
  19188. RtlQueryProcessLockInformation [NT3, NT4, W2K, WXP, 2K3]
  19189. RtlQuerySecurityObject [NT3, NT4, W2K, WXP, 2K3]
  19190. RtlQueryTagHeap [NT3, NT4, W2K, WXP, 2K3]
  19191. RtlQueryTimeZoneInformation [NT3, NT4, W2K, WXP, 2K3]
  19192. RtlQueueApcWow64Thread [WXP, 2K3]
  19193. RtlQueueWorkItem [W2K, WXP, 2K3]
  19194. RtlRaiseException [NT3, NT4, W2K, WXP, 2K3]
  19195. RtlReadMemoryStream [WXP, 2K3]
  19196. RtlReadOutOfProcessMemoryStream [WXP, 2K3]
  19197. RtlRealPredecessor [NT3, NT4, W2K, WXP, 2K3]
  19198. RtlRealSuccessor [NT3, NT4, W2K, WXP, 2K3]
  19199. RtlRegisterSecureMemoryCacheCallback [WXP, 2K3]
  19200. RtlRegisterWait [W2K, WXP, 2K3]
  19201. RtlReleaseActivationContext [WXP, 2K3]
  19202. RtlReleaseMemoryStream [WXP, 2K3]
  19203. RtlReleaseRelativeName [2K3]
  19204. RtlReleaseResource [NT3, NT4, W2K, WXP, 2K3]
  19205. RtlRemoteCall [NT3, NT4, W2K, WXP, 2K3]
  19206. RtlResetRtlTranslations [NT3, NT4, W2K, WXP, 2K3]
  19207. RtlRevertMemoryStream [WXP, 2K3]
  19208. RtlSeekMemoryStream [WXP, 2K3]
  19209. RtlSelfRelativeToAbsoluteSD2 [W2K, WXP, 2K3]
  19210. RtlSetAttributesSecurityDescriptor [NT4, W2K, WXP, 2K3]
  19211. RtlSetCurrentEnvironment [NT3, NT4, W2K, WXP, 2K3]
  19212. RtlSetEnvironmentStrings [2K3]
  19213. RtlSetEnvironmentVariable [NT3, NT4, W2K, WXP, 2K3]
  19214. RtlSetHeapInformation [W2K, WXP, 2K3]
  19215. RtlSetIoCompletionCallback [W2K, WXP, 2K3]
  19216. RtlSetMemoryStreamSize [WXP, 2K3]
  19217. RtlSetSecurityDescriptorRMControl [W2K, WXP, 2K3]
  19218. RtlSetSecurityObject [NT3, NT4, W2K, WXP, 2K3]
  19219. RtlSetSecurityObjectEx [W2K, WXP, 2K3]
  19220. RtlSetThreadErrorMode [2K3]
  19221. RtlSetThreadPoolStartFunc [W2K, WXP, 2K3]
  19222. RtlSetTimeZoneInformation [NT3, NT4, W2K, WXP, 2K3]
  19223. RtlSetTimer [W2K, WXP, 2K3]
  19224. RtlSetUnicodeCallouts [NT4, W2K, WXP, 2K3]
  19225. RtlSetUserFlagsHeap [NT3, NT4, W2K, WXP, 2K3]
  19226. RtlSetUserValueHeap [NT3, NT4, W2K, WXP, 2K3]
  19227. RtlShutdownLpcServer [W2K]
  19228. RtlSplay [NT3, NT4, W2K, WXP, 2K3]
  19229. RtlStartRXact [NT3, NT4, W2K, WXP, 2K3]
  19230. RtlStatMemoryStream [WXP, 2K3]
  19231. RtlSubtreePredecessor [NT3, NT4, W2K, WXP, 2K3]
  19232. RtlSubtreeSuccessor [NT3, NT4, W2K, WXP, 2K3]
  19233. RtlTraceDatabaseAdd [W2K, WXP, 2K3]
  19234. RtlTraceDatabaseCreate [W2K, WXP, 2K3]
  19235. RtlTraceDatabaseDestroy [W2K, WXP, 2K3]
  19236. RtlTraceDatabaseEnumerate [W2K, WXP, 2K3]
  19237. RtlTraceDatabaseFind [W2K, WXP, 2K3]
  19238. RtlTraceDatabaseLock [W2K, WXP, 2K3]
  19239. RtlTraceDatabaseUnlock [W2K, WXP, 2K3]
  19240. RtlTraceDatabaseValidate [W2K, WXP, 2K3]
  19241. RtlUnhandledExceptionFilter [WXP, 2K3]
  19242. RtlUnhandledExceptionFilter2 [WXP, 2K3]
  19243. RtlUnicodeToCustomCPN [NT3, NT4, W2K, WXP, 2K3]
  19244. RtlUnicodeToMultiByteN [NT3, NT4, W2K, WXP, 2K3]
  19245. RtlUnicodeToOemN [NT3, NT4, W2K, WXP, 2K3]
  19246. RtlUnlockBootStatusData [WXP, 2K3]
  19247. RtlUnlockHeap [NT3, NT4, W2K, WXP, 2K3]
  19248. RtlUnlockMemoryStreamRegion [WXP, 2K3]
  19249. RtlUpcaseUnicodeToCustomCPN [NT3, NT4, W2K, WXP, 2K3]
  19250. RtlUpdateTimer [W2K, WXP, 2K3]
  19251. RtlUsageHeap [NT3, NT4, W2K, WXP, 2K3]
  19252. RtlValidateProcessHeaps [NT3, NT4, W2K, WXP, 2K3]
  19253. RtlWalkFrameChain [W2K, WXP, 2K3]
  19254. RtlWalkHeap [NT3, NT4, W2K, WXP, 2K3]
  19255. RtlWow64EnableFsRedirection [2K3]
  19256. RtlWriteMemoryStream [WXP, 2K3]
  19257. RtlZombifyActivationContext [WXP, 2K3]
  19258. RtlpApplyLengthFunction [WXP, 2K3]
  19259. RtlpEnsureBufferSize [WXP, 2K3]
  19260. RtlpUnWaitCriticalSection [NT3, NT4, W2K, WXP, 2K3]
  19261. RtlpWaitForCriticalSection [NT3, NT4, W2K, WXP, 2K3]
  19262. SaveEm87Context [NT3, NT4, W2K, WXP, 2K3]
  19263. ZwAddBootEntry [WXP, 2K3]
  19264. ZwAddDriverEntry [2K3]
  19265. ZwApphelpCacheControl [2K3]
  19266. ZwCompactKeys [WXP, 2K3]
  19267. ZwCompareTokens [WXP, 2K3]
  19268. ZwCompressKey [WXP, 2K3]
  19269. ZwCreateDebugObject [WXP, 2K3]
  19270. ZwCreateJobSet [WXP, 2K3]
  19271. ZwCreateKeyedEvent [WXP, 2K3]
  19272. ZwCreateProcessEx [WXP, 2K3]
  19273. ZwDebugContinue [WXP, 2K3]
  19274. ZwDeleteBootEntry [WXP, 2K3]
  19275. ZwDeleteDriverEntry [2K3]
  19276. ZwEnumerateBootEntries [WXP, 2K3]
  19277. ZwEnumerateDriverEntries [2K3]
  19278. ZwEnumerateSystemEnvironmentValuesEx [WXP, 2K3]
  19279. ZwIsProcessInJob [WXP, 2K3]
  19280. ZwLoadKeyEx [2K3]
  19281. ZwLockProductActivationKeys [WXP, 2K3]
  19282. ZwLockRegistryKey [WXP, 2K3]
  19283. ZwModifyBootEntry [WXP, 2K3]
  19284. ZwModifyDriverEntry [2K3]
  19285. ZwOpenKeyedEvent [WXP, 2K3]
  19286. ZwOpenProcessTokenEx [WXP, 2K3]
  19287. ZwOpenThreadTokenEx [WXP, 2K3]
  19288. ZwQueryBootEntryOrder [WXP, 2K3]
  19289. ZwQueryBootOptions [WXP, 2K3]
  19290. ZwQueryDebugFilterState [WXP, 2K3]
  19291. ZwQueryDriverEntryOrder [2K3]
  19292. ZwQueryOpenSubKeysEx [2K3]
  19293. ZwQuerySystemEnvironmentValueEx [WXP, 2K3]
  19294. ZwReleaseKeyedEvent [WXP, 2K3]
  19295. ZwRenameKey [WXP, 2K3]
  19296. ZwSetBootEntryOrder [WXP, 2K3]
  19297. ZwSetBootOptions [WXP, 2K3]
  19298. ZwSetDebugFilterState [WXP, 2K3]
  19299. ZwSetDriverEntryOrder [2K3]
  19300. ZwSetEventBoostPriority [WXP, 2K3]
  19301. ZwSetInformationDebugObject [WXP, 2K3]
  19302. ZwSetSystemEnvironmentValueEx [WXP, 2K3]
  19303. ZwTraceEvent [WXP, 2K3]
  19304. ZwTranslateFilePath [WXP, 2K3]
  19305. ZwUnloadKey2 [2K3]
  19306. ZwUnloadKeyEx [WXP, 2K3]
  19307. ZwWaitForDebugEvent [WXP, 2K3]
  19308. ZwWaitForKeyedEvent [WXP, 2K3]
  19309. + 457 (35.90%) not yet declared
  19310. + 816 (64.10%) declared already
  19311. = 1273 (100.00%) relevant functions overall
  19312. The following usermode Native APIs are considered deprecated
  19313. since they are only available in NT3 or NT4 only or in NT3/NT4
  19314. only. Hence they are considered irrelevant. These are:
  19315. -----------------------------------------------------------------
  19316. CsrAllocateCapturePointer [NT3, NT4]
  19317. CsrClientMaxMessage [NT3]
  19318. CsrClientSendMessage [NT3]
  19319. CsrClientThreadConnect [NT3]
  19320. CsrpProcessCallbackRequest [NT3]
  19321. NtEnumerateBus [NT3]
  19322. NtQueryOleDirectoryFile [NT4]
  19323. NtRegisterNewDevice [NT3]
  19324. NtReleaseProcessMutant [NT3]
  19325. NtWaitForProcessMutant [NT3]
  19326. RtlClosePropertySet [NT4]
  19327. RtlCompareVariants [NT4]
  19328. RtlCreatePropertySet [NT4]
  19329. RtlEnumerateProperties [NT4]
  19330. RtlFindLongestRunSet [NT3, NT4]
  19331. RtlFlushPropertySet [NT4]
  19332. RtlGuidToPropertySetName [NT4]
  19333. RtlOnMappedStreamEvent [NT4]
  19334. RtlPropertySetNameToGuid [NT4]
  19335. RtlQueryProperties [NT4]
  19336. RtlQueryPropertyNames [NT4]
  19337. RtlQueryPropertySet [NT4]
  19338. RtlSetProperties [NT4]
  19339. RtlSetPropertyNames [NT4]
  19340. RtlSetPropertySetClassId [NT4]
  19341. RtlpInitializeRtl [NT3]
  19342. ZwEnumerateBus [NT3]
  19343. ZwQueryOleDirectoryFile [NT4]
  19344. ZwRegisterNewDevice [NT3]
  19345. ZwReleaseProcessMutant [NT3]
  19346. ZwWaitForProcessMutant [NT3]
  19347. = 31 deprecated functions
  19348. *)
  19349. end.