winbase.h 156 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the w64 mingw-runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER within this package.
  5. */
  6. #ifndef _WINBASE_
  7. #define _WINBASE_
  8. #define WINADVAPI DECLSPEC_IMPORT
  9. #define WINBASEAPI DECLSPEC_IMPORT
  10. #define ZAWPROXYAPI DECLSPEC_IMPORT
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #define DefineHandleTable(w) ((w),TRUE)
  15. #define LimitEmsPages(dw)
  16. #define SetSwapAreaSize(w) (w)
  17. #define LockSegment(w) GlobalFix((HANDLE)(w))
  18. #define UnlockSegment(w) GlobalUnfix((HANDLE)(w))
  19. #define GetCurrentTime() GetTickCount()
  20. #define Yield()
  21. #define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1)
  22. #define INVALID_FILE_SIZE ((DWORD)0xffffffff)
  23. #define INVALID_SET_FILE_POINTER ((DWORD)-1)
  24. #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
  25. #define FILE_BEGIN 0
  26. #define FILE_CURRENT 1
  27. #define FILE_END 2
  28. #define TIME_ZONE_ID_INVALID ((DWORD)0xffffffff)
  29. #define WAIT_FAILED ((DWORD)0xffffffff)
  30. #define WAIT_OBJECT_0 ((STATUS_WAIT_0) + 0)
  31. #define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0) + 0)
  32. #define WAIT_ABANDONED_0 ((STATUS_ABANDONED_WAIT_0) + 0)
  33. #define WAIT_IO_COMPLETION STATUS_USER_APC
  34. #define STILL_ACTIVE STATUS_PENDING
  35. #define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
  36. #define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
  37. #define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
  38. #define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
  39. #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
  40. #define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
  41. #define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
  42. #define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
  43. #define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
  44. #define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
  45. #define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
  46. #define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
  47. #define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
  48. #define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
  49. #define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
  50. #define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
  51. #define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
  52. #define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
  53. #define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
  54. #define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
  55. #define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
  56. #define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
  57. #define EXCEPTION_POSSIBLE_DEADLOCK STATUS_POSSIBLE_DEADLOCK
  58. #define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
  59. #define MoveMemory RtlMoveMemory
  60. #define CopyMemory RtlCopyMemory
  61. #define FillMemory RtlFillMemory
  62. #define ZeroMemory RtlZeroMemory
  63. #define SecureZeroMemory RtlSecureZeroMemory
  64. #define FILE_FLAG_WRITE_THROUGH 0x80000000
  65. #define FILE_FLAG_OVERLAPPED 0x40000000
  66. #define FILE_FLAG_NO_BUFFERING 0x20000000
  67. #define FILE_FLAG_RANDOM_ACCESS 0x10000000
  68. #define FILE_FLAG_SEQUENTIAL_SCAN 0x8000000
  69. #define FILE_FLAG_DELETE_ON_CLOSE 0x4000000
  70. #define FILE_FLAG_BACKUP_SEMANTICS 0x2000000
  71. #define FILE_FLAG_POSIX_SEMANTICS 0x1000000
  72. #define FILE_FLAG_OPEN_REPARSE_POINT 0x200000
  73. #define FILE_FLAG_OPEN_NO_RECALL 0x100000
  74. #define FILE_FLAG_FIRST_PIPE_INSTANCE 0x80000
  75. #define CREATE_NEW 1
  76. #define CREATE_ALWAYS 2
  77. #define OPEN_EXISTING 3
  78. #define OPEN_ALWAYS 4
  79. #define TRUNCATE_EXISTING 5
  80. #define PROGRESS_CONTINUE 0
  81. #define PROGRESS_CANCEL 1
  82. #define PROGRESS_STOP 2
  83. #define PROGRESS_QUIET 3
  84. #define CALLBACK_CHUNK_FINISHED 0x0
  85. #define CALLBACK_STREAM_SWITCH 0x1
  86. #define COPY_FILE_FAIL_IF_EXISTS 0x1
  87. #define COPY_FILE_RESTARTABLE 0x2
  88. #define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x4
  89. #define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x8
  90. #define REPLACEFILE_WRITE_THROUGH 0x1
  91. #define REPLACEFILE_IGNORE_MERGE_ERRORS 0x2
  92. #define PIPE_ACCESS_INBOUND 0x1
  93. #define PIPE_ACCESS_OUTBOUND 0x2
  94. #define PIPE_ACCESS_DUPLEX 0x3
  95. #define PIPE_CLIENT_END 0x0
  96. #define PIPE_SERVER_END 0x1
  97. #define PIPE_WAIT 0x0
  98. #define PIPE_NOWAIT 0x1
  99. #define PIPE_READMODE_BYTE 0x0
  100. #define PIPE_READMODE_MESSAGE 0x2
  101. #define PIPE_TYPE_BYTE 0x0
  102. #define PIPE_TYPE_MESSAGE 0x4
  103. #define PIPE_UNLIMITED_INSTANCES 255
  104. #define SECURITY_ANONYMOUS (SecurityAnonymous << 16)
  105. #define SECURITY_IDENTIFICATION (SecurityIdentification << 16)
  106. #define SECURITY_IMPERSONATION (SecurityImpersonation << 16)
  107. #define SECURITY_DELEGATION (SecurityDelegation << 16)
  108. #define SECURITY_CONTEXT_TRACKING 0x40000
  109. #define SECURITY_EFFECTIVE_ONLY 0x80000
  110. #define SECURITY_SQOS_PRESENT 0x100000
  111. #define SECURITY_VALID_SQOS_FLAGS 0x1f0000
  112. typedef struct _OVERLAPPED {
  113. ULONG_PTR Internal;
  114. ULONG_PTR InternalHigh;
  115. union {
  116. struct {
  117. DWORD Offset;
  118. DWORD OffsetHigh;
  119. };
  120. PVOID Pointer;
  121. };
  122. HANDLE hEvent;
  123. } OVERLAPPED,*LPOVERLAPPED;
  124. typedef struct _SECURITY_ATTRIBUTES {
  125. DWORD nLength;
  126. LPVOID lpSecurityDescriptor;
  127. WINBOOL bInheritHandle;
  128. } SECURITY_ATTRIBUTES,*PSECURITY_ATTRIBUTES,*LPSECURITY_ATTRIBUTES;
  129. typedef struct _PROCESS_INFORMATION {
  130. HANDLE hProcess;
  131. HANDLE hThread;
  132. DWORD dwProcessId;
  133. DWORD dwThreadId;
  134. } PROCESS_INFORMATION,*PPROCESS_INFORMATION,*LPPROCESS_INFORMATION;
  135. #ifndef _FILETIME_
  136. #define _FILETIME_
  137. typedef struct _FILETIME {
  138. DWORD dwLowDateTime;
  139. DWORD dwHighDateTime;
  140. } FILETIME,*PFILETIME,*LPFILETIME;
  141. #endif
  142. typedef struct _SYSTEMTIME {
  143. WORD wYear;
  144. WORD wMonth;
  145. WORD wDayOfWeek;
  146. WORD wDay;
  147. WORD wHour;
  148. WORD wMinute;
  149. WORD wSecond;
  150. WORD wMilliseconds;
  151. } SYSTEMTIME,*PSYSTEMTIME,*LPSYSTEMTIME;
  152. typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(LPVOID lpThreadParameter);
  153. typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
  154. typedef VOID (WINAPI *PFIBER_START_ROUTINE)(LPVOID lpFiberParameter);
  155. typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
  156. typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
  157. typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
  158. typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
  159. typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG;
  160. typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
  161. typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG;
  162. WINBASEAPI PVOID WINAPI EncodePointer(PVOID Ptr);
  163. WINBASEAPI PVOID WINAPI DecodePointer(PVOID Ptr);
  164. WINBASEAPI PVOID WINAPI EncodeSystemPointer(PVOID Ptr);
  165. WINBASEAPI PVOID WINAPI DecodeSystemPointer(PVOID Ptr);
  166. #ifdef I_X86_
  167. typedef PLDT_ENTRY LPLDT_ENTRY;
  168. #else
  169. typedef LPVOID LPLDT_ENTRY;
  170. #endif
  171. #define MUTEX_MODIFY_STATE MUTANT_QUERY_STATE
  172. #define MUTEX_ALL_ACCESS MUTANT_ALL_ACCESS
  173. #define SP_SERIALCOMM ((DWORD)0x1)
  174. #define PST_UNSPECIFIED ((DWORD)0x0)
  175. #define PST_RS232 ((DWORD)0x1)
  176. #define PST_PARALLELPORT ((DWORD)0x2)
  177. #define PST_RS422 ((DWORD)0x3)
  178. #define PST_RS423 ((DWORD)0x4)
  179. #define PST_RS449 ((DWORD)0x5)
  180. #define PST_MODEM ((DWORD)0x6)
  181. #define PST_FAX ((DWORD)0x21)
  182. #define PST_SCANNER ((DWORD)0x22)
  183. #define PST_NETWORK_BRIDGE ((DWORD)0x100)
  184. #define PST_LAT ((DWORD)0x101)
  185. #define PST_TCPIP_TELNET ((DWORD)0x102)
  186. #define PST_X25 ((DWORD)0x103)
  187. #define PCF_DTRDSR ((DWORD)0x1)
  188. #define PCF_RTSCTS ((DWORD)0x2)
  189. #define PCF_RLSD ((DWORD)0x4)
  190. #define PCF_PARITY_CHECK ((DWORD)0x8)
  191. #define PCF_XONXOFF ((DWORD)0x10)
  192. #define PCF_SETXCHAR ((DWORD)0x20)
  193. #define PCF_TOTALTIMEOUTS ((DWORD)0x40)
  194. #define PCF_INTTIMEOUTS ((DWORD)0x80)
  195. #define PCF_SPECIALCHARS ((DWORD)0x100)
  196. #define PCF_16BITMODE ((DWORD)0x200)
  197. #define SP_PARITY ((DWORD)0x1)
  198. #define SP_BAUD ((DWORD)0x2)
  199. #define SP_DATABITS ((DWORD)0x4)
  200. #define SP_STOPBITS ((DWORD)0x8)
  201. #define SP_HANDSHAKING ((DWORD)0x10)
  202. #define SP_PARITY_CHECK ((DWORD)0x20)
  203. #define SP_RLSD ((DWORD)0x40)
  204. #define BAUD_075 ((DWORD)0x1)
  205. #define BAUD_110 ((DWORD)0x2)
  206. #define BAUD_134_5 ((DWORD)0x4)
  207. #define BAUD_150 ((DWORD)0x8)
  208. #define BAUD_300 ((DWORD)0x10)
  209. #define BAUD_600 ((DWORD)0x20)
  210. #define BAUD_1200 ((DWORD)0x40)
  211. #define BAUD_1800 ((DWORD)0x80)
  212. #define BAUD_2400 ((DWORD)0x100)
  213. #define BAUD_4800 ((DWORD)0x200)
  214. #define BAUD_7200 ((DWORD)0x400)
  215. #define BAUD_9600 ((DWORD)0x800)
  216. #define BAUD_14400 ((DWORD)0x1000)
  217. #define BAUD_19200 ((DWORD)0x2000)
  218. #define BAUD_38400 ((DWORD)0x4000)
  219. #define BAUD_56K ((DWORD)0x8000)
  220. #define BAUD_128K ((DWORD)0x10000)
  221. #define BAUD_115200 ((DWORD)0x20000)
  222. #define BAUD_57600 ((DWORD)0x40000)
  223. #define BAUD_USER ((DWORD)0x10000000)
  224. #define DATABITS_5 ((WORD)0x1)
  225. #define DATABITS_6 ((WORD)0x2)
  226. #define DATABITS_7 ((WORD)0x4)
  227. #define DATABITS_8 ((WORD)0x8)
  228. #define DATABITS_16 ((WORD)0x10)
  229. #define DATABITS_16X ((WORD)0x20)
  230. #define STOPBITS_10 ((WORD)0x1)
  231. #define STOPBITS_15 ((WORD)0x2)
  232. #define STOPBITS_20 ((WORD)0x4)
  233. #define PARITY_NONE ((WORD)0x100)
  234. #define PARITY_ODD ((WORD)0x200)
  235. #define PARITY_EVEN ((WORD)0x400)
  236. #define PARITY_MARK ((WORD)0x800)
  237. #define PARITY_SPACE ((WORD)0x1000)
  238. typedef struct _COMMPROP {
  239. WORD wPacketLength;
  240. WORD wPacketVersion;
  241. DWORD dwServiceMask;
  242. DWORD dwReserved1;
  243. DWORD dwMaxTxQueue;
  244. DWORD dwMaxRxQueue;
  245. DWORD dwMaxBaud;
  246. DWORD dwProvSubType;
  247. DWORD dwProvCapabilities;
  248. DWORD dwSettableParams;
  249. DWORD dwSettableBaud;
  250. WORD wSettableData;
  251. WORD wSettableStopParity;
  252. DWORD dwCurrentTxQueue;
  253. DWORD dwCurrentRxQueue;
  254. DWORD dwProvSpec1;
  255. DWORD dwProvSpec2;
  256. WCHAR wcProvChar[1];
  257. } COMMPROP,*LPCOMMPROP;
  258. #define COMMPROP_INITIALIZED ((DWORD)0xE73CF52E)
  259. typedef struct _COMSTAT {
  260. DWORD fCtsHold : 1;
  261. DWORD fDsrHold : 1;
  262. DWORD fRlsdHold : 1;
  263. DWORD fXoffHold : 1;
  264. DWORD fXoffSent : 1;
  265. DWORD fEof : 1;
  266. DWORD fTxim : 1;
  267. DWORD fReserved : 25;
  268. DWORD cbInQue;
  269. DWORD cbOutQue;
  270. } COMSTAT,*LPCOMSTAT;
  271. #define DTR_CONTROL_DISABLE 0x0
  272. #define DTR_CONTROL_ENABLE 0x1
  273. #define DTR_CONTROL_HANDSHAKE 0x2
  274. #define RTS_CONTROL_DISABLE 0x0
  275. #define RTS_CONTROL_ENABLE 0x1
  276. #define RTS_CONTROL_HANDSHAKE 0x2
  277. #define RTS_CONTROL_TOGGLE 0x3
  278. typedef struct _DCB {
  279. DWORD DCBlength;
  280. DWORD BaudRate;
  281. DWORD fBinary: 1;
  282. DWORD fParity: 1;
  283. DWORD fOutxCtsFlow:1;
  284. DWORD fOutxDsrFlow:1;
  285. DWORD fDtrControl:2;
  286. DWORD fDsrSensitivity:1;
  287. DWORD fTXContinueOnXoff: 1;
  288. DWORD fOutX: 1;
  289. DWORD fInX: 1;
  290. DWORD fErrorChar: 1;
  291. DWORD fNull: 1;
  292. DWORD fRtsControl:2;
  293. DWORD fAbortOnError:1;
  294. DWORD fDummy2:17;
  295. WORD wReserved;
  296. WORD XonLim;
  297. WORD XoffLim;
  298. BYTE ByteSize;
  299. BYTE Parity;
  300. BYTE StopBits;
  301. char XonChar;
  302. char XoffChar;
  303. char ErrorChar;
  304. char EofChar;
  305. char EvtChar;
  306. WORD wReserved1;
  307. } DCB,*LPDCB;
  308. typedef struct _COMMTIMEOUTS {
  309. DWORD ReadIntervalTimeout;
  310. DWORD ReadTotalTimeoutMultiplier;
  311. DWORD ReadTotalTimeoutConstant;
  312. DWORD WriteTotalTimeoutMultiplier;
  313. DWORD WriteTotalTimeoutConstant;
  314. } COMMTIMEOUTS,*LPCOMMTIMEOUTS;
  315. typedef struct _COMMCONFIG {
  316. DWORD dwSize;
  317. WORD wVersion;
  318. WORD wReserved;
  319. DCB dcb;
  320. DWORD dwProviderSubType;
  321. DWORD dwProviderOffset;
  322. DWORD dwProviderSize;
  323. WCHAR wcProviderData[1];
  324. } COMMCONFIG,*LPCOMMCONFIG;
  325. typedef struct _SYSTEM_INFO {
  326. union {
  327. DWORD dwOemId;
  328. struct {
  329. WORD wProcessorArchitecture;
  330. WORD wReserved;
  331. };
  332. };
  333. DWORD dwPageSize;
  334. LPVOID lpMinimumApplicationAddress;
  335. LPVOID lpMaximumApplicationAddress;
  336. DWORD_PTR dwActiveProcessorMask;
  337. DWORD dwNumberOfProcessors;
  338. DWORD dwProcessorType;
  339. DWORD dwAllocationGranularity;
  340. WORD wProcessorLevel;
  341. WORD wProcessorRevision;
  342. } SYSTEM_INFO,*LPSYSTEM_INFO;
  343. #define FreeModule(hLibModule) FreeLibrary((hLibModule))
  344. #define MakeProcInstance(lpProc,hInstance) (lpProc)
  345. #define FreeProcInstance(lpProc) (lpProc)
  346. #define GMEM_FIXED 0x0
  347. #define GMEM_MOVEABLE 0x2
  348. #define GMEM_NOCOMPACT 0x10
  349. #define GMEM_NODISCARD 0x20
  350. #define GMEM_ZEROINIT 0x40
  351. #define GMEM_MODIFY 0x80
  352. #define GMEM_DISCARDABLE 0x100
  353. #define GMEM_NOT_BANKED 0x1000
  354. #define GMEM_SHARE 0x2000
  355. #define GMEM_DDESHARE 0x2000
  356. #define GMEM_NOTIFY 0x4000
  357. #define GMEM_LOWER GMEM_NOT_BANKED
  358. #define GMEM_VALID_FLAGS 0x7F72
  359. #define GMEM_INVALID_HANDLE 0x8000
  360. #define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT)
  361. #define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
  362. #define GlobalLRUNewest(h) ((HANDLE)(h))
  363. #define GlobalLRUOldest(h) ((HANDLE)(h))
  364. #define GlobalDiscard(h) GlobalReAlloc((h),0,GMEM_MOVEABLE)
  365. #define GMEM_DISCARDED 0x4000
  366. #define GMEM_LOCKCOUNT 0xff
  367. typedef struct _MEMORYSTATUS {
  368. DWORD dwLength;
  369. DWORD dwMemoryLoad;
  370. SIZE_T dwTotalPhys;
  371. SIZE_T dwAvailPhys;
  372. SIZE_T dwTotalPageFile;
  373. SIZE_T dwAvailPageFile;
  374. SIZE_T dwTotalVirtual;
  375. SIZE_T dwAvailVirtual;
  376. } MEMORYSTATUS,*LPMEMORYSTATUS;
  377. #define LMEM_FIXED 0x0
  378. #define LMEM_MOVEABLE 0x2
  379. #define LMEM_NOCOMPACT 0x10
  380. #define LMEM_NODISCARD 0x20
  381. #define LMEM_ZEROINIT 0x40
  382. #define LMEM_MODIFY 0x80
  383. #define LMEM_DISCARDABLE 0xf00
  384. #define LMEM_VALID_FLAGS 0xf72
  385. #define LMEM_INVALID_HANDLE 0x8000
  386. #define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
  387. #define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
  388. #define NONZEROLHND (LMEM_MOVEABLE)
  389. #define NONZEROLPTR (LMEM_FIXED)
  390. #define LocalDiscard(h) LocalReAlloc((h),0,LMEM_MOVEABLE)
  391. #define LMEM_DISCARDED 0x4000
  392. #define LMEM_LOCKCOUNT 0xff
  393. #define DEBUG_PROCESS 0x1
  394. #define DEBUG_ONLY_THIS_PROCESS 0x2
  395. #define CREATE_SUSPENDED 0x4
  396. #define DETACHED_PROCESS 0x8
  397. #define CREATE_NEW_CONSOLE 0x10
  398. #define NORMAL_PRIORITY_CLASS 0x20
  399. #define IDLE_PRIORITY_CLASS 0x40
  400. #define HIGH_PRIORITY_CLASS 0x80
  401. #define REALTIME_PRIORITY_CLASS 0x100
  402. #define CREATE_NEW_PROCESS_GROUP 0x200
  403. #define CREATE_UNICODE_ENVIRONMENT 0x400
  404. #define CREATE_SEPARATE_WOW_VDM 0x800
  405. #define CREATE_SHARED_WOW_VDM 0x1000
  406. #define CREATE_FORCEDOS 0x2000
  407. #define BELOW_NORMAL_PRIORITY_CLASS 0x4000
  408. #define ABOVE_NORMAL_PRIORITY_CLASS 0x8000
  409. #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x10000
  410. #define CREATE_BREAKAWAY_FROM_JOB 0x1000000
  411. #define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x2000000
  412. #define CREATE_DEFAULT_ERROR_MODE 0x4000000
  413. #define CREATE_NO_WINDOW 0x8000000
  414. #define PROFILE_USER 0x10000000
  415. #define PROFILE_KERNEL 0x20000000
  416. #define PROFILE_SERVER 0x40000000
  417. #define CREATE_IGNORE_SYSTEM_DEFAULT 0x80000000
  418. #define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
  419. #define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
  420. #define THREAD_PRIORITY_NORMAL 0
  421. #define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
  422. #define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
  423. #define THREAD_PRIORITY_ERROR_RETURN (MAXLONG)
  424. #define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
  425. #define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
  426. #define EXCEPTION_DEBUG_EVENT 1
  427. #define CREATE_THREAD_DEBUG_EVENT 2
  428. #define CREATE_PROCESS_DEBUG_EVENT 3
  429. #define EXIT_THREAD_DEBUG_EVENT 4
  430. #define EXIT_PROCESS_DEBUG_EVENT 5
  431. #define LOAD_DLL_DEBUG_EVENT 6
  432. #define UNLOAD_DLL_DEBUG_EVENT 7
  433. #define OUTPUT_DEBUG_STRING_EVENT 8
  434. #define RIP_EVENT 9
  435. typedef struct _EXCEPTION_DEBUG_INFO {
  436. EXCEPTION_RECORD ExceptionRecord;
  437. DWORD dwFirstChance;
  438. } EXCEPTION_DEBUG_INFO,*LPEXCEPTION_DEBUG_INFO;
  439. typedef struct _CREATE_THREAD_DEBUG_INFO {
  440. HANDLE hThread;
  441. LPVOID lpThreadLocalBase;
  442. LPTHREAD_START_ROUTINE lpStartAddress;
  443. } CREATE_THREAD_DEBUG_INFO,*LPCREATE_THREAD_DEBUG_INFO;
  444. typedef struct _CREATE_PROCESS_DEBUG_INFO {
  445. HANDLE hFile;
  446. HANDLE hProcess;
  447. HANDLE hThread;
  448. LPVOID lpBaseOfImage;
  449. DWORD dwDebugInfoFileOffset;
  450. DWORD nDebugInfoSize;
  451. LPVOID lpThreadLocalBase;
  452. LPTHREAD_START_ROUTINE lpStartAddress;
  453. LPVOID lpImageName;
  454. WORD fUnicode;
  455. } CREATE_PROCESS_DEBUG_INFO,*LPCREATE_PROCESS_DEBUG_INFO;
  456. typedef struct _EXIT_THREAD_DEBUG_INFO {
  457. DWORD dwExitCode;
  458. } EXIT_THREAD_DEBUG_INFO,*LPEXIT_THREAD_DEBUG_INFO;
  459. typedef struct _EXIT_PROCESS_DEBUG_INFO {
  460. DWORD dwExitCode;
  461. } EXIT_PROCESS_DEBUG_INFO,*LPEXIT_PROCESS_DEBUG_INFO;
  462. typedef struct _LOAD_DLL_DEBUG_INFO {
  463. HANDLE hFile;
  464. LPVOID lpBaseOfDll;
  465. DWORD dwDebugInfoFileOffset;
  466. DWORD nDebugInfoSize;
  467. LPVOID lpImageName;
  468. WORD fUnicode;
  469. } LOAD_DLL_DEBUG_INFO,*LPLOAD_DLL_DEBUG_INFO;
  470. typedef struct _UNLOAD_DLL_DEBUG_INFO {
  471. LPVOID lpBaseOfDll;
  472. } UNLOAD_DLL_DEBUG_INFO,*LPUNLOAD_DLL_DEBUG_INFO;
  473. typedef struct _OUTPUT_DEBUG_STRING_INFO {
  474. LPSTR lpDebugStringData;
  475. WORD fUnicode;
  476. WORD nDebugStringLength;
  477. } OUTPUT_DEBUG_STRING_INFO,*LPOUTPUT_DEBUG_STRING_INFO;
  478. typedef struct _RIP_INFO {
  479. DWORD dwError;
  480. DWORD dwType;
  481. } RIP_INFO,*LPRIP_INFO;
  482. typedef struct _DEBUG_EVENT {
  483. DWORD dwDebugEventCode;
  484. DWORD dwProcessId;
  485. DWORD dwThreadId;
  486. union {
  487. EXCEPTION_DEBUG_INFO Exception;
  488. CREATE_THREAD_DEBUG_INFO CreateThread;
  489. CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
  490. EXIT_THREAD_DEBUG_INFO ExitThread;
  491. EXIT_PROCESS_DEBUG_INFO ExitProcess;
  492. LOAD_DLL_DEBUG_INFO LoadDll;
  493. UNLOAD_DLL_DEBUG_INFO UnloadDll;
  494. OUTPUT_DEBUG_STRING_INFO DebugString;
  495. RIP_INFO RipInfo;
  496. } u;
  497. } DEBUG_EVENT,*LPDEBUG_EVENT;
  498. typedef PCONTEXT LPCONTEXT;
  499. typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
  500. typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
  501. #define DRIVE_UNKNOWN 0
  502. #define DRIVE_NO_ROOT_DIR 1
  503. #define DRIVE_REMOVABLE 2
  504. #define DRIVE_FIXED 3
  505. #define DRIVE_REMOTE 4
  506. #define DRIVE_CDROM 5
  507. #define DRIVE_RAMDISK 6
  508. #define GetFreeSpace(w) (0x100000L)
  509. #define FILE_TYPE_UNKNOWN 0x0
  510. #define FILE_TYPE_DISK 0x1
  511. #define FILE_TYPE_CHAR 0x2
  512. #define FILE_TYPE_PIPE 0x3
  513. #define FILE_TYPE_REMOTE 0x8000
  514. #define STD_INPUT_HANDLE ((DWORD)-10)
  515. #define STD_OUTPUT_HANDLE ((DWORD)-11)
  516. #define STD_ERROR_HANDLE ((DWORD)-12)
  517. #define NOPARITY 0
  518. #define ODDPARITY 1
  519. #define EVENPARITY 2
  520. #define MARKPARITY 3
  521. #define SPACEPARITY 4
  522. #define ONESTOPBIT 0
  523. #define ONE5STOPBITS 1
  524. #define TWOSTOPBITS 2
  525. #define IGNORE 0
  526. #define INFINITE 0xffffffff
  527. #define CBR_110 110
  528. #define CBR_300 300
  529. #define CBR_600 600
  530. #define CBR_1200 1200
  531. #define CBR_2400 2400
  532. #define CBR_4800 4800
  533. #define CBR_9600 9600
  534. #define CBR_14400 14400
  535. #define CBR_19200 19200
  536. #define CBR_38400 38400
  537. #define CBR_56000 56000
  538. #define CBR_57600 57600
  539. #define CBR_115200 115200
  540. #define CBR_128000 128000
  541. #define CBR_256000 256000
  542. #define CE_RXOVER 0x1
  543. #define CE_OVERRUN 0x2
  544. #define CE_RXPARITY 0x4
  545. #define CE_FRAME 0x8
  546. #define CE_BREAK 0x10
  547. #define CE_TXFULL 0x100
  548. #define CE_PTO 0x200
  549. #define CE_IOE 0x400
  550. #define CE_DNS 0x800
  551. #define CE_OOP 0x1000
  552. #define CE_MODE 0x8000
  553. #define IE_BADID (-1)
  554. #define IE_OPEN (-2)
  555. #define IE_NOPEN (-3)
  556. #define IE_MEMORY (-4)
  557. #define IE_DEFAULT (-5)
  558. #define IE_HARDWARE (-10)
  559. #define IE_BYTESIZE (-11)
  560. #define IE_BAUDRATE (-12)
  561. #define EV_RXCHAR 0x1
  562. #define EV_RXFLAG 0x2
  563. #define EV_TXEMPTY 0x4
  564. #define EV_CTS 0x8
  565. #define EV_DSR 0x10
  566. #define EV_RLSD 0x20
  567. #define EV_BREAK 0x40
  568. #define EV_ERR 0x80
  569. #define EV_RING 0x100
  570. #define EV_PERR 0x200
  571. #define EV_RX80FULL 0x400
  572. #define EV_EVENT1 0x800
  573. #define EV_EVENT2 0x1000
  574. #define SETXOFF 1
  575. #define SETXON 2
  576. #define SETRTS 3
  577. #define CLRRTS 4
  578. #define SETDTR 5
  579. #define CLRDTR 6
  580. #define RESETDEV 7
  581. #define SETBREAK 8
  582. #define CLRBREAK 9
  583. #define PURGE_TXABORT 0x1
  584. #define PURGE_RXABORT 0x2
  585. #define PURGE_TXCLEAR 0x4
  586. #define PURGE_RXCLEAR 0x8
  587. #define LPTx 0x80
  588. #define MS_CTS_ON ((DWORD)0x10)
  589. #define MS_DSR_ON ((DWORD)0x20)
  590. #define MS_RING_ON ((DWORD)0x40)
  591. #define MS_RLSD_ON ((DWORD)0x80)
  592. #define S_QUEUEEMPTY 0
  593. #define S_THRESHOLD 1
  594. #define S_ALLTHRESHOLD 2
  595. #define S_NORMAL 0
  596. #define S_LEGATO 1
  597. #define S_STACCATO 2
  598. #define S_PERIOD512 0
  599. #define S_PERIOD1024 1
  600. #define S_PERIOD2048 2
  601. #define S_PERIODVOICE 3
  602. #define S_WHITE512 4
  603. #define S_WHITE1024 5
  604. #define S_WHITE2048 6
  605. #define S_WHITEVOICE 7
  606. #define S_SERDVNA (-1)
  607. #define S_SEROFM (-2)
  608. #define S_SERMACT (-3)
  609. #define S_SERQFUL (-4)
  610. #define S_SERBDNT (-5)
  611. #define S_SERDLN (-6)
  612. #define S_SERDCC (-7)
  613. #define S_SERDTP (-8)
  614. #define S_SERDVL (-9)
  615. #define S_SERDMD (-10)
  616. #define S_SERDSH (-11)
  617. #define S_SERDPT (-12)
  618. #define S_SERDFQ (-13)
  619. #define S_SERDDR (-14)
  620. #define S_SERDSR (-15)
  621. #define S_SERDST (-16)
  622. #define NMPWAIT_WAIT_FOREVER 0xffffffff
  623. #define NMPWAIT_NOWAIT 0x1
  624. #define NMPWAIT_USE_DEFAULT_WAIT 0x0
  625. #define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
  626. #define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
  627. #define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
  628. #define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
  629. #define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED
  630. #define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION
  631. #define FS_FILE_ENCRYPTION FILE_SUPPORTS_ENCRYPTION
  632. #define FILE_MAP_COPY SECTION_QUERY
  633. #define FILE_MAP_WRITE SECTION_MAP_WRITE
  634. #define FILE_MAP_READ SECTION_MAP_READ
  635. #define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS
  636. #define FILE_MAP_EXECUTE SECTION_MAP_EXECUTE_EXPLICIT
  637. #define OF_READ 0x0
  638. #define OF_WRITE 0x1
  639. #define OF_READWRITE 0x2
  640. #define OF_SHARE_COMPAT 0x0
  641. #define OF_SHARE_EXCLUSIVE 0x10
  642. #define OF_SHARE_DENY_WRITE 0x20
  643. #define OF_SHARE_DENY_READ 0x30
  644. #define OF_SHARE_DENY_NONE 0x40
  645. #define OF_PARSE 0x100
  646. #define OF_DELETE 0x200
  647. #define OF_VERIFY 0x400
  648. #define OF_CANCEL 0x800
  649. #define OF_CREATE 0x1000
  650. #define OF_PROMPT 0x2000
  651. #define OF_EXIST 0x4000
  652. #define OF_REOPEN 0x8000
  653. #define OFS_MAXPATHNAME 128
  654. typedef struct _OFSTRUCT {
  655. BYTE cBytes;
  656. BYTE fFixedDisk;
  657. WORD nErrCode;
  658. WORD Reserved1;
  659. WORD Reserved2;
  660. CHAR szPathName[OFS_MAXPATHNAME];
  661. } OFSTRUCT,*LPOFSTRUCT,*POFSTRUCT;
  662. #ifndef NOWINBASEINTERLOCK
  663. #ifndef _NTOS_
  664. #if defined(__ia64__) && !defined(RC_INVOKED)
  665. #define InterlockedIncrement _InterlockedIncrement
  666. #define InterlockedIncrementAcquire _InterlockedIncrement_acq
  667. #define InterlockedIncrementRelease _InterlockedIncrement_rel
  668. #define InterlockedDecrement _InterlockedDecrement
  669. #define InterlockedDecrementAcquire _InterlockedDecrement_acq
  670. #define InterlockedDecrementRelease _InterlockedDecrement_rel
  671. #define InterlockedExchange _InterlockedExchange
  672. #define InterlockedExchangeAdd _InterlockedExchangeAdd
  673. #define InterlockedCompareExchange _InterlockedCompareExchange
  674. #define InterlockedCompareExchangeAcquire _InterlockedCompareExchange_acq
  675. #define InterlockedCompareExchangeRelease _InterlockedCompareExchange_rel
  676. #define InterlockedExchangePointer _InterlockedExchangePointer
  677. #define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
  678. #define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer_rel
  679. #define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer_acq
  680. #define InterlockedIncrement64 _InterlockedIncrement64
  681. #define InterlockedDecrement64 _InterlockedDecrement64
  682. #define InterlockedExchange64 _InterlockedExchange64
  683. #define InterlockedExchangeAcquire64 _InterlockedExchange64_acq
  684. #define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
  685. #define InterlockedCompareExchange64 _InterlockedCompareExchange64
  686. #define InterlockedCompareExchangeAcquire64 _InterlockedCompareExchange64_acq
  687. #define InterlockedCompareExchangeRelease64 _InterlockedCompareExchange64_rel
  688. LONGLONG __cdecl InterlockedIncrement64(LONGLONG volatile *Addend);
  689. LONGLONG __cdecl InterlockedDecrement64(LONGLONG volatile *Addend);
  690. LONG __cdecl InterlockedIncrementAcquire(LONG volatile *Addend);
  691. LONG __cdecl InterlockedDecrementAcquire(LONG volatile *Addend);
  692. LONG __cdecl InterlockedIncrementRelease(LONG volatile *Addend);
  693. LONG __cdecl InterlockedDecrementRelease(LONG volatile *Addend);
  694. LONGLONG __cdecl InterlockedExchange64 (LONGLONG volatile *Target,LONGLONG Value);
  695. LONGLONG __cdecl InterlockedExchangeAcquire64 (LONGLONG volatile *Target,LONGLONG Value);
  696. LONGLONG __cdecl InterlockedExchangeAdd64 (LONGLONG volatile *Addend,LONGLONG Value);
  697. LONGLONG __cdecl InterlockedCompareExchange64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand);
  698. LONGLONG __cdecl InterlockedCompareExchangeAcquire64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand);
  699. LONGLONG __cdecl InterlockedCompareExchangeRelease64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand);
  700. LONG __cdecl InterlockedIncrement(LONG volatile *lpAddend);
  701. LONG __cdecl InterlockedDecrement(LONG volatile *lpAddend);
  702. LONG __cdecl InterlockedExchange(LONG volatile *Target,LONG Value);
  703. LONG __cdecl InterlockedExchangeAdd(LONG volatile *Addend,LONG Value);
  704. LONG __cdecl InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand);
  705. LONG __cdecl InterlockedCompareExchangeRelease(LONG volatile *Destination,LONG ExChange,LONG Comperand);
  706. LONG __cdecl InterlockedCompareExchangeAcquire(LONG volatile *Destination,LONG ExChange,LONG Comperand);
  707. PVOID __cdecl InterlockedExchangePointer(PVOID volatile *Target,PVOID Value);
  708. PVOID __cdecl InterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID ExChange,PVOID Comperand);
  709. PVOID __cdecl InterlockedCompareExchangePointerAcquire(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand);
  710. PVOID __cdecl InterlockedCompareExchangePointerRelease(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand);
  711. #ifndef InterlockedAnd
  712. #define InterlockedAnd InterlockedAnd_Inline
  713. __CRT_INLINE LONG InterlockedAnd_Inline(LONG volatile *Target,LONG Set) {
  714. LONG i;
  715. LONG j;
  716. j = *Target;
  717. do {
  718. i = j;
  719. j = InterlockedCompareExchange(Target,i & Set,i);
  720. } while(i!=j);
  721. return j;
  722. }
  723. #endif
  724. #ifndef InterlockedOr
  725. #define InterlockedOr InterlockedOr_Inline
  726. __CRT_INLINE LONG InterlockedOr_Inline(LONG volatile *Target,LONG Set) {
  727. LONG i;
  728. LONG j;
  729. j = *Target;
  730. do {
  731. i = j;
  732. j = InterlockedCompareExchange(Target,i | Set,i);
  733. } while(i!=j);
  734. return j;
  735. }
  736. #endif
  737. #ifndef InterlockedXor
  738. #define InterlockedXor InterlockedXor_Inline
  739. __CRT_INLINE LONG InterlockedXor_Inline(LONG volatile *Target,LONG Set) {
  740. LONG i;
  741. LONG j;
  742. j = *Target;
  743. do {
  744. i = j;
  745. j = InterlockedCompareExchange(Target,i ^ Set,i);
  746. } while(i!=j);
  747. return j;
  748. }
  749. #endif
  750. #ifndef !defined (InterlockedAnd64)
  751. #define InterlockedAnd64 InterlockedAnd64_Inline
  752. __CRT_INLINE LONGLONG InterlockedAnd64_Inline (LONGLONG volatile *Destination,LONGLONG Value) {
  753. LONGLONG Old;
  754. do {
  755. Old = *Destination;
  756. } while(InterlockedCompareExchange64(Destination,Old & Value,Old)!=Old);
  757. return Old;
  758. }
  759. #endif
  760. #ifndef InterlockedOr64
  761. #define InterlockedOr64 InterlockedOr64_Inline
  762. __CRT_INLINE LONGLONG InterlockedOr64_Inline (LONGLONG volatile *Destination,LONGLONG Value) {
  763. LONGLONG Old;
  764. do {
  765. Old = *Destination;
  766. } while(InterlockedCompareExchange64(Destination,Old | Value,Old)!=Old);
  767. return Old;
  768. }
  769. #endif
  770. #ifndef InterlockedXor64
  771. #define InterlockedXor64 InterlockedXor64_Inline
  772. __CRT_INLINE LONGLONG InterlockedXor64_Inline (LONGLONG volatile *Destination,LONGLONG Value) {
  773. LONGLONG Old;
  774. do {
  775. Old = *Destination;
  776. } while(InterlockedCompareExchange64(Destination,Old ^ Value,Old)!=Old);
  777. return Old;
  778. }
  779. #endif
  780. #ifndef InterlockedBitTestAndSet
  781. #define InterlockedBitTestAndSet InterlockedBitTestAndSet_Inline
  782. __CRT_INLINE BOOLEAN InterlockedBitTestAndSet_Inline(LONG *Base,LONG Bit) {
  783. LONG tBit;
  784. tBit = 1<<(Bit & (sizeof (*Base)*8-1));
  785. return (BOOLEAN)((InterlockedOr(&Base[Bit/(sizeof(*Base)*8)],tBit)&tBit)!=0);
  786. }
  787. #endif
  788. #ifndef InterlockedBitTestAndReset
  789. #define InterlockedBitTestAndReset InterlockedBitTestAndReset_Inline
  790. __CRT_INLINE BOOLEAN InterlockedBitTestAndReset_Inline(LONG *Base,LONG Bit) {
  791. LONG tBit;
  792. tBit = 1<<(Bit & (sizeof (*Base)*8-1));
  793. return (BOOLEAN)((InterlockedAnd(&Base[Bit/(sizeof(*Base)*8)],~tBit)&tBit)!=0);
  794. }
  795. #endif
  796. #ifndef InterlockedBitTestAndComplement
  797. #define InterlockedBitTestAndComplement InterlockedBitTestAndComplement_Inline
  798. __CRT_INLINE BOOLEAN InterlockedBitTestAndComplement_Inline(LONG *Base,LONG Bit) {
  799. LONG tBit;
  800. tBit = 1<<(Bit & (sizeof (*Base)*8-1));
  801. return (BOOLEAN)((InterlockedXor(&Base[Bit/(sizeof(*Base)*8)],tBit)&tBit)!=0);
  802. }
  803. #endif
  804. #elif defined(__x86_64) && !defined(RC_INVOKED)
  805. #define InterlockedIncrement _InterlockedIncrement
  806. #define InterlockedIncrementAcquire InterlockedIncrement
  807. #define InterlockedIncrementRelease InterlockedIncrement
  808. #define InterlockedDecrement _InterlockedDecrement
  809. #define InterlockedDecrementAcquire InterlockedDecrement
  810. #define InterlockedDecrementRelease InterlockedDecrement
  811. #define InterlockedExchange _InterlockedExchange
  812. #define InterlockedExchangeAdd _InterlockedExchangeAdd
  813. #define InterlockedCompareExchange _InterlockedCompareExchange
  814. #define InterlockedCompareExchangeAcquire InterlockedCompareExchange
  815. #define InterlockedCompareExchangeRelease InterlockedCompareExchange
  816. #define InterlockedExchangePointer _InterlockedExchangePointer
  817. #define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
  818. #define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer
  819. #define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer
  820. #define InterlockedAnd64 _InterlockedAnd64
  821. #define InterlockedOr64 _InterlockedOr64
  822. #define InterlockedXor64 _InterlockedXor64
  823. #define InterlockedIncrement64 _InterlockedIncrement64
  824. #define InterlockedDecrement64 _InterlockedDecrement64
  825. #define InterlockedExchange64 _InterlockedExchange64
  826. #define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
  827. #define InterlockedCompareExchange64 _InterlockedCompareExchange64
  828. #define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
  829. #define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
  830. LONG InterlockedIncrement(LONG volatile *Addend);
  831. LONG InterlockedDecrement(LONG volatile *Addend);
  832. LONG InterlockedExchange(LONG volatile *Target,LONG Value);
  833. LONG InterlockedExchangeAdd(LONG volatile *Addend,LONG Value);
  834. LONG InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand);
  835. PVOID InterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand);
  836. PVOID InterlockedExchangePointer(PVOID volatile *Target,PVOID Value);
  837. LONG64 InterlockedAnd64(LONG64 volatile *Destination,LONG64 Value);
  838. LONG64 InterlockedOr64(LONG64 volatile *Destination,LONG64 Value);
  839. LONG64 InterlockedXor64(LONG64 volatile *Destination,LONG64 Value);
  840. LONG64 InterlockedIncrement64(LONG64 volatile *Addend);
  841. LONG64 InterlockedDecrement64(LONG64 volatile *Addend);
  842. LONG64 InterlockedExchange64(LONG64 volatile *Target,LONG64 Value);
  843. LONG64 InterlockedExchangeAdd64(LONG64 volatile *Addend,LONG64 Value);
  844. LONG64 InterlockedCompareExchange64(LONG64 volatile *Destination,LONG64 ExChange,LONG64 Comperand);
  845. #else
  846. LONG WINAPI InterlockedIncrement(LONG volatile *lpAddend);
  847. LONG WINAPI InterlockedDecrement(LONG volatile *lpAddend);
  848. LONG WINAPI InterlockedExchange(LONG volatile *Target,LONG Value);
  849. #define InterlockedExchangePointer(Target,Value) (PVOID)InterlockedExchange((PLONG)(Target),(LONG)(Value))
  850. LONG WINAPI InterlockedExchangeAdd(LONG volatile *Addend,LONG Value);
  851. LONG WINAPI InterlockedCompareExchange(LONG volatile *Destination,LONG Exchange,LONG Comperand);
  852. LONGLONG WINAPI InterlockedCompareExchange64(LONGLONG volatile *Destination,LONGLONG Exchange,LONGLONG Comperand);
  853. __CRT_INLINE LONGLONG InterlockedAnd64 (LONGLONG volatile *Destination,LONGLONG Value) {
  854. LONGLONG Old;
  855. do {
  856. Old = *Destination;
  857. } while(InterlockedCompareExchange64(Destination,Old & Value,Old)!=Old);
  858. return Old;
  859. }
  860. __CRT_INLINE LONGLONG InterlockedOr64 (LONGLONG volatile *Destination,LONGLONG Value) {
  861. LONGLONG Old;
  862. do {
  863. Old = *Destination;
  864. } while(InterlockedCompareExchange64(Destination,Old | Value,Old)!=Old);
  865. return Old;
  866. }
  867. __CRT_INLINE LONGLONG InterlockedXor64 (LONGLONG volatile *Destination,LONGLONG Value) {
  868. LONGLONG Old;
  869. do {
  870. Old = *Destination;
  871. } while(InterlockedCompareExchange64(Destination,Old ^ Value,Old)!=Old);
  872. return Old;
  873. }
  874. __CRT_INLINE LONGLONG InterlockedIncrement64(LONGLONG volatile *Addend) {
  875. LONGLONG Old;
  876. do {
  877. Old = *Addend;
  878. } while(InterlockedCompareExchange64(Addend,Old + 1,Old)!=Old);
  879. return Old + 1;
  880. }
  881. __CRT_INLINE LONGLONG InterlockedDecrement64(LONGLONG volatile *Addend) {
  882. LONGLONG Old;
  883. do {
  884. Old = *Addend;
  885. } while(InterlockedCompareExchange64(Addend,Old - 1,Old)!=Old);
  886. return Old - 1;
  887. }
  888. __CRT_INLINE LONGLONG InterlockedExchange64(LONGLONG volatile *Target,LONGLONG Value) {
  889. LONGLONG Old;
  890. do {
  891. Old = *Target;
  892. } while(InterlockedCompareExchange64(Target,Value,Old)!=Old);
  893. return Old;
  894. }
  895. __CRT_INLINE LONGLONG InterlockedExchangeAdd64(LONGLONG volatile *Addend,LONGLONG Value) {
  896. LONGLONG Old;
  897. do {
  898. Old = *Addend;
  899. } while(InterlockedCompareExchange64(Addend,Old + Value,Old)!=Old);
  900. return Old;
  901. }
  902. #ifdef __cplusplus
  903. __CRT_INLINE PVOID __cdecl __InlineInterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID ExChange,PVOID Comperand) {
  904. return((PVOID)(LONG_PTR)InterlockedCompareExchange((LONG volatile *)Destination,(LONG)(LONG_PTR)ExChange,(LONG)(LONG_PTR)Comperand));
  905. }
  906. #define InterlockedCompareExchangePointer __InlineInterlockedCompareExchangePointer
  907. #else
  908. #define InterlockedCompareExchangePointer(Destination,ExChange,Comperand)(PVOID)(LONG_PTR)InterlockedCompareExchange((LONG volatile *)(Destination),(LONG)(LONG_PTR)(ExChange),(LONG)(LONG_PTR)(Comperand))
  909. #endif
  910. #define InterlockedIncrementAcquire InterlockedIncrement
  911. #define InterlockedIncrementRelease InterlockedIncrement
  912. #define InterlockedDecrementAcquire InterlockedDecrement
  913. #define InterlockedDecrementRelease InterlockedDecrement
  914. #define InterlockedIncrementAcquire InterlockedIncrement
  915. #define InterlockedIncrementRelease InterlockedIncrement
  916. #define InterlockedCompareExchangeAcquire InterlockedCompareExchange
  917. #define InterlockedCompareExchangeRelease InterlockedCompareExchange
  918. #define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
  919. #define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
  920. #define InterlockedCompareExchangePointerAcquire InterlockedCompareExchangePointer
  921. #define InterlockedCompareExchangePointerRelease InterlockedCompareExchangePointer
  922. #endif
  923. #if defined(_SLIST_HEADER_) && !defined(_NTOSP_)
  924. WINBASEAPI VOID WINAPI InitializeSListHead(PSLIST_HEADER ListHead);
  925. WINBASEAPI PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER ListHead);
  926. WINBASEAPI PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER ListHead,PSLIST_ENTRY ListEntry);
  927. WINBASEAPI PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER ListHead);
  928. WINBASEAPI USHORT WINAPI QueryDepthSList(PSLIST_HEADER ListHead);
  929. #endif
  930. #endif
  931. #endif
  932. WINBASEAPI WINBOOL WINAPI FreeResource(HGLOBAL hResData);
  933. WINBASEAPI LPVOID WINAPI LockResource(HGLOBAL hResData);
  934. #define UnlockResource(hResData) ((hResData),0)
  935. #define MAXINTATOM 0xC000
  936. #define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
  937. #define INVALID_ATOM ((ATOM)0)
  938. int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd);
  939. WINBASEAPI WINBOOL WINAPI FreeLibrary(HMODULE hLibModule);
  940. WINBASEAPI DECLSPEC_NORETURN VOID WINAPI FreeLibraryAndExitThread(HMODULE hLibModule,DWORD dwExitCode);
  941. WINBASEAPI WINBOOL WINAPI DisableThreadLibraryCalls(HMODULE hLibModule);
  942. WINBASEAPI FARPROC WINAPI GetProcAddress(HMODULE hModule,LPCSTR lpProcName);
  943. WINBASEAPI DWORD WINAPI GetVersion(VOID);
  944. WINBASEAPI HGLOBAL WINAPI GlobalAlloc(UINT uFlags,SIZE_T dwBytes);
  945. WINBASEAPI HGLOBAL WINAPI GlobalReAlloc(HGLOBAL hMem,SIZE_T dwBytes,UINT uFlags);
  946. WINBASEAPI SIZE_T WINAPI GlobalSize(HGLOBAL hMem);
  947. WINBASEAPI UINT WINAPI GlobalFlags(HGLOBAL hMem);
  948. WINBASEAPI LPVOID WINAPI GlobalLock(HGLOBAL hMem);
  949. WINBASEAPI HGLOBAL WINAPI GlobalHandle(LPCVOID pMem);
  950. WINBASEAPI WINBOOL WINAPI GlobalUnlock(HGLOBAL hMem);
  951. WINBASEAPI HGLOBAL WINAPI GlobalFree(HGLOBAL hMem);
  952. WINBASEAPI SIZE_T WINAPI GlobalCompact(DWORD dwMinFree);
  953. WINBASEAPI VOID WINAPI GlobalFix(HGLOBAL hMem);
  954. WINBASEAPI VOID WINAPI GlobalUnfix(HGLOBAL hMem);
  955. WINBASEAPI LPVOID WINAPI GlobalWire(HGLOBAL hMem);
  956. WINBASEAPI WINBOOL WINAPI GlobalUnWire(HGLOBAL hMem);
  957. WINBASEAPI VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer);
  958. typedef struct _MEMORYSTATUSEX {
  959. DWORD dwLength;
  960. DWORD dwMemoryLoad;
  961. DWORDLONG ullTotalPhys;
  962. DWORDLONG ullAvailPhys;
  963. DWORDLONG ullTotalPageFile;
  964. DWORDLONG ullAvailPageFile;
  965. DWORDLONG ullTotalVirtual;
  966. DWORDLONG ullAvailVirtual;
  967. DWORDLONG ullAvailExtendedVirtual;
  968. } MEMORYSTATUSEX,*LPMEMORYSTATUSEX;
  969. WINBASEAPI WINBOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer);
  970. WINBASEAPI HLOCAL WINAPI LocalAlloc(UINT uFlags,SIZE_T uBytes);
  971. WINBASEAPI HLOCAL WINAPI LocalReAlloc(HLOCAL hMem,SIZE_T uBytes,UINT uFlags);
  972. WINBASEAPI LPVOID WINAPI LocalLock(HLOCAL hMem);
  973. WINBASEAPI HLOCAL WINAPI LocalHandle(LPCVOID pMem);
  974. WINBASEAPI WINBOOL WINAPI LocalUnlock(HLOCAL hMem);
  975. WINBASEAPI SIZE_T WINAPI LocalSize(HLOCAL hMem);
  976. WINBASEAPI UINT WINAPI LocalFlags(HLOCAL hMem);
  977. WINBASEAPI HLOCAL WINAPI LocalFree(HLOCAL hMem);
  978. WINBASEAPI SIZE_T WINAPI LocalShrink(HLOCAL hMem,UINT cbNewSize);
  979. WINBASEAPI SIZE_T WINAPI LocalCompact(UINT uMinFree);
  980. WINBASEAPI WINBOOL WINAPI FlushInstructionCache(HANDLE hProcess,LPCVOID lpBaseAddress,SIZE_T dwSize);
  981. WINBASEAPI LPVOID WINAPI VirtualAlloc(LPVOID lpAddress,SIZE_T dwSize,DWORD flAllocationType,DWORD flProtect);
  982. WINBASEAPI WINBOOL WINAPI VirtualFree(LPVOID lpAddress,SIZE_T dwSize,DWORD dwFreeType);
  983. WINBASEAPI WINBOOL WINAPI VirtualProtect(LPVOID lpAddress,SIZE_T dwSize,DWORD flNewProtect,PDWORD lpflOldProtect);
  984. WINBASEAPI SIZE_T WINAPI VirtualQuery(LPCVOID lpAddress,PMEMORY_BASIC_INFORMATION lpBuffer,SIZE_T dwLength);
  985. WINBASEAPI LPVOID WINAPI VirtualAllocEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD flAllocationType,DWORD flProtect);
  986. WINBASEAPI UINT WINAPI GetWriteWatch(DWORD dwFlags,PVOID lpBaseAddress,SIZE_T dwRegionSize,PVOID *lpAddresses,ULONG_PTR *lpdwCount,PULONG lpdwGranularity);
  987. WINBASEAPI UINT WINAPI ResetWriteWatch(LPVOID lpBaseAddress,SIZE_T dwRegionSize);
  988. WINBASEAPI SIZE_T WINAPI GetLargePageMinimum(VOID);
  989. WINBASEAPI UINT WINAPI EnumSystemFirmwareTables(DWORD FirmwareTableProviderSignature,PVOID pFirmwareTableEnumBuffer,DWORD BufferSize);
  990. WINBASEAPI UINT WINAPI GetSystemFirmwareTable(DWORD FirmwareTableProviderSignature,DWORD FirmwareTableID,PVOID pFirmwareTableBuffer,DWORD BufferSize);
  991. WINBASEAPI WINBOOL WINAPI VirtualFreeEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD dwFreeType);
  992. WINBASEAPI WINBOOL WINAPI VirtualProtectEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD flNewProtect,PDWORD lpflOldProtect);
  993. WINBASEAPI SIZE_T WINAPI VirtualQueryEx(HANDLE hProcess,LPCVOID lpAddress,PMEMORY_BASIC_INFORMATION lpBuffer,SIZE_T dwLength);
  994. WINBASEAPI HANDLE WINAPI HeapCreate(DWORD flOptions,SIZE_T dwInitialSize,SIZE_T dwMaximumSize);
  995. WINBASEAPI WINBOOL WINAPI HeapDestroy(HANDLE hHeap);
  996. WINBASEAPI LPVOID WINAPI HeapAlloc(HANDLE hHeap,DWORD dwFlags,SIZE_T dwBytes);
  997. WINBASEAPI LPVOID WINAPI HeapReAlloc(HANDLE hHeap,DWORD dwFlags,LPVOID lpMem,SIZE_T dwBytes);
  998. WINBASEAPI WINBOOL WINAPI HeapFree(HANDLE hHeap,DWORD dwFlags,LPVOID lpMem);
  999. WINBASEAPI SIZE_T WINAPI HeapSize(HANDLE hHeap,DWORD dwFlags,LPCVOID lpMem);
  1000. WINBASEAPI WINBOOL WINAPI HeapValidate(HANDLE hHeap,DWORD dwFlags,LPCVOID lpMem);
  1001. WINBASEAPI SIZE_T WINAPI HeapCompact(HANDLE hHeap,DWORD dwFlags);
  1002. WINBASEAPI HANDLE WINAPI GetProcessHeap(VOID);
  1003. WINBASEAPI DWORD WINAPI GetProcessHeaps(DWORD NumberOfHeaps,PHANDLE ProcessHeaps);
  1004. typedef struct _PROCESS_HEAP_ENTRY {
  1005. PVOID lpData;
  1006. DWORD cbData;
  1007. BYTE cbOverhead;
  1008. BYTE iRegionIndex;
  1009. WORD wFlags;
  1010. union {
  1011. struct {
  1012. HANDLE hMem;
  1013. DWORD dwReserved[3];
  1014. } Block;
  1015. struct {
  1016. DWORD dwCommittedSize;
  1017. DWORD dwUnCommittedSize;
  1018. LPVOID lpFirstBlock;
  1019. LPVOID lpLastBlock;
  1020. } Region;
  1021. };
  1022. } PROCESS_HEAP_ENTRY,*LPPROCESS_HEAP_ENTRY,*PPROCESS_HEAP_ENTRY;
  1023. #define PROCESS_HEAP_REGION 0x1
  1024. #define PROCESS_HEAP_UNCOMMITTED_RANGE 0x2
  1025. #define PROCESS_HEAP_ENTRY_BUSY 0x4
  1026. #define PROCESS_HEAP_ENTRY_MOVEABLE 0x10
  1027. #define PROCESS_HEAP_ENTRY_DDESHARE 0x20
  1028. WINBASEAPI WINBOOL WINAPI HeapLock(HANDLE hHeap);
  1029. WINBASEAPI WINBOOL WINAPI HeapUnlock(HANDLE hHeap);
  1030. WINBASEAPI WINBOOL WINAPI HeapWalk(HANDLE hHeap,LPPROCESS_HEAP_ENTRY lpEntry);
  1031. WINBASEAPI WINBOOL WINAPI HeapSetInformation(HANDLE HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength);
  1032. WINBASEAPI WINBOOL WINAPI HeapQueryInformation(HANDLE HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength,PSIZE_T ReturnLength);
  1033. #define SCS_32BIT_BINARY 0
  1034. #define SCS_DOS_BINARY 1
  1035. #define SCS_WOW_BINARY 2
  1036. #define SCS_PIF_BINARY 3
  1037. #define SCS_POSIX_BINARY 4
  1038. #define SCS_OS216_BINARY 5
  1039. #define SCS_64BIT_BINARY 6
  1040. #ifdef UNICODE
  1041. #define GetBinaryType GetBinaryTypeW
  1042. #define GetShortPathName GetShortPathNameW
  1043. #define GetLongPathName GetLongPathNameW
  1044. #define GetEnvironmentStrings GetEnvironmentStringsW
  1045. #define SetEnvironmentStrings SetEnvironmentStringsW
  1046. #define FreeEnvironmentStrings FreeEnvironmentStringsW
  1047. #else
  1048. #define GetBinaryType GetBinaryTypeA
  1049. #define GetShortPathName GetShortPathNameA
  1050. #define GetLongPathName GetLongPathNameA
  1051. #define GetEnvironmentStringsA GetEnvironmentStrings
  1052. #define SetEnvironmentStrings SetEnvironmentStringsA
  1053. #define FreeEnvironmentStrings FreeEnvironmentStringsA
  1054. #endif
  1055. #ifdef _WIN64
  1056. #define SCS_THIS_PLATFORM_BINARY SCS_64BIT_BINARY
  1057. #else
  1058. #define SCS_THIS_PLATFORM_BINARY SCS_32BIT_BINARY
  1059. #endif
  1060. WINBASEAPI WINBOOL WINAPI GetBinaryTypeA(LPCSTR lpApplicationName,LPDWORD lpBinaryType);
  1061. WINBASEAPI WINBOOL WINAPI GetBinaryTypeW(LPCWSTR lpApplicationName,LPDWORD lpBinaryType);
  1062. WINBASEAPI DWORD WINAPI GetShortPathNameA(LPCSTR lpszLongPath,LPSTR lpszShortPath,DWORD cchBuffer);
  1063. WINBASEAPI DWORD WINAPI GetShortPathNameW(LPCWSTR lpszLongPath,LPWSTR lpszShortPath,DWORD cchBuffer);
  1064. WINBASEAPI DWORD WINAPI GetLongPathNameA(LPCSTR lpszShortPath,LPSTR lpszLongPath,DWORD cchBuffer);
  1065. WINBASEAPI DWORD WINAPI GetLongPathNameW(LPCWSTR lpszShortPath,LPWSTR lpszLongPath,DWORD cchBuffer);
  1066. WINBASEAPI WINBOOL WINAPI GetProcessAffinityMask(HANDLE hProcess,PDWORD_PTR lpProcessAffinityMask,PDWORD_PTR lpSystemAffinityMask);
  1067. WINBASEAPI WINBOOL WINAPI SetProcessAffinityMask(HANDLE hProcess,DWORD_PTR dwProcessAffinityMask);
  1068. WINBASEAPI WINBOOL WINAPI GetProcessHandleCount(HANDLE hProcess,PDWORD pdwHandleCount);
  1069. WINBASEAPI WINBOOL WINAPI GetProcessTimes(HANDLE hProcess,LPFILETIME lpCreationTime,LPFILETIME lpExitTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime);
  1070. WINBASEAPI WINBOOL WINAPI GetProcessIoCounters(HANDLE hProcess,PIO_COUNTERS lpIoCounters);
  1071. WINBASEAPI WINBOOL WINAPI GetProcessWorkingSetSize(HANDLE hProcess,PSIZE_T lpMinimumWorkingSetSize,PSIZE_T lpMaximumWorkingSetSize);
  1072. WINBASEAPI WINBOOL WINAPI GetProcessWorkingSetSizeEx(HANDLE hProcess,PSIZE_T lpMinimumWorkingSetSize,PSIZE_T lpMaximumWorkingSetSize,PDWORD Flags);
  1073. WINBASEAPI WINBOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess,SIZE_T dwMinimumWorkingSetSize,SIZE_T dwMaximumWorkingSetSize);
  1074. WINBASEAPI WINBOOL WINAPI SetProcessWorkingSetSizeEx(HANDLE hProcess,SIZE_T dwMinimumWorkingSetSize,SIZE_T dwMaximumWorkingSetSize,DWORD Flags);
  1075. WINBASEAPI HANDLE WINAPI OpenProcess(DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwProcessId);
  1076. WINBASEAPI HANDLE WINAPI GetCurrentProcess(VOID);
  1077. WINBASEAPI DWORD WINAPI GetCurrentProcessId(VOID);
  1078. WINBASEAPI DECLSPEC_NORETURN VOID WINAPI ExitProcess(UINT uExitCode);
  1079. WINBASEAPI WINBOOL WINAPI TerminateProcess(HANDLE hProcess,UINT uExitCode);
  1080. WINBASEAPI WINBOOL WINAPI GetExitCodeProcess(HANDLE hProcess,LPDWORD lpExitCode);
  1081. WINBASEAPI VOID WINAPI FatalExit(int ExitCode);
  1082. /* WINBASEAPI LPCH WINAPI GetEnvironmentStrings(VOID); */
  1083. WINBASEAPI LPWCH WINAPI GetEnvironmentStringsW(VOID);
  1084. WINBASEAPI WINBOOL WINAPI SetEnvironmentStringsA(LPCH NewEnvironment);
  1085. WINBASEAPI WINBOOL WINAPI SetEnvironmentStringsW(LPWCH NewEnvironment);
  1086. WINBASEAPI WINBOOL WINAPI FreeEnvironmentStringsA(LPCH);
  1087. WINBASEAPI WINBOOL WINAPI FreeEnvironmentStringsW(LPWCH);
  1088. WINBASEAPI VOID WINAPI RaiseException(DWORD dwExceptionCode,DWORD dwExceptionFlags,DWORD nNumberOfArguments,CONST ULONG_PTR *lpArguments);
  1089. WINBASEAPI LONG WINAPI UnhandledExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo);
  1090. typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER)(struct _EXCEPTION_POINTERS *ExceptionInfo);
  1091. typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
  1092. WINBASEAPI LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
  1093. #define FIBER_FLAG_FLOAT_SWITCH 0x1
  1094. WINBASEAPI LPVOID WINAPI CreateFiber(SIZE_T dwStackSize,LPFIBER_START_ROUTINE lpStartAddress,LPVOID lpParameter);
  1095. WINBASEAPI LPVOID WINAPI CreateFiberEx(SIZE_T dwStackCommitSize,SIZE_T dwStackReserveSize,DWORD dwFlags,LPFIBER_START_ROUTINE lpStartAddress,LPVOID lpParameter);
  1096. WINBASEAPI VOID WINAPI DeleteFiber(LPVOID lpFiber);
  1097. WINBASEAPI LPVOID WINAPI ConvertThreadToFiber(LPVOID lpParameter);
  1098. WINBASEAPI LPVOID WINAPI ConvertThreadToFiberEx(LPVOID lpParameter,DWORD dwFlags);
  1099. WINBASEAPI WINBOOL WINAPI ConvertFiberToThread(VOID);
  1100. WINBASEAPI VOID WINAPI SwitchToFiber(LPVOID lpFiber);
  1101. WINBASEAPI WINBOOL WINAPI SwitchToThread(VOID);
  1102. WINBASEAPI HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes,SIZE_T dwStackSize,LPTHREAD_START_ROUTINE lpStartAddress,LPVOID lpParameter,DWORD dwCreationFlags,LPDWORD lpThreadId);
  1103. WINBASEAPI HANDLE WINAPI CreateRemoteThread(HANDLE hProcess,LPSECURITY_ATTRIBUTES lpThreadAttributes,SIZE_T dwStackSize,LPTHREAD_START_ROUTINE lpStartAddress,LPVOID lpParameter,DWORD dwCreationFlags,LPDWORD lpThreadId);
  1104. WINBASEAPI HANDLE WINAPI GetCurrentThread(VOID);
  1105. WINBASEAPI DWORD WINAPI GetCurrentThreadId(VOID);
  1106. WINBASEAPI WINBOOL WINAPI SetThreadStackGuarantee (PULONG StackSizeInBytes);
  1107. WINBASEAPI DWORD WINAPI GetProcessIdOfThread(HANDLE Thread);
  1108. WINBASEAPI DWORD WINAPI GetThreadId(HANDLE Thread);
  1109. WINBASEAPI DWORD WINAPI GetProcessId(HANDLE Process);
  1110. WINBASEAPI DWORD WINAPI GetCurrentProcessorNumber(VOID);
  1111. WINBASEAPI DWORD_PTR WINAPI SetThreadAffinityMask(HANDLE hThread,DWORD_PTR dwThreadAffinityMask);
  1112. WINBASEAPI DWORD WINAPI SetThreadIdealProcessor(HANDLE hThread,DWORD dwIdealProcessor);
  1113. WINBASEAPI WINBOOL WINAPI SetProcessPriorityBoost(HANDLE hProcess,WINBOOL bDisablePriorityBoost);
  1114. WINBASEAPI WINBOOL WINAPI GetProcessPriorityBoost(HANDLE hProcess,PBOOL pDisablePriorityBoost);
  1115. WINBASEAPI WINBOOL WINAPI RequestWakeupLatency(LATENCY_TIME latency);
  1116. WINBASEAPI WINBOOL WINAPI IsSystemResumeAutomatic(VOID);
  1117. WINBASEAPI HANDLE WINAPI OpenThread(DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwThreadId);
  1118. WINBASEAPI WINBOOL WINAPI SetThreadPriority(HANDLE hThread,int nPriority);
  1119. WINBASEAPI WINBOOL WINAPI SetThreadPriorityBoost(HANDLE hThread,WINBOOL bDisablePriorityBoost);
  1120. WINBASEAPI WINBOOL WINAPI GetThreadPriorityBoost(HANDLE hThread,PBOOL pDisablePriorityBoost);
  1121. WINBASEAPI int WINAPI GetThreadPriority(HANDLE hThread);
  1122. WINBASEAPI WINBOOL WINAPI GetThreadTimes(HANDLE hThread,LPFILETIME lpCreationTime,LPFILETIME lpExitTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime);
  1123. WINBASEAPI WINBOOL WINAPI GetThreadIOPendingFlag(HANDLE hThread,PBOOL lpIOIsPending);
  1124. WINBASEAPI DECLSPEC_NORETURN VOID WINAPI ExitThread(DWORD dwExitCode);
  1125. WINBASEAPI WINBOOL WINAPI TerminateThread(HANDLE hThread,DWORD dwExitCode);
  1126. WINBASEAPI WINBOOL WINAPI GetExitCodeThread(HANDLE hThread,LPDWORD lpExitCode);
  1127. WINBASEAPI WINBOOL WINAPI GetThreadSelectorEntry(HANDLE hThread,DWORD dwSelector,LPLDT_ENTRY lpSelectorEntry);
  1128. WINBASEAPI EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE esFlags);
  1129. WINBASEAPI DWORD WINAPI GetLastError(VOID);
  1130. WINBASEAPI VOID WINAPI SetLastError(DWORD dwErrCode);
  1131. #ifndef RC_INVOKED
  1132. #ifdef WINBASE_DECLARE_RESTORE_LAST_ERROR
  1133. WINBASEAPI VOID WINAPI RestoreLastError(DWORD dwErrCode);
  1134. typedef VOID (WINAPI *PRESTORE_LAST_ERROR)(DWORD);
  1135. #define RESTORE_LAST_ERROR_NAME_A "RestoreLastError"
  1136. #define RESTORE_LAST_ERROR_NAME_W L"RestoreLastError"
  1137. #define RESTORE_LAST_ERROR_NAME TEXT("RestoreLastError")
  1138. #endif
  1139. #endif
  1140. #define HasOverlappedIoCompleted(lpOverlapped) (((DWORD)(lpOverlapped)->Internal)!=STATUS_PENDING)
  1141. WINBASEAPI WINBOOL WINAPI GetOverlappedResult(HANDLE hFile,LPOVERLAPPED lpOverlapped,LPDWORD lpNumberOfBytesTransferred,WINBOOL bWait);
  1142. WINBASEAPI HANDLE WINAPI CreateIoCompletionPort(HANDLE FileHandle,HANDLE ExistingCompletionPort,ULONG_PTR CompletionKey,DWORD NumberOfConcurrentThreads);
  1143. WINBASEAPI WINBOOL WINAPI GetQueuedCompletionStatus(HANDLE CompletionPort,LPDWORD lpNumberOfBytesTransferred,PULONG_PTR lpCompletionKey,LPOVERLAPPED *lpOverlapped,DWORD dwMilliseconds);
  1144. WINBASEAPI WINBOOL WINAPI PostQueuedCompletionStatus(HANDLE CompletionPort,DWORD dwNumberOfBytesTransferred,ULONG_PTR dwCompletionKey,LPOVERLAPPED lpOverlapped);
  1145. #define SEM_FAILCRITICALERRORS 0x1
  1146. #define SEM_NOGPFAULTERRORBOX 0x2
  1147. #define SEM_NOALIGNMENTFAULTEXCEPT 0x4
  1148. #define SEM_NOOPENFILEERRORBOX 0x8000
  1149. WINBASEAPI UINT WINAPI SetErrorMode(UINT uMode);
  1150. WINBASEAPI WINBOOL WINAPI ReadProcessMemory(HANDLE hProcess,LPCVOID lpBaseAddress,LPVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesRead);
  1151. WINBASEAPI WINBOOL WINAPI WriteProcessMemory(HANDLE hProcess,LPVOID lpBaseAddress,LPCVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesWritten);
  1152. WINBASEAPI WINBOOL WINAPI GetThreadContext(HANDLE hThread,LPCONTEXT lpContext);
  1153. WINBASEAPI WINBOOL WINAPI SetThreadContext(HANDLE hThread,CONST CONTEXT *lpContext);
  1154. WINBASEAPI DWORD WINAPI SuspendThread(HANDLE hThread);
  1155. WINBASEAPI DWORD WINAPI ResumeThread(HANDLE hThread);
  1156. typedef VOID (WINAPI *PAPCFUNC)(ULONG_PTR dwParam);
  1157. WINBASEAPI DWORD WINAPI QueueUserAPC(PAPCFUNC pfnAPC,HANDLE hThread,ULONG_PTR dwData);
  1158. WINBASEAPI WINBOOL WINAPI IsDebuggerPresent(VOID);
  1159. WINBASEAPI WINBOOL WINAPI CheckRemoteDebuggerPresent(HANDLE hProcess,PBOOL pbDebuggerPresent);
  1160. WINBASEAPI VOID WINAPI DebugBreak(VOID);
  1161. WINBASEAPI WINBOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT lpDebugEvent,DWORD dwMilliseconds);
  1162. WINBASEAPI WINBOOL WINAPI ContinueDebugEvent(DWORD dwProcessId,DWORD dwThreadId,DWORD dwContinueStatus);
  1163. WINBASEAPI WINBOOL WINAPI DebugActiveProcess(DWORD dwProcessId);
  1164. WINBASEAPI WINBOOL WINAPI DebugActiveProcessStop(DWORD dwProcessId);
  1165. WINBASEAPI WINBOOL WINAPI DebugSetProcessKillOnExit(WINBOOL KillOnExit);
  1166. WINBASEAPI WINBOOL WINAPI DebugBreakProcess(HANDLE Process);
  1167. WINBASEAPI VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
  1168. WINBASEAPI VOID WINAPI EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
  1169. WINBASEAPI VOID WINAPI LeaveCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
  1170. WINBASEAPI WINBOOL WINAPI InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION lpCriticalSection,DWORD dwSpinCount);
  1171. WINBASEAPI DWORD WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION lpCriticalSection,DWORD dwSpinCount);
  1172. WINBASEAPI WINBOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
  1173. WINBASEAPI VOID WINAPI DeleteCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
  1174. WINBASEAPI WINBOOL WINAPI SetEvent(HANDLE hEvent);
  1175. WINBASEAPI WINBOOL WINAPI ResetEvent(HANDLE hEvent);
  1176. WINBASEAPI WINBOOL WINAPI PulseEvent(HANDLE hEvent);
  1177. WINBASEAPI WINBOOL WINAPI ReleaseSemaphore(HANDLE hSemaphore,LONG lReleaseCount,LPLONG lpPreviousCount);
  1178. WINBASEAPI WINBOOL WINAPI ReleaseMutex(HANDLE hMutex);
  1179. WINBASEAPI DWORD WINAPI WaitForSingleObject(HANDLE hHandle,DWORD dwMilliseconds);
  1180. WINBASEAPI DWORD WINAPI WaitForMultipleObjects(DWORD nCount,CONST HANDLE *lpHandles,WINBOOL bWaitAll,DWORD dwMilliseconds);
  1181. WINBASEAPI VOID WINAPI Sleep(DWORD dwMilliseconds);
  1182. WINBASEAPI HGLOBAL WINAPI LoadResource(HMODULE hModule,HRSRC hResInfo);
  1183. WINBASEAPI DWORD WINAPI SizeofResource(HMODULE hModule,HRSRC hResInfo);
  1184. WINBASEAPI ATOM WINAPI GlobalDeleteAtom(ATOM nAtom);
  1185. WINBASEAPI WINBOOL WINAPI InitAtomTable(DWORD nSize);
  1186. WINBASEAPI ATOM WINAPI DeleteAtom(ATOM nAtom);
  1187. WINBASEAPI UINT WINAPI SetHandleCount(UINT uNumber);
  1188. WINBASEAPI DWORD WINAPI GetLogicalDrives(VOID);
  1189. WINBASEAPI WINBOOL WINAPI LockFile(HANDLE hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,DWORD nNumberOfBytesToLockLow,DWORD nNumberOfBytesToLockHigh);
  1190. WINBASEAPI WINBOOL WINAPI UnlockFile(HANDLE hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,DWORD nNumberOfBytesToUnlockLow,DWORD nNumberOfBytesToUnlockHigh);
  1191. WINBASEAPI WINBOOL WINAPI LockFileEx(HANDLE hFile,DWORD dwFlags,DWORD dwReserved,DWORD nNumberOfBytesToLockLow,DWORD nNumberOfBytesToLockHigh,LPOVERLAPPED lpOverlapped);
  1192. #define LOCKFILE_FAIL_IMMEDIATELY 0x1
  1193. #define LOCKFILE_EXCLUSIVE_LOCK 0x2
  1194. WINBASEAPI WINBOOL WINAPI UnlockFileEx(HANDLE hFile,DWORD dwReserved,DWORD nNumberOfBytesToUnlockLow,DWORD nNumberOfBytesToUnlockHigh,LPOVERLAPPED lpOverlapped);
  1195. typedef struct _BY_HANDLE_FILE_INFORMATION {
  1196. DWORD dwFileAttributes;
  1197. FILETIME ftCreationTime;
  1198. FILETIME ftLastAccessTime;
  1199. FILETIME ftLastWriteTime;
  1200. DWORD dwVolumeSerialNumber;
  1201. DWORD nFileSizeHigh;
  1202. DWORD nFileSizeLow;
  1203. DWORD nNumberOfLinks;
  1204. DWORD nFileIndexHigh;
  1205. DWORD nFileIndexLow;
  1206. } BY_HANDLE_FILE_INFORMATION,*PBY_HANDLE_FILE_INFORMATION,*LPBY_HANDLE_FILE_INFORMATION;
  1207. #ifdef UNICODE
  1208. #define SetFileShortName SetFileShortNameW
  1209. #else
  1210. #define SetFileShortName SetFileShortNameA
  1211. #endif
  1212. WINBASEAPI WINBOOL WINAPI GetFileInformationByHandle(HANDLE hFile,LPBY_HANDLE_FILE_INFORMATION lpFileInformation);
  1213. WINBASEAPI DWORD WINAPI GetFileType(HANDLE hFile);
  1214. WINBASEAPI DWORD WINAPI GetFileSize(HANDLE hFile,LPDWORD lpFileSizeHigh);
  1215. WINBASEAPI WINBOOL WINAPI GetFileSizeEx(HANDLE hFile,PLARGE_INTEGER lpFileSize);
  1216. WINBASEAPI HANDLE WINAPI GetStdHandle(DWORD nStdHandle);
  1217. WINBASEAPI WINBOOL WINAPI SetStdHandle(DWORD nStdHandle,HANDLE hHandle);
  1218. WINBASEAPI WINBOOL WINAPI WriteFile(HANDLE hFile,LPCVOID lpBuffer,DWORD nNumberOfBytesToWrite,LPDWORD lpNumberOfBytesWritten,LPOVERLAPPED lpOverlapped);
  1219. WINBASEAPI WINBOOL WINAPI ReadFile(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,LPOVERLAPPED lpOverlapped);
  1220. WINBASEAPI WINBOOL WINAPI FlushFileBuffers(HANDLE hFile);
  1221. WINBASEAPI WINBOOL WINAPI DeviceIoControl(HANDLE hDevice,DWORD dwIoControlCode,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesReturned,LPOVERLAPPED lpOverlapped);
  1222. WINBASEAPI WINBOOL WINAPI RequestDeviceWakeup(HANDLE hDevice);
  1223. WINBASEAPI WINBOOL WINAPI CancelDeviceWakeupRequest(HANDLE hDevice);
  1224. WINBASEAPI WINBOOL WINAPI GetDevicePowerState(HANDLE hDevice,WINBOOL *pfOn);
  1225. WINBASEAPI WINBOOL WINAPI SetMessageWaitingIndicator(HANDLE hMsgIndicator,ULONG ulMsgCount);
  1226. WINBASEAPI WINBOOL WINAPI SetEndOfFile(HANDLE hFile);
  1227. WINBASEAPI DWORD WINAPI SetFilePointer(HANDLE hFile,LONG lDistanceToMove,PLONG lpDistanceToMoveHigh,DWORD dwMoveMethod);
  1228. WINBASEAPI WINBOOL WINAPI SetFilePointerEx(HANDLE hFile,LARGE_INTEGER liDistanceToMove,PLARGE_INTEGER lpNewFilePointer,DWORD dwMoveMethod);
  1229. WINBASEAPI WINBOOL WINAPI FindClose(HANDLE hFindFile);
  1230. WINBASEAPI WINBOOL WINAPI GetFileTime(HANDLE hFile,LPFILETIME lpCreationTime,LPFILETIME lpLastAccessTime,LPFILETIME lpLastWriteTime);
  1231. WINBASEAPI WINBOOL WINAPI SetFileTime(HANDLE hFile,CONST FILETIME *lpCreationTime,CONST FILETIME *lpLastAccessTime,CONST FILETIME *lpLastWriteTime);
  1232. WINBASEAPI WINBOOL WINAPI SetFileValidData(HANDLE hFile,LONGLONG ValidDataLength);
  1233. WINBASEAPI WINBOOL WINAPI SetFileShortNameA(HANDLE hFile,LPCSTR lpShortName);
  1234. WINBASEAPI WINBOOL WINAPI SetFileShortNameW(HANDLE hFile,LPCWSTR lpShortName);
  1235. WINBASEAPI WINBOOL WINAPI CloseHandle(HANDLE hObject);
  1236. WINBASEAPI WINBOOL WINAPI DuplicateHandle(HANDLE hSourceProcessHandle,HANDLE hSourceHandle,HANDLE hTargetProcessHandle,LPHANDLE lpTargetHandle,DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwOptions);
  1237. WINBASEAPI WINBOOL WINAPI GetHandleInformation(HANDLE hObject,LPDWORD lpdwFlags);
  1238. WINBASEAPI WINBOOL WINAPI SetHandleInformation(HANDLE hObject,DWORD dwMask,DWORD dwFlags);
  1239. #define HANDLE_FLAG_INHERIT 0x1
  1240. #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x2
  1241. #define HINSTANCE_ERROR 32
  1242. WINBASEAPI DWORD WINAPI LoadModule(LPCSTR lpModuleName,LPVOID lpParameterBlock);
  1243. WINBASEAPI UINT WINAPI WinExec(LPCSTR lpCmdLine,UINT uCmdShow);
  1244. WINBASEAPI WINBOOL WINAPI ClearCommBreak(HANDLE hFile);
  1245. WINBASEAPI WINBOOL WINAPI ClearCommError(HANDLE hFile,LPDWORD lpErrors,LPCOMSTAT lpStat);
  1246. WINBASEAPI WINBOOL WINAPI SetupComm(HANDLE hFile,DWORD dwInQueue,DWORD dwOutQueue);
  1247. WINBASEAPI WINBOOL WINAPI EscapeCommFunction(HANDLE hFile,DWORD dwFunc);
  1248. WINBASEAPI WINBOOL WINAPI GetCommConfig(HANDLE hCommDev,LPCOMMCONFIG lpCC,LPDWORD lpdwSize);
  1249. WINBASEAPI WINBOOL WINAPI GetCommMask(HANDLE hFile,LPDWORD lpEvtMask);
  1250. WINBASEAPI WINBOOL WINAPI GetCommProperties(HANDLE hFile,LPCOMMPROP lpCommProp);
  1251. WINBASEAPI WINBOOL WINAPI GetCommModemStatus(HANDLE hFile,LPDWORD lpModemStat);
  1252. WINBASEAPI WINBOOL WINAPI GetCommState(HANDLE hFile,LPDCB lpDCB);
  1253. WINBASEAPI WINBOOL WINAPI GetCommTimeouts(HANDLE hFile,LPCOMMTIMEOUTS lpCommTimeouts);
  1254. WINBASEAPI WINBOOL WINAPI PurgeComm(HANDLE hFile,DWORD dwFlags);
  1255. WINBASEAPI WINBOOL WINAPI SetCommBreak(HANDLE hFile);
  1256. WINBASEAPI WINBOOL WINAPI SetCommConfig(HANDLE hCommDev,LPCOMMCONFIG lpCC,DWORD dwSize);
  1257. WINBASEAPI WINBOOL WINAPI SetCommMask(HANDLE hFile,DWORD dwEvtMask);
  1258. WINBASEAPI WINBOOL WINAPI SetCommState(HANDLE hFile,LPDCB lpDCB);
  1259. WINBASEAPI WINBOOL WINAPI SetCommTimeouts(HANDLE hFile,LPCOMMTIMEOUTS lpCommTimeouts);
  1260. WINBASEAPI WINBOOL WINAPI TransmitCommChar(HANDLE hFile,char cChar);
  1261. WINBASEAPI WINBOOL WINAPI WaitCommEvent(HANDLE hFile,LPDWORD lpEvtMask,LPOVERLAPPED lpOverlapped);
  1262. WINBASEAPI DWORD WINAPI SetTapePosition(HANDLE hDevice,DWORD dwPositionMethod,DWORD dwPartition,DWORD dwOffsetLow,DWORD dwOffsetHigh,WINBOOL bImmediate);
  1263. WINBASEAPI DWORD WINAPI GetTapePosition(HANDLE hDevice,DWORD dwPositionType,LPDWORD lpdwPartition,LPDWORD lpdwOffsetLow,LPDWORD lpdwOffsetHigh);
  1264. WINBASEAPI DWORD WINAPI PrepareTape(HANDLE hDevice,DWORD dwOperation,WINBOOL bImmediate);
  1265. WINBASEAPI DWORD WINAPI EraseTape(HANDLE hDevice,DWORD dwEraseType,WINBOOL bImmediate);
  1266. WINBASEAPI DWORD WINAPI CreateTapePartition(HANDLE hDevice,DWORD dwPartitionMethod,DWORD dwCount,DWORD dwSize);
  1267. WINBASEAPI DWORD WINAPI WriteTapemark(HANDLE hDevice,DWORD dwTapemarkType,DWORD dwTapemarkCount,WINBOOL bImmediate);
  1268. WINBASEAPI DWORD WINAPI GetTapeStatus(HANDLE hDevice);
  1269. WINBASEAPI DWORD WINAPI GetTapeParameters(HANDLE hDevice,DWORD dwOperation,LPDWORD lpdwSize,LPVOID lpTapeInformation);
  1270. #define GET_TAPE_MEDIA_INFORMATION 0
  1271. #define GET_TAPE_DRIVE_INFORMATION 1
  1272. WINBASEAPI DWORD WINAPI SetTapeParameters(HANDLE hDevice,DWORD dwOperation,LPVOID lpTapeInformation);
  1273. #define SET_TAPE_MEDIA_INFORMATION 0
  1274. #define SET_TAPE_DRIVE_INFORMATION 1
  1275. WINBASEAPI WINBOOL WINAPI Beep(DWORD dwFreq,DWORD dwDuration);
  1276. WINBASEAPI int WINAPI MulDiv(int nNumber,int nNumerator,int nDenominator);
  1277. WINBASEAPI VOID WINAPI GetSystemTime(LPSYSTEMTIME lpSystemTime);
  1278. WINBASEAPI VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime);
  1279. WINBASEAPI WINBOOL WINAPI SetSystemTime(CONST SYSTEMTIME *lpSystemTime);
  1280. WINBASEAPI VOID WINAPI GetLocalTime(LPSYSTEMTIME lpSystemTime);
  1281. WINBASEAPI WINBOOL WINAPI SetLocalTime(CONST SYSTEMTIME *lpSystemTime);
  1282. WINBASEAPI VOID WINAPI GetSystemInfo(LPSYSTEM_INFO lpSystemInfo);
  1283. WINBASEAPI WINBOOL WINAPI SetSystemFileCacheSize(SIZE_T MinimumFileCacheSize,SIZE_T MaximumFileCacheSize,DWORD Flags);
  1284. WINBASEAPI WINBOOL WINAPI GetSystemFileCacheSize(PSIZE_T lpMinimumFileCacheSize,PSIZE_T lpMaximumFileCacheSize,PDWORD lpFlags);
  1285. WINBASEAPI WINBOOL WINAPI GetSystemRegistryQuota(PDWORD pdwQuotaAllowed,PDWORD pdwQuotaUsed);
  1286. WINBOOL WINAPI GetSystemTimes(LPFILETIME lpIdleTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime);
  1287. WINBASEAPI VOID WINAPI GetNativeSystemInfo(LPSYSTEM_INFO lpSystemInfo);
  1288. WINBASEAPI WINBOOL WINAPI IsProcessorFeaturePresent(DWORD ProcessorFeature);
  1289. typedef struct _TIME_ZONE_INFORMATION {
  1290. LONG Bias;
  1291. WCHAR StandardName[32];
  1292. SYSTEMTIME StandardDate;
  1293. LONG StandardBias;
  1294. WCHAR DaylightName[32];
  1295. SYSTEMTIME DaylightDate;
  1296. LONG DaylightBias;
  1297. } TIME_ZONE_INFORMATION,*PTIME_ZONE_INFORMATION,*LPTIME_ZONE_INFORMATION;
  1298. #ifdef UNICODE
  1299. #define FormatMessage FormatMessageW
  1300. #else
  1301. #define FormatMessage FormatMessageA
  1302. #endif
  1303. WINBASEAPI WINBOOL WINAPI SystemTimeToTzSpecificLocalTime(LPTIME_ZONE_INFORMATION lpTimeZoneInformation,LPSYSTEMTIME lpUniversalTime,LPSYSTEMTIME lpLocalTime);
  1304. WINBASEAPI WINBOOL WINAPI TzSpecificLocalTimeToSystemTime(LPTIME_ZONE_INFORMATION lpTimeZoneInformation,LPSYSTEMTIME lpLocalTime,LPSYSTEMTIME lpUniversalTime);
  1305. WINBASEAPI DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation);
  1306. WINBASEAPI WINBOOL WINAPI SetTimeZoneInformation(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation);
  1307. WINBASEAPI WINBOOL WINAPI SystemTimeToFileTime(CONST SYSTEMTIME *lpSystemTime,LPFILETIME lpFileTime);
  1308. WINBASEAPI WINBOOL WINAPI FileTimeToLocalFileTime(CONST FILETIME *lpFileTime,LPFILETIME lpLocalFileTime);
  1309. WINBASEAPI WINBOOL WINAPI LocalFileTimeToFileTime(CONST FILETIME *lpLocalFileTime,LPFILETIME lpFileTime);
  1310. WINBASEAPI WINBOOL WINAPI FileTimeToSystemTime(CONST FILETIME *lpFileTime,LPSYSTEMTIME lpSystemTime);
  1311. WINBASEAPI LONG WINAPI CompareFileTime(CONST FILETIME *lpFileTime1,CONST FILETIME *lpFileTime2);
  1312. WINBASEAPI WINBOOL WINAPI FileTimeToDosDateTime(CONST FILETIME *lpFileTime,LPWORD lpFatDate,LPWORD lpFatTime);
  1313. WINBASEAPI WINBOOL WINAPI DosDateTimeToFileTime(WORD wFatDate,WORD wFatTime,LPFILETIME lpFileTime);
  1314. WINBASEAPI DWORD WINAPI GetTickCount(VOID);
  1315. WINBASEAPI WINBOOL WINAPI SetSystemTimeAdjustment(DWORD dwTimeAdjustment,WINBOOL bTimeAdjustmentDisabled);
  1316. WINBASEAPI WINBOOL WINAPI GetSystemTimeAdjustment(PDWORD lpTimeAdjustment,PDWORD lpTimeIncrement,PBOOL lpTimeAdjustmentDisabled);
  1317. WINBASEAPI DWORD WINAPI FormatMessageA(DWORD dwFlags,LPCVOID lpSource,DWORD dwMessageId,DWORD dwLanguageId,LPSTR lpBuffer,DWORD nSize,va_list *Arguments);
  1318. WINBASEAPI DWORD WINAPI FormatMessageW(DWORD dwFlags,LPCVOID lpSource,DWORD dwMessageId,DWORD dwLanguageId,LPWSTR lpBuffer,DWORD nSize,va_list *Arguments);
  1319. #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x100
  1320. #define FORMAT_MESSAGE_IGNORE_INSERTS 0x200
  1321. #define FORMAT_MESSAGE_FROM_STRING 0x400
  1322. #define FORMAT_MESSAGE_FROM_HMODULE 0x800
  1323. #define FORMAT_MESSAGE_FROM_SYSTEM 0x1000
  1324. #define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x2000
  1325. #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0xff
  1326. #ifdef UNICODE
  1327. #define CreateMailslot CreateMailslotW
  1328. #define EncryptFile EncryptFileW
  1329. #define DecryptFile DecryptFileW
  1330. #define FileEncryptionStatus FileEncryptionStatusW
  1331. #else
  1332. #define CreateMailslot CreateMailslotA
  1333. #define EncryptFile EncryptFileA
  1334. #define DecryptFile DecryptFileA
  1335. #define FileEncryptionStatus FileEncryptionStatusA
  1336. #endif
  1337. WINBASEAPI WINBOOL WINAPI CreatePipe(PHANDLE hReadPipe,PHANDLE hWritePipe,LPSECURITY_ATTRIBUTES lpPipeAttributes,DWORD nSize);
  1338. WINBASEAPI WINBOOL WINAPI ConnectNamedPipe(HANDLE hNamedPipe,LPOVERLAPPED lpOverlapped);
  1339. WINBASEAPI WINBOOL WINAPI DisconnectNamedPipe(HANDLE hNamedPipe);
  1340. WINBASEAPI WINBOOL WINAPI SetNamedPipeHandleState(HANDLE hNamedPipe,LPDWORD lpMode,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout);
  1341. WINBASEAPI WINBOOL WINAPI GetNamedPipeInfo(HANDLE hNamedPipe,LPDWORD lpFlags,LPDWORD lpOutBufferSize,LPDWORD lpInBufferSize,LPDWORD lpMaxInstances);
  1342. WINBASEAPI WINBOOL WINAPI PeekNamedPipe(HANDLE hNamedPipe,LPVOID lpBuffer,DWORD nBufferSize,LPDWORD lpBytesRead,LPDWORD lpTotalBytesAvail,LPDWORD lpBytesLeftThisMessage);
  1343. WINBASEAPI WINBOOL WINAPI TransactNamedPipe(HANDLE hNamedPipe,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,LPOVERLAPPED lpOverlapped);
  1344. WINBASEAPI HANDLE WINAPI CreateMailslotA(LPCSTR lpName,DWORD nMaxMessageSize,DWORD lReadTimeout,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  1345. WINBASEAPI HANDLE WINAPI CreateMailslotW(LPCWSTR lpName,DWORD nMaxMessageSize,DWORD lReadTimeout,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  1346. WINBASEAPI WINBOOL WINAPI GetMailslotInfo(HANDLE hMailslot,LPDWORD lpMaxMessageSize,LPDWORD lpNextSize,LPDWORD lpMessageCount,LPDWORD lpReadTimeout);
  1347. WINBASEAPI WINBOOL WINAPI SetMailslotInfo(HANDLE hMailslot,DWORD lReadTimeout);
  1348. WINBASEAPI LPVOID WINAPI MapViewOfFile(HANDLE hFileMappingObject,DWORD dwDesiredAccess,DWORD dwFileOffsetHigh,DWORD dwFileOffsetLow,SIZE_T dwNumberOfBytesToMap);
  1349. WINBASEAPI WINBOOL WINAPI FlushViewOfFile(LPCVOID lpBaseAddress,SIZE_T dwNumberOfBytesToFlush);
  1350. WINBASEAPI WINBOOL WINAPI UnmapViewOfFile(LPCVOID lpBaseAddress);
  1351. WINADVAPI WINBOOL WINAPI EncryptFileA(LPCSTR lpFileName);
  1352. WINADVAPI WINBOOL WINAPI EncryptFileW(LPCWSTR lpFileName);
  1353. WINADVAPI WINBOOL WINAPI DecryptFileA(LPCSTR lpFileName,DWORD dwReserved);
  1354. WINADVAPI WINBOOL WINAPI DecryptFileW(LPCWSTR lpFileName,DWORD dwReserved);
  1355. #define FILE_ENCRYPTABLE 0
  1356. #define FILE_IS_ENCRYPTED 1
  1357. #define FILE_SYSTEM_ATTR 2
  1358. #define FILE_ROOT_DIR 3
  1359. #define FILE_SYSTEM_DIR 4
  1360. #define FILE_UNKNOWN 5
  1361. #define FILE_SYSTEM_NOT_SUPPORT 6
  1362. #define FILE_USER_DISALLOWED 7
  1363. #define FILE_READ_ONLY 8
  1364. #define FILE_DIR_DISALLOWED 9
  1365. WINADVAPI WINBOOL WINAPI FileEncryptionStatusA(LPCSTR lpFileName,LPDWORD lpStatus);
  1366. WINADVAPI WINBOOL WINAPI FileEncryptionStatusW(LPCWSTR lpFileName,LPDWORD lpStatus);
  1367. #define EFS_USE_RECOVERY_KEYS (0x1)
  1368. typedef DWORD (WINAPI *PFE_EXPORT_FUNC)(PBYTE pbData,PVOID pvCallbackContext,ULONG ulLength);
  1369. typedef DWORD (WINAPI *PFE_IMPORT_FUNC)(PBYTE pbData,PVOID pvCallbackContext,PULONG ulLength);
  1370. #define CREATE_FOR_IMPORT (1)
  1371. #define CREATE_FOR_DIR (2)
  1372. #define OVERWRITE_HIDDEN (4)
  1373. #ifdef UNICODE
  1374. #define OpenEncryptedFileRaw OpenEncryptedFileRawW
  1375. #define lstrcmp lstrcmpW
  1376. #define lstrcmpi lstrcmpiW
  1377. #define lstrcpyn lstrcpynW
  1378. #define lstrcpy lstrcpyW
  1379. #define lstrcat lstrcatW
  1380. #define lstrlen lstrlenW
  1381. #else
  1382. #define OpenEncryptedFileRaw OpenEncryptedFileRawA
  1383. #define lstrcmp lstrcmpA
  1384. #define lstrcmpi lstrcmpiA
  1385. #define lstrcpyn lstrcpynA
  1386. #define lstrcpy lstrcpyA
  1387. #define lstrcat lstrcatA
  1388. #define lstrlen lstrlenA
  1389. #endif
  1390. WINADVAPI DWORD WINAPI OpenEncryptedFileRawA(LPCSTR lpFileName,ULONG ulFlags,PVOID *pvContext);
  1391. WINADVAPI DWORD WINAPI OpenEncryptedFileRawW(LPCWSTR lpFileName,ULONG ulFlags,PVOID *pvContext);
  1392. WINADVAPI DWORD WINAPI ReadEncryptedFileRaw(PFE_EXPORT_FUNC pfExportCallback,PVOID pvCallbackContext,PVOID pvContext);
  1393. WINADVAPI DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC pfImportCallback,PVOID pvCallbackContext,PVOID pvContext);
  1394. WINADVAPI VOID WINAPI CloseEncryptedFileRaw(PVOID pvContext);
  1395. WINBASEAPI int WINAPI lstrcmpA(LPCSTR lpString1,LPCSTR lpString2);
  1396. WINBASEAPI int WINAPI lstrcmpW(LPCWSTR lpString1,LPCWSTR lpString2);
  1397. WINBASEAPI int WINAPI lstrcmpiA(LPCSTR lpString1,LPCSTR lpString2);
  1398. WINBASEAPI int WINAPI lstrcmpiW(LPCWSTR lpString1,LPCWSTR lpString2);
  1399. WINBASEAPI LPSTR WINAPI lstrcpynA(LPSTR lpString1,LPCSTR lpString2,int iMaxLength);
  1400. WINBASEAPI LPWSTR WINAPI lstrcpynW(LPWSTR lpString1,LPCWSTR lpString2,int iMaxLength);
  1401. WINBASEAPI LPSTR WINAPI lstrcpyA(LPSTR lpString1,LPCSTR lpString2);
  1402. WINBASEAPI LPWSTR WINAPI lstrcpyW(LPWSTR lpString1,LPCWSTR lpString2);
  1403. WINBASEAPI LPSTR WINAPI lstrcatA(LPSTR lpString1,LPCSTR lpString2);
  1404. WINBASEAPI LPWSTR WINAPI lstrcatW(LPWSTR lpString1,LPCWSTR lpString2);
  1405. WINBASEAPI int WINAPI lstrlenA(LPCSTR lpString);
  1406. WINBASEAPI int WINAPI lstrlenW(LPCWSTR lpString);
  1407. WINBASEAPI HFILE WINAPI OpenFile(LPCSTR lpFileName,LPOFSTRUCT lpReOpenBuff,UINT uStyle);
  1408. WINBASEAPI HFILE WINAPI _lopen(LPCSTR lpPathName,int iReadWrite);
  1409. WINBASEAPI HFILE WINAPI _lcreat(LPCSTR lpPathName,int iAttribute);
  1410. WINBASEAPI UINT WINAPI _lread(HFILE hFile,LPVOID lpBuffer,UINT uBytes);
  1411. WINBASEAPI UINT WINAPI _lwrite(HFILE hFile,LPCCH lpBuffer,UINT uBytes);
  1412. WINBASEAPI long WINAPI _hread(HFILE hFile,LPVOID lpBuffer,long lBytes);
  1413. WINBASEAPI long WINAPI _hwrite(HFILE hFile,LPCCH lpBuffer,long lBytes);
  1414. WINBASEAPI HFILE WINAPI _lclose(HFILE hFile);
  1415. WINBASEAPI LONG WINAPI _llseek(HFILE hFile,LONG lOffset,int iOrigin);
  1416. WINADVAPI WINBOOL WINAPI IsTextUnicode(CONST VOID *lpv,int iSize,LPINT lpiResult);
  1417. #define FLS_OUT_OF_INDEXES ((DWORD)0xffffffff)
  1418. WINBASEAPI DWORD WINAPI FlsAlloc(PFLS_CALLBACK_FUNCTION lpCallback);
  1419. WINBASEAPI PVOID WINAPI FlsGetValue(DWORD dwFlsIndex);
  1420. WINBASEAPI WINBOOL WINAPI FlsSetValue(DWORD dwFlsIndex,PVOID lpFlsData);
  1421. WINBASEAPI WINBOOL WINAPI FlsFree(DWORD dwFlsIndex);
  1422. #define TLS_OUT_OF_INDEXES ((DWORD)0xffffffff)
  1423. WINBASEAPI DWORD WINAPI TlsAlloc(VOID);
  1424. WINBASEAPI LPVOID WINAPI TlsGetValue(DWORD dwTlsIndex);
  1425. WINBASEAPI WINBOOL WINAPI TlsSetValue(DWORD dwTlsIndex,LPVOID lpTlsValue);
  1426. WINBASEAPI WINBOOL WINAPI TlsFree(DWORD dwTlsIndex);
  1427. typedef VOID (WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD dwErrorCode,DWORD dwNumberOfBytesTransfered,LPOVERLAPPED lpOverlapped);
  1428. WINBASEAPI DWORD WINAPI SleepEx(DWORD dwMilliseconds,WINBOOL bAlertable);
  1429. WINBASEAPI DWORD WINAPI WaitForSingleObjectEx(HANDLE hHandle,DWORD dwMilliseconds,WINBOOL bAlertable);
  1430. WINBASEAPI DWORD WINAPI WaitForMultipleObjectsEx(DWORD nCount,CONST HANDLE *lpHandles,WINBOOL bWaitAll,DWORD dwMilliseconds,WINBOOL bAlertable);
  1431. WINBASEAPI DWORD WINAPI SignalObjectAndWait(HANDLE hObjectToSignal,HANDLE hObjectToWaitOn,DWORD dwMilliseconds,WINBOOL bAlertable);
  1432. WINBASEAPI WINBOOL WINAPI ReadFileEx(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
  1433. WINBASEAPI WINBOOL WINAPI WriteFileEx(HANDLE hFile,LPCVOID lpBuffer,DWORD nNumberOfBytesToWrite,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
  1434. WINBASEAPI WINBOOL WINAPI BackupRead(HANDLE hFile,LPBYTE lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,WINBOOL bAbort,WINBOOL bProcessSecurity,LPVOID *lpContext);
  1435. WINBASEAPI WINBOOL WINAPI BackupSeek(HANDLE hFile,DWORD dwLowBytesToSeek,DWORD dwHighBytesToSeek,LPDWORD lpdwLowByteSeeked,LPDWORD lpdwHighByteSeeked,LPVOID *lpContext);
  1436. WINBASEAPI WINBOOL WINAPI BackupWrite(HANDLE hFile,LPBYTE lpBuffer,DWORD nNumberOfBytesToWrite,LPDWORD lpNumberOfBytesWritten,WINBOOL bAbort,WINBOOL bProcessSecurity,LPVOID *lpContext);
  1437. typedef struct _WIN32_STREAM_ID {
  1438. DWORD dwStreamId;
  1439. DWORD dwStreamAttributes;
  1440. LARGE_INTEGER Size;
  1441. DWORD dwStreamNameSize;
  1442. WCHAR cStreamName[ANYSIZE_ARRAY];
  1443. } WIN32_STREAM_ID,*LPWIN32_STREAM_ID;
  1444. #define BACKUP_INVALID 0x0
  1445. #define BACKUP_DATA 0x1
  1446. #define BACKUP_EA_DATA 0x2
  1447. #define BACKUP_SECURITY_DATA 0x3
  1448. #define BACKUP_ALTERNATE_DATA 0x4
  1449. #define BACKUP_LINK 0x5
  1450. #define BACKUP_PROPERTY_DATA 0x6
  1451. #define BACKUP_OBJECT_ID 0x7
  1452. #define BACKUP_REPARSE_DATA 0x8
  1453. #define BACKUP_SPARSE_BLOCK 0x9
  1454. #define STREAM_NORMAL_ATTRIBUTE 0x0
  1455. #define STREAM_MODIFIED_WHEN_READ 0x1
  1456. #define STREAM_CONTAINS_SECURITY 0x2
  1457. #define STREAM_CONTAINS_PROPERTIES 0x4
  1458. #define STREAM_SPARSE_ATTRIBUTE 0x8
  1459. WINBASEAPI WINBOOL WINAPI ReadFileScatter(HANDLE hFile,FILE_SEGMENT_ELEMENT aSegmentArray[],DWORD nNumberOfBytesToRead,LPDWORD lpReserved,LPOVERLAPPED lpOverlapped);
  1460. WINBASEAPI WINBOOL WINAPI WriteFileGather(HANDLE hFile,FILE_SEGMENT_ELEMENT aSegmentArray[],DWORD nNumberOfBytesToWrite,LPDWORD lpReserved,LPOVERLAPPED lpOverlapped);
  1461. #define STARTF_USESHOWWINDOW 0x1
  1462. #define STARTF_USESIZE 0x2
  1463. #define STARTF_USEPOSITION 0x4
  1464. #define STARTF_USECOUNTCHARS 0x8
  1465. #define STARTF_USEFILLATTRIBUTE 0x10
  1466. #define STARTF_RUNFULLSCREEN 0x20
  1467. #define STARTF_FORCEONFEEDBACK 0x40
  1468. #define STARTF_FORCEOFFFEEDBACK 0x80
  1469. #define STARTF_USESTDHANDLES 0x100
  1470. #define STARTF_USEHOTKEY 0x200
  1471. typedef struct _STARTUPINFOA {
  1472. DWORD cb;
  1473. LPSTR lpReserved;
  1474. LPSTR lpDesktop;
  1475. LPSTR lpTitle;
  1476. DWORD dwX;
  1477. DWORD dwY;
  1478. DWORD dwXSize;
  1479. DWORD dwYSize;
  1480. DWORD dwXCountChars;
  1481. DWORD dwYCountChars;
  1482. DWORD dwFillAttribute;
  1483. DWORD dwFlags;
  1484. WORD wShowWindow;
  1485. WORD cbReserved2;
  1486. LPBYTE lpReserved2;
  1487. HANDLE hStdInput;
  1488. HANDLE hStdOutput;
  1489. HANDLE hStdError;
  1490. } STARTUPINFOA,*LPSTARTUPINFOA;
  1491. typedef struct _STARTUPINFOW {
  1492. DWORD cb;
  1493. LPWSTR lpReserved;
  1494. LPWSTR lpDesktop;
  1495. LPWSTR lpTitle;
  1496. DWORD dwX;
  1497. DWORD dwY;
  1498. DWORD dwXSize;
  1499. DWORD dwYSize;
  1500. DWORD dwXCountChars;
  1501. DWORD dwYCountChars;
  1502. DWORD dwFillAttribute;
  1503. DWORD dwFlags;
  1504. WORD wShowWindow;
  1505. WORD cbReserved2;
  1506. LPBYTE lpReserved2;
  1507. HANDLE hStdInput;
  1508. HANDLE hStdOutput;
  1509. HANDLE hStdError;
  1510. } STARTUPINFOW,*LPSTARTUPINFOW;
  1511. #ifdef UNICODE
  1512. typedef STARTUPINFOW STARTUPINFO;
  1513. typedef LPSTARTUPINFOW LPSTARTUPINFO;
  1514. #else
  1515. typedef STARTUPINFOA STARTUPINFO;
  1516. typedef LPSTARTUPINFOA LPSTARTUPINFO;
  1517. #endif
  1518. #define SHUTDOWN_NORETRY 0x1
  1519. typedef struct _WIN32_FIND_DATAA {
  1520. DWORD dwFileAttributes;
  1521. FILETIME ftCreationTime;
  1522. FILETIME ftLastAccessTime;
  1523. FILETIME ftLastWriteTime;
  1524. DWORD nFileSizeHigh;
  1525. DWORD nFileSizeLow;
  1526. DWORD dwReserved0;
  1527. DWORD dwReserved1;
  1528. CHAR cFileName[MAX_PATH];
  1529. CHAR cAlternateFileName[14];
  1530. } WIN32_FIND_DATAA,*PWIN32_FIND_DATAA,*LPWIN32_FIND_DATAA;
  1531. typedef struct _WIN32_FIND_DATAW {
  1532. DWORD dwFileAttributes;
  1533. FILETIME ftCreationTime;
  1534. FILETIME ftLastAccessTime;
  1535. FILETIME ftLastWriteTime;
  1536. DWORD nFileSizeHigh;
  1537. DWORD nFileSizeLow;
  1538. DWORD dwReserved0;
  1539. DWORD dwReserved1;
  1540. WCHAR cFileName[MAX_PATH];
  1541. WCHAR cAlternateFileName[14];
  1542. } WIN32_FIND_DATAW,*PWIN32_FIND_DATAW,*LPWIN32_FIND_DATAW;
  1543. #ifdef UNICODE
  1544. typedef WIN32_FIND_DATAW WIN32_FIND_DATA;
  1545. typedef PWIN32_FIND_DATAW PWIN32_FIND_DATA;
  1546. typedef LPWIN32_FIND_DATAW LPWIN32_FIND_DATA;
  1547. #else
  1548. typedef WIN32_FIND_DATAA WIN32_FIND_DATA;
  1549. typedef PWIN32_FIND_DATAA PWIN32_FIND_DATA;
  1550. typedef LPWIN32_FIND_DATAA LPWIN32_FIND_DATA;
  1551. #endif
  1552. typedef struct _WIN32_FILE_ATTRIBUTE_DATA {
  1553. DWORD dwFileAttributes;
  1554. FILETIME ftCreationTime;
  1555. FILETIME ftLastAccessTime;
  1556. FILETIME ftLastWriteTime;
  1557. DWORD nFileSizeHigh;
  1558. DWORD nFileSizeLow;
  1559. } WIN32_FILE_ATTRIBUTE_DATA,*LPWIN32_FILE_ATTRIBUTE_DATA;
  1560. #ifdef UNICODE
  1561. #define CreateMutex CreateMutexW
  1562. #define OpenMutex OpenMutexW
  1563. #define CreateEvent CreateEventW
  1564. #define OpenEvent OpenEventW
  1565. #define CreateSemaphore CreateSemaphoreW
  1566. #define OpenSemaphore OpenSemaphoreW
  1567. #else
  1568. #define CreateMutex CreateMutexA
  1569. #define OpenMutex OpenMutexA
  1570. #define CreateEvent CreateEventA
  1571. #define OpenEvent OpenEventA
  1572. #define CreateSemaphore CreateSemaphoreA
  1573. #define OpenSemaphore OpenSemaphoreA
  1574. #endif
  1575. WINBASEAPI HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES lpMutexAttributes,WINBOOL bInitialOwner,LPCSTR lpName);
  1576. WINBASEAPI HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES lpMutexAttributes,WINBOOL bInitialOwner,LPCWSTR lpName);
  1577. WINBASEAPI HANDLE WINAPI OpenMutexA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName);
  1578. WINBASEAPI HANDLE WINAPI OpenMutexW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName);
  1579. WINBASEAPI HANDLE WINAPI CreateEventA(LPSECURITY_ATTRIBUTES lpEventAttributes,WINBOOL bManualReset,WINBOOL bInitialState,LPCSTR lpName);
  1580. WINBASEAPI HANDLE WINAPI CreateEventW(LPSECURITY_ATTRIBUTES lpEventAttributes,WINBOOL bManualReset,WINBOOL bInitialState,LPCWSTR lpName);
  1581. WINBASEAPI HANDLE WINAPI OpenEventA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName);
  1582. WINBASEAPI HANDLE WINAPI OpenEventW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName);
  1583. WINBASEAPI HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,LONG lInitialCount,LONG lMaximumCount,LPCSTR lpName);
  1584. WINBASEAPI HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,LONG lInitialCount,LONG lMaximumCount,LPCWSTR lpName);
  1585. WINBASEAPI HANDLE WINAPI OpenSemaphoreA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName);
  1586. WINBASEAPI HANDLE WINAPI OpenSemaphoreW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName);
  1587. typedef VOID (WINAPI *PTIMERAPCROUTINE)(LPVOID lpArgToCompletionRoutine,DWORD dwTimerLowValue,DWORD dwTimerHighValue);
  1588. #ifdef UNICODE
  1589. #define CreateWaitableTimer CreateWaitableTimerW
  1590. #define OpenWaitableTimer OpenWaitableTimerW
  1591. #define CreateFileMapping CreateFileMappingW
  1592. #define OpenFileMapping OpenFileMappingW
  1593. #define GetLogicalDriveStrings GetLogicalDriveStringsW
  1594. #define LoadLibrary LoadLibraryW
  1595. #define LoadLibraryEx LoadLibraryExW
  1596. #define GetModuleFileName GetModuleFileNameW
  1597. #define GetModuleHandle GetModuleHandleW
  1598. #else
  1599. #define CreateWaitableTimer CreateWaitableTimerA
  1600. #define OpenWaitableTimer OpenWaitableTimerA
  1601. #define CreateFileMapping CreateFileMappingA
  1602. #define OpenFileMapping OpenFileMappingA
  1603. #define GetLogicalDriveStrings GetLogicalDriveStringsA
  1604. #define LoadLibrary LoadLibraryA
  1605. #define LoadLibraryEx LoadLibraryExA
  1606. #define GetModuleFileName GetModuleFileNameA
  1607. #define GetModuleHandle GetModuleHandleA
  1608. #endif
  1609. WINBASEAPI HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES lpTimerAttributes,WINBOOL bManualReset,LPCSTR lpTimerName);
  1610. WINBASEAPI HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES lpTimerAttributes,WINBOOL bManualReset,LPCWSTR lpTimerName);
  1611. WINBASEAPI HANDLE WINAPI OpenWaitableTimerA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpTimerName);
  1612. WINBASEAPI HANDLE WINAPI OpenWaitableTimerW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpTimerName);
  1613. WINBASEAPI WINBOOL WINAPI SetWaitableTimer(HANDLE hTimer,const LARGE_INTEGER *lpDueTime,LONG lPeriod,PTIMERAPCROUTINE pfnCompletionRoutine,LPVOID lpArgToCompletionRoutine,WINBOOL fResume);
  1614. WINBASEAPI WINBOOL WINAPI CancelWaitableTimer(HANDLE hTimer);
  1615. WINBASEAPI HANDLE WINAPI CreateFileMappingA(HANDLE hFile,LPSECURITY_ATTRIBUTES lpFileMappingAttributes,DWORD flProtect,DWORD dwMaximumSizeHigh,DWORD dwMaximumSizeLow,LPCSTR lpName);
  1616. WINBASEAPI HANDLE WINAPI CreateFileMappingW(HANDLE hFile,LPSECURITY_ATTRIBUTES lpFileMappingAttributes,DWORD flProtect,DWORD dwMaximumSizeHigh,DWORD dwMaximumSizeLow,LPCWSTR lpName);
  1617. WINBASEAPI HANDLE WINAPI OpenFileMappingA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName);
  1618. WINBASEAPI HANDLE WINAPI OpenFileMappingW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName);
  1619. WINBASEAPI DWORD WINAPI GetLogicalDriveStringsA(DWORD nBufferLength,LPSTR lpBuffer);
  1620. WINBASEAPI DWORD WINAPI GetLogicalDriveStringsW(DWORD nBufferLength,LPWSTR lpBuffer);
  1621. typedef enum _MEMORY_RESOURCE_NOTIFICATION_TYPE {
  1622. LowMemoryResourceNotification,HighMemoryResourceNotification
  1623. } MEMORY_RESOURCE_NOTIFICATION_TYPE;
  1624. WINBASEAPI HANDLE WINAPI CreateMemoryResourceNotification(MEMORY_RESOURCE_NOTIFICATION_TYPE NotificationType);
  1625. WINBASEAPI WINBOOL WINAPI QueryMemoryResourceNotification(HANDLE ResourceNotificationHandle,PBOOL ResourceState);
  1626. WINBASEAPI HMODULE WINAPI LoadLibraryA(LPCSTR lpLibFileName);
  1627. WINBASEAPI HMODULE WINAPI LoadLibraryW(LPCWSTR lpLibFileName);
  1628. WINBASEAPI HMODULE WINAPI LoadLibraryExA(LPCSTR lpLibFileName,HANDLE hFile,DWORD dwFlags);
  1629. WINBASEAPI HMODULE WINAPI LoadLibraryExW(LPCWSTR lpLibFileName,HANDLE hFile,DWORD dwFlags);
  1630. #define DONT_RESOLVE_DLL_REFERENCES 0x1
  1631. #define LOAD_LIBRARY_AS_DATAFILE 0x2
  1632. #define LOAD_WITH_ALTERED_SEARCH_PATH 0x8
  1633. #define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x10
  1634. #define LOAD_LINRARY_AS_IMAGE_RESOURCE 0x20
  1635. #define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x40
  1636. WINBASEAPI DWORD WINAPI GetModuleFileNameA(HMODULE hModule,LPCH lpFilename,DWORD nSize);
  1637. WINBASEAPI DWORD WINAPI GetModuleFileNameW(HMODULE hModule,LPWCH lpFilename,DWORD nSize);
  1638. WINBASEAPI HMODULE WINAPI GetModuleHandleA(LPCSTR lpModuleName);
  1639. WINBASEAPI HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName);
  1640. #ifndef RC_INVOKED
  1641. #define GET_MODULE_HANDLE_EX_FLAG_PIN (0x1)
  1642. #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT (0x2)
  1643. #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS (0x4)
  1644. typedef WINBOOL (WINAPI *PGET_MODULE_HANDLE_EXA)(DWORD dwFlags,LPCSTR lpModuleName,HMODULE *phModule);
  1645. typedef WINBOOL (WINAPI *PGET_MODULE_HANDLE_EXW)(DWORD dwFlags,LPCWSTR lpModuleName,HMODULE *phModule);
  1646. #ifdef UNICODE
  1647. #define PGET_MODULE_HANDLE_EX PGET_MODULE_HANDLE_EXW
  1648. #define GetModuleHandleEx GetModuleHandleExW
  1649. #else
  1650. #define PGET_MODULE_HANDLE_EX PGET_MODULE_HANDLE_EXA
  1651. #define GetModuleHandleEx GetModuleHandleExA
  1652. #endif
  1653. WINBASEAPI WINBOOL WINAPI GetModuleHandleExA(DWORD dwFlags,LPCSTR lpModuleName,HMODULE *phModule);
  1654. WINBASEAPI WINBOOL WINAPI GetModuleHandleExW(DWORD dwFlags,LPCWSTR lpModuleName,HMODULE *phModule);
  1655. #endif
  1656. #ifdef UNICODE
  1657. #define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathW
  1658. #define CreateProcess CreateProcessW
  1659. #define FatalAppExit FatalAppExitW
  1660. #define GetStartupInfo GetStartupInfoW
  1661. #define GetCommandLine GetCommandLineW
  1662. #define GetEnvironmentVariable GetEnvironmentVariableW
  1663. #define SetEnvironmentVariable SetEnvironmentVariableW
  1664. #define ExpandEnvironmentStrings ExpandEnvironmentStringsW
  1665. #define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableW
  1666. #define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableW
  1667. #define OutputDebugString OutputDebugStringW
  1668. #define FindResource FindResourceW
  1669. #define FindResourceEx FindResourceExW
  1670. #else
  1671. #define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathA
  1672. #define CreateProcess CreateProcessA
  1673. #define FatalAppExit FatalAppExitA
  1674. #define GetStartupInfo GetStartupInfoA
  1675. #define GetCommandLine GetCommandLineA
  1676. #define GetEnvironmentVariable GetEnvironmentVariableA
  1677. #define SetEnvironmentVariable SetEnvironmentVariableA
  1678. #define ExpandEnvironmentStrings ExpandEnvironmentStringsA
  1679. #define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableA
  1680. #define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableA
  1681. #define OutputDebugString OutputDebugStringA
  1682. #define FindResource FindResourceA
  1683. #define FindResourceEx FindResourceExA
  1684. #endif
  1685. WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathA(LPCSTR ExeName);
  1686. WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathW(LPCWSTR ExeName);
  1687. WINBASEAPI WINBOOL WINAPI CreateProcessA(LPCSTR lpApplicationName,LPSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCSTR lpCurrentDirectory,LPSTARTUPINFOA lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
  1688. WINBASEAPI WINBOOL WINAPI CreateProcessW(LPCWSTR lpApplicationName,LPWSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
  1689. WINBASEAPI DWORD WINAPI AddLocalAlternateComputerNameA(LPCSTR lpDnsFQHostname,ULONG ulFlags);
  1690. WINBASEAPI DWORD WINAPI AddLocalAlternateComputerNameW(LPCWSTR lpDnsFQHostname,ULONG ulFlags);
  1691. WINBASEAPI WINBOOL WINAPI SetProcessShutdownParameters(DWORD dwLevel,DWORD dwFlags);
  1692. WINBASEAPI WINBOOL WINAPI GetProcessShutdownParameters(LPDWORD lpdwLevel,LPDWORD lpdwFlags);
  1693. WINBASEAPI DWORD WINAPI GetProcessVersion(DWORD ProcessId);
  1694. WINBASEAPI VOID WINAPI FatalAppExitA(UINT uAction,LPCSTR lpMessageText);
  1695. WINBASEAPI VOID WINAPI FatalAppExitW(UINT uAction,LPCWSTR lpMessageText);
  1696. WINBASEAPI VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo);
  1697. WINBASEAPI VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW lpStartupInfo);
  1698. WINBASEAPI LPSTR WINAPI GetCommandLineA(VOID);
  1699. WINBASEAPI LPWSTR WINAPI GetCommandLineW(VOID);
  1700. WINBASEAPI DWORD WINAPI GetEnvironmentVariableA(LPCSTR lpName,LPSTR lpBuffer,DWORD nSize);
  1701. WINBASEAPI DWORD WINAPI GetEnvironmentVariableW(LPCWSTR lpName,LPWSTR lpBuffer,DWORD nSize);
  1702. WINBASEAPI WINBOOL WINAPI SetEnvironmentVariableA(LPCSTR lpName,LPCSTR lpValue);
  1703. WINBASEAPI WINBOOL WINAPI SetEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpValue);
  1704. WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR lpSrc,LPSTR lpDst,DWORD nSize);
  1705. WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR lpSrc,LPWSTR lpDst,DWORD nSize);
  1706. WINBASEAPI DWORD WINAPI GetFirmwareEnvironmentVariableA(LPCSTR lpName,LPCSTR lpGuid,PVOID pBuffer,DWORD nSize);
  1707. WINBASEAPI DWORD WINAPI GetFirmwareEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpGuid,PVOID pBuffer,DWORD nSize);
  1708. WINBASEAPI WINBOOL WINAPI SetFirmwareEnvironmentVariableA(LPCSTR lpName,LPCSTR lpGuid,PVOID pValue,DWORD nSize);
  1709. WINBASEAPI WINBOOL WINAPI SetFirmwareEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpGuid,PVOID pValue,DWORD nSize);
  1710. WINBASEAPI VOID WINAPI OutputDebugStringA(LPCSTR lpOutputString);
  1711. WINBASEAPI VOID WINAPI OutputDebugStringW(LPCWSTR lpOutputString);
  1712. WINBASEAPI HRSRC WINAPI FindResourceA(HMODULE hModule,LPCSTR lpName,LPCSTR lpType);
  1713. WINBASEAPI HRSRC WINAPI FindResourceW(HMODULE hModule,LPCWSTR lpName,LPCWSTR lpType);
  1714. WINBASEAPI HRSRC WINAPI FindResourceExA(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,WORD wLanguage);
  1715. WINBASEAPI HRSRC WINAPI FindResourceExW(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage);
  1716. #ifdef UNICODE
  1717. #define ENUMRESTYPEPROC ENUMRESTYPEPROCW
  1718. #define ENUMRESNAMEPROC ENUMRESNAMEPROCW
  1719. #define ENUMRESLANGPROC ENUMRESLANGPROCW
  1720. #define EnumResourceTypes EnumResourceTypesW
  1721. #define EnumResourceNames EnumResourceNamesW
  1722. #define EnumResourceLanguages EnumResourceLanguagesW
  1723. #define BeginUpdateResource BeginUpdateResourceW
  1724. #define UpdateResource UpdateResourceW
  1725. #define EndUpdateResource EndUpdateResourceW
  1726. #define GlobalAddAtom GlobalAddAtomW
  1727. #define GlobalFindAtom GlobalFindAtomW
  1728. #define GlobalGetAtomName GlobalGetAtomNameW
  1729. #define AddAtom AddAtomW
  1730. #define FindAtom FindAtomW
  1731. #define GetAtomName GetAtomNameW
  1732. #define GetProfileInt GetProfileIntW
  1733. #define GetProfileString GetProfileStringW
  1734. #define WriteProfileString WriteProfileStringW
  1735. #define GetProfileSection GetProfileSectionW
  1736. #define WriteProfileSection WriteProfileSectionW
  1737. #define GetPrivateProfileInt GetPrivateProfileIntW
  1738. #define GetPrivateProfileString GetPrivateProfileStringW
  1739. #define WritePrivateProfileString WritePrivateProfileStringW
  1740. #define GetPrivateProfileSection GetPrivateProfileSectionW
  1741. #define WritePrivateProfileSection WritePrivateProfileSectionW
  1742. #define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesW
  1743. #define GetPrivateProfileStruct GetPrivateProfileStructW
  1744. #define WritePrivateProfileStruct WritePrivateProfileStructW
  1745. #define GetDriveType GetDriveTypeW
  1746. #define GetSystemDirectory GetSystemDirectoryW
  1747. #define GetTempPath GetTempPathW
  1748. #define GetTempFileName GetTempFileNameW
  1749. #define GetWindowsDirectory GetWindowsDirectoryW
  1750. #define GetSystemWindowsDirectory GetSystemWindowsDirectoryW
  1751. #define AddLocalAlternateComputerName AddLocalAlternateComputerNameW
  1752. #else
  1753. #define ENUMRESTYPEPROC ENUMRESTYPEPROCA
  1754. #define ENUMRESNAMEPROC ENUMRESNAMEPROCA
  1755. #define ENUMRESLANGPROC ENUMRESLANGPROCA
  1756. #define EnumResourceTypes EnumResourceTypesA
  1757. #define EnumResourceNames EnumResourceNamesA
  1758. #define EnumResourceLanguages EnumResourceLanguagesA
  1759. #define BeginUpdateResource BeginUpdateResourceA
  1760. #define UpdateResource UpdateResourceA
  1761. #define EndUpdateResource EndUpdateResourceA
  1762. #define GlobalAddAtom GlobalAddAtomA
  1763. #define GlobalFindAtom GlobalFindAtomA
  1764. #define GlobalGetAtomName GlobalGetAtomNameA
  1765. #define AddAtom AddAtomA
  1766. #define FindAtom FindAtomA
  1767. #define GetAtomName GetAtomNameA
  1768. #define GetProfileInt GetProfileIntA
  1769. #define GetProfileString GetProfileStringA
  1770. #define WriteProfileString WriteProfileStringA
  1771. #define GetProfileSection GetProfileSectionA
  1772. #define WriteProfileSection WriteProfileSectionA
  1773. #define GetPrivateProfileInt GetPrivateProfileIntA
  1774. #define GetPrivateProfileString GetPrivateProfileStringA
  1775. #define WritePrivateProfileString WritePrivateProfileStringA
  1776. #define GetPrivateProfileSection GetPrivateProfileSectionA
  1777. #define WritePrivateProfileSection WritePrivateProfileSectionA
  1778. #define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA
  1779. #define GetPrivateProfileStruct GetPrivateProfileStructA
  1780. #define WritePrivateProfileStruct WritePrivateProfileStructA
  1781. #define GetDriveType GetDriveTypeA
  1782. #define GetSystemDirectory GetSystemDirectoryA
  1783. #define GetTempPath GetTempPathA
  1784. #define GetTempFileName GetTempFileNameA
  1785. #define GetWindowsDirectory GetWindowsDirectoryA
  1786. #define GetSystemWindowsDirectory GetSystemWindowsDirectoryA
  1787. #define AddLocalAlternateComputerName AddLocalAlternateComputerNameA
  1788. #endif
  1789. typedef WINBOOL (CALLBACK *ENUMRESTYPEPROCA)(HMODULE hModule,LPSTR lpType,LONG_PTR lParam);
  1790. typedef WINBOOL (CALLBACK *ENUMRESTYPEPROCW)(HMODULE hModule,LPWSTR lpType,LONG_PTR lParam);
  1791. typedef WINBOOL (CALLBACK *ENUMRESNAMEPROCA)(HMODULE hModule,LPCSTR lpType,LPSTR lpName,LONG_PTR lParam);
  1792. typedef WINBOOL (CALLBACK *ENUMRESNAMEPROCW)(HMODULE hModule,LPCWSTR lpType,LPWSTR lpName,LONG_PTR lParam);
  1793. typedef WINBOOL (CALLBACK *ENUMRESLANGPROCA)(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,WORD wLanguage,LONG_PTR lParam);
  1794. typedef WINBOOL (CALLBACK *ENUMRESLANGPROCW)(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage,LONG_PTR lParam);
  1795. WINBASEAPI WINBOOL WINAPI EnumResourceTypesA(HMODULE hModule,ENUMRESTYPEPROCA lpEnumFunc,LONG_PTR lParam);
  1796. WINBASEAPI WINBOOL WINAPI EnumResourceTypesW(HMODULE hModule,ENUMRESTYPEPROCW lpEnumFunc,LONG_PTR lParam);
  1797. WINBASEAPI WINBOOL WINAPI EnumResourceNamesA(HMODULE hModule,LPCSTR lpType,ENUMRESNAMEPROCA lpEnumFunc,LONG_PTR lParam);
  1798. WINBASEAPI WINBOOL WINAPI EnumResourceNamesW(HMODULE hModule,LPCWSTR lpType,ENUMRESNAMEPROCW lpEnumFunc,LONG_PTR lParam);
  1799. WINBASEAPI WINBOOL WINAPI EnumResourceLanguagesA(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,ENUMRESLANGPROCA lpEnumFunc,LONG_PTR lParam);
  1800. WINBASEAPI WINBOOL WINAPI EnumResourceLanguagesW(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,ENUMRESLANGPROCW lpEnumFunc,LONG_PTR lParam);
  1801. WINBASEAPI HANDLE WINAPI BeginUpdateResourceA(LPCSTR pFileName,WINBOOL bDeleteExistingResources);
  1802. WINBASEAPI HANDLE WINAPI BeginUpdateResourceW(LPCWSTR pFileName,WINBOOL bDeleteExistingResources);
  1803. WINBASEAPI WINBOOL WINAPI UpdateResourceA(HANDLE hUpdate,LPCSTR lpType,LPCSTR lpName,WORD wLanguage,LPVOID lpData,DWORD cb);
  1804. WINBASEAPI WINBOOL WINAPI UpdateResourceW(HANDLE hUpdate,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage,LPVOID lpData,DWORD cb);
  1805. WINBASEAPI WINBOOL WINAPI EndUpdateResourceA(HANDLE hUpdate,WINBOOL fDiscard);
  1806. WINBASEAPI WINBOOL WINAPI EndUpdateResourceW(HANDLE hUpdate,WINBOOL fDiscard);
  1807. WINBASEAPI ATOM WINAPI GlobalAddAtomA(LPCSTR lpString);
  1808. WINBASEAPI ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString);
  1809. WINBASEAPI ATOM WINAPI GlobalFindAtomA(LPCSTR lpString);
  1810. WINBASEAPI ATOM WINAPI GlobalFindAtomW(LPCWSTR lpString);
  1811. WINBASEAPI UINT WINAPI GlobalGetAtomNameA(ATOM nAtom,LPSTR lpBuffer,int nSize);
  1812. WINBASEAPI UINT WINAPI GlobalGetAtomNameW(ATOM nAtom,LPWSTR lpBuffer,int nSize);
  1813. WINBASEAPI ATOM WINAPI AddAtomA(LPCSTR lpString);
  1814. WINBASEAPI ATOM WINAPI AddAtomW(LPCWSTR lpString);
  1815. WINBASEAPI ATOM WINAPI FindAtomA(LPCSTR lpString);
  1816. WINBASEAPI ATOM WINAPI FindAtomW(LPCWSTR lpString);
  1817. WINBASEAPI UINT WINAPI GetAtomNameA(ATOM nAtom,LPSTR lpBuffer,int nSize);
  1818. WINBASEAPI UINT WINAPI GetAtomNameW(ATOM nAtom,LPWSTR lpBuffer,int nSize);
  1819. WINBASEAPI UINT WINAPI GetProfileIntA(LPCSTR lpAppName,LPCSTR lpKeyName,INT nDefault);
  1820. WINBASEAPI UINT WINAPI GetProfileIntW(LPCWSTR lpAppName,LPCWSTR lpKeyName,INT nDefault);
  1821. WINBASEAPI DWORD WINAPI GetProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpDefault,LPSTR lpReturnedString,DWORD nSize);
  1822. WINBASEAPI DWORD WINAPI GetProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpDefault,LPWSTR lpReturnedString,DWORD nSize);
  1823. WINBASEAPI WINBOOL WINAPI WriteProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpString);
  1824. WINBASEAPI WINBOOL WINAPI WriteProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpString);
  1825. WINBASEAPI DWORD WINAPI GetProfileSectionA(LPCSTR lpAppName,LPSTR lpReturnedString,DWORD nSize);
  1826. WINBASEAPI DWORD WINAPI GetProfileSectionW(LPCWSTR lpAppName,LPWSTR lpReturnedString,DWORD nSize);
  1827. WINBASEAPI WINBOOL WINAPI WriteProfileSectionA(LPCSTR lpAppName,LPCSTR lpString);
  1828. WINBASEAPI WINBOOL WINAPI WriteProfileSectionW(LPCWSTR lpAppName,LPCWSTR lpString);
  1829. WINBASEAPI UINT WINAPI GetPrivateProfileIntA(LPCSTR lpAppName,LPCSTR lpKeyName,INT nDefault,LPCSTR lpFileName);
  1830. WINBASEAPI UINT WINAPI GetPrivateProfileIntW(LPCWSTR lpAppName,LPCWSTR lpKeyName,INT nDefault,LPCWSTR lpFileName);
  1831. WINBASEAPI DWORD WINAPI GetPrivateProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpDefault,LPSTR lpReturnedString,DWORD nSize,LPCSTR lpFileName);
  1832. WINBASEAPI DWORD WINAPI GetPrivateProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpDefault,LPWSTR lpReturnedString,DWORD nSize,LPCWSTR lpFileName);
  1833. WINBASEAPI WINBOOL WINAPI WritePrivateProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpString,LPCSTR lpFileName);
  1834. WINBASEAPI WINBOOL WINAPI WritePrivateProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpString,LPCWSTR lpFileName);
  1835. WINBASEAPI DWORD WINAPI GetPrivateProfileSectionA(LPCSTR lpAppName,LPSTR lpReturnedString,DWORD nSize,LPCSTR lpFileName);
  1836. WINBASEAPI DWORD WINAPI GetPrivateProfileSectionW(LPCWSTR lpAppName,LPWSTR lpReturnedString,DWORD nSize,LPCWSTR lpFileName);
  1837. WINBASEAPI WINBOOL WINAPI WritePrivateProfileSectionA(LPCSTR lpAppName,LPCSTR lpString,LPCSTR lpFileName);
  1838. WINBASEAPI WINBOOL WINAPI WritePrivateProfileSectionW(LPCWSTR lpAppName,LPCWSTR lpString,LPCWSTR lpFileName);
  1839. WINBASEAPI DWORD WINAPI GetPrivateProfileSectionNamesA(LPSTR lpszReturnBuffer,DWORD nSize,LPCSTR lpFileName);
  1840. WINBASEAPI DWORD WINAPI GetPrivateProfileSectionNamesW(LPWSTR lpszReturnBuffer,DWORD nSize,LPCWSTR lpFileName);
  1841. WINBASEAPI WINBOOL WINAPI GetPrivateProfileStructA(LPCSTR lpszSection,LPCSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCSTR szFile);
  1842. WINBASEAPI WINBOOL WINAPI GetPrivateProfileStructW(LPCWSTR lpszSection,LPCWSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCWSTR szFile);
  1843. WINBASEAPI WINBOOL WINAPI WritePrivateProfileStructA(LPCSTR lpszSection,LPCSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCSTR szFile);
  1844. WINBASEAPI WINBOOL WINAPI WritePrivateProfileStructW(LPCWSTR lpszSection,LPCWSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCWSTR szFile);
  1845. WINBASEAPI UINT WINAPI GetDriveTypeA(LPCSTR lpRootPathName);
  1846. WINBASEAPI UINT WINAPI GetDriveTypeW(LPCWSTR lpRootPathName);
  1847. WINBASEAPI UINT WINAPI GetSystemDirectoryA(LPSTR lpBuffer,UINT uSize);
  1848. WINBASEAPI UINT WINAPI GetSystemDirectoryW(LPWSTR lpBuffer,UINT uSize);
  1849. WINBASEAPI DWORD WINAPI GetTempPathA(DWORD nBufferLength,LPSTR lpBuffer);
  1850. WINBASEAPI DWORD WINAPI GetTempPathW(DWORD nBufferLength,LPWSTR lpBuffer);
  1851. WINBASEAPI UINT WINAPI GetTempFileNameA(LPCSTR lpPathName,LPCSTR lpPrefixString,UINT uUnique,LPSTR lpTempFileName);
  1852. WINBASEAPI UINT WINAPI GetTempFileNameW(LPCWSTR lpPathName,LPCWSTR lpPrefixString,UINT uUnique,LPWSTR lpTempFileName);
  1853. WINBASEAPI UINT WINAPI GetWindowsDirectoryA(LPSTR lpBuffer,UINT uSize);
  1854. WINBASEAPI UINT WINAPI GetWindowsDirectoryW(LPWSTR lpBuffer,UINT uSize);
  1855. WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryA(LPSTR lpBuffer,UINT uSize);
  1856. WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryW(LPWSTR lpBuffer,UINT uSize);
  1857. #ifndef RC_INVOKED
  1858. #ifdef UNICODE
  1859. #define GetSystemWow64Directory GetSystemWow64DirectoryW
  1860. #else
  1861. #define GetSystemWow64Directory GetSystemWow64DirectoryA
  1862. #endif
  1863. WINBASEAPI UINT WINAPI GetSystemWow64DirectoryA(LPSTR lpBuffer,UINT uSize);
  1864. WINBASEAPI UINT WINAPI GetSystemWow64DirectoryW(LPWSTR lpBuffer,UINT uSize);
  1865. WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN Wow64FsEnableRedirection);
  1866. WINBASEAPI WINBOOL WINAPI Wow64DisableWow64FsRedirection(PVOID *OldValue);
  1867. WINBASEAPI WINBOOL WINAPI Wow64RevertWow64FsRedirection(PVOID OlValue);
  1868. typedef UINT (WINAPI *PGET_SYSTEM_WOW64_DIRECTORY_A)(LPSTR lpBuffer,UINT uSize);
  1869. typedef UINT (WINAPI *PGET_SYSTEM_WOW64_DIRECTORY_W)(LPWSTR lpBuffer,UINT uSize);
  1870. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A "GetSystemWow64DirectoryA"
  1871. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W L"GetSystemWow64DirectoryA"
  1872. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T TEXT("GetSystemWow64DirectoryA")
  1873. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A "GetSystemWow64DirectoryW"
  1874. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W L"GetSystemWow64DirectoryW"
  1875. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T TEXT("GetSystemWow64DirectoryW")
  1876. #ifdef UNICODE
  1877. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A
  1878. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W
  1879. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T
  1880. #else
  1881. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A
  1882. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W
  1883. #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T
  1884. #endif
  1885. #endif
  1886. #ifdef UNICODE
  1887. #define SetCurrentDirectory SetCurrentDirectoryW
  1888. #define GetCurrentDirectory GetCurrentDirectoryW
  1889. #define SetDllDirectory SetDllDirectoryW
  1890. #define GetDllDirectory GetDllDirectoryW
  1891. #define GetDiskFreeSpace GetDiskFreeSpaceW
  1892. #define GetDiskFreeSpaceEx GetDiskFreeSpaceExW
  1893. #define CreateDirectory CreateDirectoryW
  1894. #define CreateDirectoryEx CreateDirectoryExW
  1895. #define RemoveDirectory RemoveDirectoryW
  1896. #define GetFullPathName GetFullPathNameW
  1897. #define DefineDosDevice DefineDosDeviceW
  1898. #define QueryDosDevice QueryDosDeviceW
  1899. #define CreateFile CreateFileW
  1900. #define SetFileAttributes SetFileAttributesW
  1901. #define GetFileAttributes GetFileAttributesW
  1902. #else
  1903. #define SetCurrentDirectory SetCurrentDirectoryA
  1904. #define GetCurrentDirectory GetCurrentDirectoryA
  1905. #define SetDllDirectory SetDllDirectoryA
  1906. #define GetDllDirectory GetDllDirectoryA
  1907. #define GetDiskFreeSpace GetDiskFreeSpaceA
  1908. #define GetDiskFreeSpaceEx GetDiskFreeSpaceExA
  1909. #define CreateDirectory CreateDirectoryA
  1910. #define CreateDirectoryEx CreateDirectoryExA
  1911. #define RemoveDirectory RemoveDirectoryA
  1912. #define GetFullPathName GetFullPathNameA
  1913. #define DefineDosDevice DefineDosDeviceA
  1914. #define QueryDosDevice QueryDosDeviceA
  1915. #define CreateFile CreateFileA
  1916. #define SetFileAttributes SetFileAttributesA
  1917. #define GetFileAttributes GetFileAttributesA
  1918. #endif
  1919. WINBASEAPI WINBOOL WINAPI SetCurrentDirectoryA(LPCSTR lpPathName);
  1920. WINBASEAPI WINBOOL WINAPI SetCurrentDirectoryW(LPCWSTR lpPathName);
  1921. WINBASEAPI DWORD WINAPI GetCurrentDirectoryA(DWORD nBufferLength,LPSTR lpBuffer);
  1922. WINBASEAPI DWORD WINAPI GetCurrentDirectoryW(DWORD nBufferLength,LPWSTR lpBuffer);
  1923. WINBASEAPI WINBOOL WINAPI SetDllDirectoryA(LPCSTR lpPathName);
  1924. WINBASEAPI WINBOOL WINAPI SetDllDirectoryW(LPCWSTR lpPathName);
  1925. WINBASEAPI DWORD WINAPI GetDllDirectoryA(DWORD nBufferLength,LPSTR lpBuffer);
  1926. WINBASEAPI DWORD WINAPI GetDllDirectoryW(DWORD nBufferLength,LPWSTR lpBuffer);
  1927. WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceA(LPCSTR lpRootPathName,LPDWORD lpSectorsPerCluster,LPDWORD lpBytesPerSector,LPDWORD lpNumberOfFreeClusters,LPDWORD lpTotalNumberOfClusters);
  1928. WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceW(LPCWSTR lpRootPathName,LPDWORD lpSectorsPerCluster,LPDWORD lpBytesPerSector,LPDWORD lpNumberOfFreeClusters,LPDWORD lpTotalNumberOfClusters);
  1929. WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceExA(LPCSTR lpDirectoryName,PULARGE_INTEGER lpFreeBytesAvailableToCaller,PULARGE_INTEGER lpTotalNumberOfBytes,PULARGE_INTEGER lpTotalNumberOfFreeBytes);
  1930. WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR lpDirectoryName,PULARGE_INTEGER lpFreeBytesAvailableToCaller,PULARGE_INTEGER lpTotalNumberOfBytes,PULARGE_INTEGER lpTotalNumberOfFreeBytes);
  1931. WINBASEAPI WINBOOL WINAPI CreateDirectoryA(LPCSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  1932. WINBASEAPI WINBOOL WINAPI CreateDirectoryW(LPCWSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  1933. WINBASEAPI WINBOOL WINAPI CreateDirectoryExA(LPCSTR lpTemplateDirectory,LPCSTR lpNewDirectory,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  1934. WINBASEAPI WINBOOL WINAPI CreateDirectoryExW(LPCWSTR lpTemplateDirectory,LPCWSTR lpNewDirectory,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  1935. WINBASEAPI WINBOOL WINAPI RemoveDirectoryA(LPCSTR lpPathName);
  1936. WINBASEAPI WINBOOL WINAPI RemoveDirectoryW(LPCWSTR lpPathName);
  1937. WINBASEAPI DWORD WINAPI GetFullPathNameA(LPCSTR lpFileName,DWORD nBufferLength,LPSTR lpBuffer,LPSTR *lpFilePart);
  1938. WINBASEAPI DWORD WINAPI GetFullPathNameW(LPCWSTR lpFileName,DWORD nBufferLength,LPWSTR lpBuffer,LPWSTR *lpFilePart);
  1939. #define DDD_RAW_TARGET_PATH 0x1
  1940. #define DDD_REMOVE_DEFINITION 0x2
  1941. #define DDD_EXACT_MATCH_ON_REMOVE 0x4
  1942. #define DDD_NO_BROADCAST_SYSTEM 0x8
  1943. #define DDD_LUID_BROADCAST_DRIVE 0x10
  1944. WINBASEAPI WINBOOL WINAPI DefineDosDeviceA(DWORD dwFlags,LPCSTR lpDeviceName,LPCSTR lpTargetPath);
  1945. WINBASEAPI WINBOOL WINAPI DefineDosDeviceW(DWORD dwFlags,LPCWSTR lpDeviceName,LPCWSTR lpTargetPath);
  1946. WINBASEAPI DWORD WINAPI QueryDosDeviceA(LPCSTR lpDeviceName,LPSTR lpTargetPath,DWORD ucchMax);
  1947. WINBASEAPI DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName,LPWSTR lpTargetPath,DWORD ucchMax);
  1948. #define EXPAND_LOCAL_DRIVES
  1949. WINBASEAPI HANDLE WINAPI CreateFileA(LPCSTR lpFileName,DWORD dwDesiredAccess,DWORD dwShareMode,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD dwCreationDisposition,DWORD dwFlagsAndAttributes,HANDLE hTemplateFile);
  1950. WINBASEAPI HANDLE WINAPI CreateFileW(LPCWSTR lpFileName,DWORD dwDesiredAccess,DWORD dwShareMode,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD dwCreationDisposition,DWORD dwFlagsAndAttributes,HANDLE hTemplateFile);
  1951. WINBASEAPI HANDLE WINAPI ReOpenFile(HANDLE hOriginalFile,DWORD dwDesiredAccess,DWORD dwShareMode,DWORD dwFlagsAndAttributes);
  1952. WINBASEAPI WINBOOL WINAPI SetFileAttributesA(LPCSTR lpFileName,DWORD dwFileAttributes);
  1953. WINBASEAPI WINBOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName,DWORD dwFileAttributes);
  1954. WINBASEAPI DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName);
  1955. WINBASEAPI DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName);
  1956. typedef enum _GET_FILEEX_INFO_LEVELS {
  1957. GetFileExInfoStandard,GetFileExMaxInfoLevel
  1958. } GET_FILEEX_INFO_LEVELS;
  1959. #ifdef UNICODE
  1960. #define GetFileAttributesEx GetFileAttributesExW
  1961. #define GetCompressedFileSize GetCompressedFileSizeW
  1962. #define DeleteFile DeleteFileW
  1963. #define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W
  1964. #else
  1965. #define GetFileAttributesEx GetFileAttributesExA
  1966. #define GetCompressedFileSize GetCompressedFileSizeA
  1967. #define DeleteFile DeleteFileA
  1968. #define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A
  1969. #endif
  1970. WINBASEAPI WINBOOL WINAPI GetFileAttributesExA(LPCSTR lpFileName,GET_FILEEX_INFO_LEVELS fInfoLevelId,LPVOID lpFileInformation);
  1971. WINBASEAPI WINBOOL WINAPI GetFileAttributesExW(LPCWSTR lpFileName,GET_FILEEX_INFO_LEVELS fInfoLevelId,LPVOID lpFileInformation);
  1972. WINBASEAPI DWORD WINAPI GetCompressedFileSizeA(LPCSTR lpFileName,LPDWORD lpFileSizeHigh);
  1973. WINBASEAPI DWORD WINAPI GetCompressedFileSizeW(LPCWSTR lpFileName,LPDWORD lpFileSizeHigh);
  1974. WINBASEAPI WINBOOL WINAPI DeleteFileA(LPCSTR lpFileName);
  1975. WINBASEAPI WINBOOL WINAPI DeleteFileW(LPCWSTR lpFileName);
  1976. WINBASEAPI WINBOOL WINAPI CheckNameLegalDOS8Dot3A(LPCSTR lpName,LPSTR lpOemName,DWORD OemNameSize,PBOOL pbNameContainsSpaces,PBOOL pbNameLegal);
  1977. WINBASEAPI WINBOOL WINAPI CheckNameLegalDOS8Dot3W(LPCWSTR lpName,LPSTR lpOemName,DWORD OemNameSize,PBOOL pbNameContainsSpaces,PBOOL pbNameLegal);
  1978. typedef enum _FINDEX_INFO_LEVELS {
  1979. FindExInfoStandard,FindExInfoMaxInfoLevel
  1980. } FINDEX_INFO_LEVELS;
  1981. typedef enum _FINDEX_SEARCH_OPS {
  1982. FindExSearchNameMatch,FindExSearchLimitToDirectories,FindExSearchLimitToDevices,FindExSearchMaxSearchOp
  1983. } FINDEX_SEARCH_OPS;
  1984. #define FIND_FIRST_EX_CASE_SENSITIVE 0x1
  1985. #ifdef UNICODE
  1986. #define FindFirstFileEx FindFirstFileExW
  1987. #define FindFirstFile FindFirstFileW
  1988. #define FindNextFile FindNextFileW
  1989. #define SearchPath SearchPathW
  1990. #define CopyFile CopyFileW
  1991. #define CopyFileEx CopyFileExW
  1992. #define MoveFile MoveFileW
  1993. #define MoveFileEx MoveFileExW
  1994. #define MoveFileWithProgress MoveFileWithProgressW
  1995. #define ReplaceFile ReplaceFileW
  1996. #define CreateHardLink CreateHardLinkW
  1997. #define CreateNamedPipe CreateNamedPipeW
  1998. #define GetNamedPipeHandleState GetNamedPipeHandleStateW
  1999. #define CallNamedPipe CallNamedPipeW
  2000. #define WaitNamedPipe WaitNamedPipeW
  2001. #define SetVolumeLabel SetVolumeLabelW
  2002. #define GetVolumeInformation GetVolumeInformationW
  2003. #define ClearEventLog ClearEventLogW
  2004. #define BackupEventLog BackupEventLogW
  2005. #define OpenEventLog OpenEventLogW
  2006. #define RegisterEventSource RegisterEventSourceW
  2007. #define OpenBackupEventLog OpenBackupEventLogW
  2008. #define ReadEventLog ReadEventLogW
  2009. #define ReportEvent ReportEventW
  2010. #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW
  2011. #define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmW
  2012. #define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAndAuditAlarmW
  2013. #define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResultListAndAuditAlarmByHandleW
  2014. #define ObjectOpenAuditAlarm ObjectOpenAuditAlarmW
  2015. #define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmW
  2016. #define ObjectCloseAuditAlarm ObjectCloseAuditAlarmW
  2017. #define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmW
  2018. #define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmW
  2019. #define SetFileSecurity SetFileSecurityW
  2020. #define GetFileSecurity GetFileSecurityW
  2021. #define FindFirstChangeNotification FindFirstChangeNotificationW
  2022. #define IsBadStringPtr IsBadStringPtrW
  2023. #define LookupAccountSid LookupAccountSidW
  2024. #define LookupAccountName LookupAccountNameW
  2025. #define LookupPrivilegeValue LookupPrivilegeValueW
  2026. #define LookupPrivilegeName LookupPrivilegeNameW
  2027. #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW
  2028. #define BuildCommDCB BuildCommDCBW
  2029. #define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsW
  2030. #define CommConfigDialog CommConfigDialogW
  2031. #define GetDefaultCommConfig GetDefaultCommConfigW
  2032. #define SetDefaultCommConfig SetDefaultCommConfigW
  2033. #define GetComputerName GetComputerNameW
  2034. #define SetComputerName SetComputerNameW
  2035. #define GetComputerNameEx GetComputerNameExW
  2036. #define SetComputerNameEx SetComputerNameExW
  2037. #define DnsHostnameToComputerName DnsHostnameToComputerNameW
  2038. #define GetUserName GetUserNameW
  2039. #else
  2040. #define FindFirstFileEx FindFirstFileExA
  2041. #define FindFirstFile FindFirstFileA
  2042. #define FindNextFile FindNextFileA
  2043. #define SearchPath SearchPathA
  2044. #define CopyFile CopyFileA
  2045. #define CopyFileEx CopyFileExA
  2046. #define MoveFile MoveFileA
  2047. #define MoveFileEx MoveFileExA
  2048. #define MoveFileWithProgress MoveFileWithProgressA
  2049. #define ReplaceFile ReplaceFileA
  2050. #define CreateHardLink CreateHardLinkA
  2051. #define CreateNamedPipe CreateNamedPipeA
  2052. #define GetNamedPipeHandleState GetNamedPipeHandleStateA
  2053. #define CallNamedPipe CallNamedPipeA
  2054. #define WaitNamedPipe WaitNamedPipeA
  2055. #define SetVolumeLabel SetVolumeLabelA
  2056. #define GetVolumeInformation GetVolumeInformationA
  2057. #define ClearEventLog ClearEventLogA
  2058. #define BackupEventLog BackupEventLogA
  2059. #define OpenEventLog OpenEventLogA
  2060. #define RegisterEventSource RegisterEventSourceA
  2061. #define OpenBackupEventLog OpenBackupEventLogA
  2062. #define ReadEventLog ReadEventLogA
  2063. #define ReportEvent ReportEventA
  2064. #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA
  2065. #define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmA
  2066. #define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAndAuditAlarmA
  2067. #define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResultListAndAuditAlarmByHandleA
  2068. #define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA
  2069. #define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA
  2070. #define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA
  2071. #define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmA
  2072. #define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA
  2073. #define SetFileSecurity SetFileSecurityA
  2074. #define GetFileSecurity GetFileSecurityA
  2075. #define FindFirstChangeNotification FindFirstChangeNotificationA
  2076. #define IsBadStringPtr IsBadStringPtrA
  2077. #define LookupAccountSid LookupAccountSidA
  2078. #define LookupAccountName LookupAccountNameA
  2079. #define LookupPrivilegeValue LookupPrivilegeValueA
  2080. #define LookupPrivilegeName LookupPrivilegeNameA
  2081. #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA
  2082. #define BuildCommDCB BuildCommDCBA
  2083. #define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsA
  2084. #define CommConfigDialog CommConfigDialogA
  2085. #define GetDefaultCommConfig GetDefaultCommConfigA
  2086. #define SetDefaultCommConfig SetDefaultCommConfigA
  2087. #define GetComputerName GetComputerNameA
  2088. #define SetComputerName SetComputerNameA
  2089. #define GetComputerNameEx GetComputerNameExA
  2090. #define SetComputerNameEx SetComputerNameExA
  2091. #define DnsHostnameToComputerName DnsHostnameToComputerNameA
  2092. #define GetUserName GetUserNameA
  2093. #endif
  2094. WINBASEAPI HANDLE WINAPI FindFirstFileExA(LPCSTR lpFileName,FINDEX_INFO_LEVELS fInfoLevelId,LPVOID lpFindFileData,FINDEX_SEARCH_OPS fSearchOp,LPVOID lpSearchFilter,DWORD dwAdditionalFlags);
  2095. WINBASEAPI HANDLE WINAPI FindFirstFileExW(LPCWSTR lpFileName,FINDEX_INFO_LEVELS fInfoLevelId,LPVOID lpFindFileData,FINDEX_SEARCH_OPS fSearchOp,LPVOID lpSearchFilter,DWORD dwAdditionalFlags);
  2096. WINBASEAPI HANDLE WINAPI FindFirstFileA(LPCSTR lpFileName,LPWIN32_FIND_DATAA lpFindFileData);
  2097. WINBASEAPI HANDLE WINAPI FindFirstFileW(LPCWSTR lpFileName,LPWIN32_FIND_DATAW lpFindFileData);
  2098. WINBASEAPI WINBOOL WINAPI FindNextFileA(HANDLE hFindFile,LPWIN32_FIND_DATAA lpFindFileData);
  2099. WINBASEAPI WINBOOL WINAPI FindNextFileW(HANDLE hFindFile,LPWIN32_FIND_DATAW lpFindFileData);
  2100. WINBASEAPI DWORD WINAPI SearchPathA(LPCSTR lpPath,LPCSTR lpFileName,LPCSTR lpExtension,DWORD nBufferLength,LPSTR lpBuffer,LPSTR *lpFilePart);
  2101. WINBASEAPI DWORD WINAPI SearchPathW(LPCWSTR lpPath,LPCWSTR lpFileName,LPCWSTR lpExtension,DWORD nBufferLength,LPWSTR lpBuffer,LPWSTR *lpFilePart);
  2102. WINBASEAPI WINBOOL WINAPI CopyFileA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,WINBOOL bFailIfExists);
  2103. WINBASEAPI WINBOOL WINAPI CopyFileW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,WINBOOL bFailIfExists);
  2104. typedef DWORD (WINAPI *LPPROGRESS_ROUTINE)(LARGE_INTEGER TotalFileSize,LARGE_INTEGER TotalBytesTransferred,LARGE_INTEGER StreamSize,LARGE_INTEGER StreamBytesTransferred,DWORD dwStreamNumber,DWORD dwCallbackReason,HANDLE hSourceFile,HANDLE hDestinationFile,LPVOID lpData);
  2105. WINBASEAPI WINBOOL WINAPI CopyFileExA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,LPBOOL pbCancel,DWORD dwCopyFlags);
  2106. WINBASEAPI WINBOOL WINAPI CopyFileExW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,LPBOOL pbCancel,DWORD dwCopyFlags);
  2107. WINBASEAPI WINBOOL WINAPI MoveFileA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName);
  2108. WINBASEAPI WINBOOL WINAPI MoveFileW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName);
  2109. WINBASEAPI WINBOOL WINAPI MoveFileExA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,DWORD dwFlags);
  2110. WINBASEAPI WINBOOL WINAPI MoveFileExW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,DWORD dwFlags);
  2111. WINBASEAPI WINBOOL WINAPI MoveFileWithProgressA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,DWORD dwFlags);
  2112. WINBASEAPI WINBOOL WINAPI MoveFileWithProgressW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,DWORD dwFlags);
  2113. #define MOVEFILE_REPLACE_EXISTING 0x1
  2114. #define MOVEFILE_COPY_ALLOWED 0x2
  2115. #define MOVEFILE_DELAY_UNTIL_REBOOT 0x4
  2116. #define MOVEFILE_WRITE_THROUGH 0x8
  2117. #define MOVEFILE_CREATE_HARDLINK 0x10
  2118. #define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x20
  2119. WINBASEAPI WINBOOL WINAPI ReplaceFileA(LPCSTR lpReplacedFileName,LPCSTR lpReplacementFileName,LPCSTR lpBackupFileName,DWORD dwReplaceFlags,LPVOID lpExclude,LPVOID lpReserved);
  2120. WINBASEAPI WINBOOL WINAPI ReplaceFileW(LPCWSTR lpReplacedFileName,LPCWSTR lpReplacementFileName,LPCWSTR lpBackupFileName,DWORD dwReplaceFlags,LPVOID lpExclude,LPVOID lpReserved);
  2121. WINBASEAPI WINBOOL WINAPI CreateHardLinkA(LPCSTR lpFileName,LPCSTR lpExistingFileName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  2122. WINBASEAPI WINBOOL WINAPI CreateHardLinkW(LPCWSTR lpFileName,LPCWSTR lpExistingFileName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  2123. typedef enum _STREAM_INFO_LEVELS {
  2124. FindStreamInfoStandard,FindStreamInfoMaxInfoLevel
  2125. } STREAM_INFO_LEVELS;
  2126. typedef struct _WIN32_FIND_STREAM_DATA {
  2127. LARGE_INTEGER StreamSize;
  2128. WCHAR cStreamName[MAX_PATH + 36];
  2129. } WIN32_FIND_STREAM_DATA,*PWIN32_FIND_STREAM_DATA;
  2130. HANDLE WINAPI FindFirstStreamW(LPCWSTR lpFileName,STREAM_INFO_LEVELS InfoLevel,LPVOID lpFindStreamData,DWORD dwFlags);
  2131. WINBOOL WINAPI FindNextStreamW(HANDLE hFindStream,LPVOID lpFindStreamData);
  2132. WINBASEAPI HANDLE WINAPI CreateNamedPipeA(LPCSTR lpName,DWORD dwOpenMode,DWORD dwPipeMode,DWORD nMaxInstances,DWORD nOutBufferSize,DWORD nInBufferSize,DWORD nDefaultTimeOut,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  2133. WINBASEAPI HANDLE WINAPI CreateNamedPipeW(LPCWSTR lpName,DWORD dwOpenMode,DWORD dwPipeMode,DWORD nMaxInstances,DWORD nOutBufferSize,DWORD nInBufferSize,DWORD nDefaultTimeOut,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  2134. WINBASEAPI WINBOOL WINAPI GetNamedPipeHandleStateA(HANDLE hNamedPipe,LPDWORD lpState,LPDWORD lpCurInstances,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout,LPSTR lpUserName,DWORD nMaxUserNameSize);
  2135. WINBASEAPI WINBOOL WINAPI GetNamedPipeHandleStateW(HANDLE hNamedPipe,LPDWORD lpState,LPDWORD lpCurInstances,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout,LPWSTR lpUserName,DWORD nMaxUserNameSize);
  2136. WINBASEAPI WINBOOL WINAPI CallNamedPipeA(LPCSTR lpNamedPipeName,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,DWORD nTimeOut);
  2137. WINBASEAPI WINBOOL WINAPI CallNamedPipeW(LPCWSTR lpNamedPipeName,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,DWORD nTimeOut);
  2138. WINBASEAPI WINBOOL WINAPI WaitNamedPipeA(LPCSTR lpNamedPipeName,DWORD nTimeOut);
  2139. WINBASEAPI WINBOOL WINAPI WaitNamedPipeW(LPCWSTR lpNamedPipeName,DWORD nTimeOut);
  2140. WINBASEAPI WINBOOL WINAPI SetVolumeLabelA(LPCSTR lpRootPathName,LPCSTR lpVolumeName);
  2141. WINBASEAPI WINBOOL WINAPI SetVolumeLabelW(LPCWSTR lpRootPathName,LPCWSTR lpVolumeName);
  2142. WINBASEAPI VOID WINAPI SetFileApisToOEM(VOID);
  2143. WINBASEAPI VOID WINAPI SetFileApisToANSI(VOID);
  2144. WINBASEAPI WINBOOL WINAPI AreFileApisANSI(VOID);
  2145. WINBASEAPI WINBOOL WINAPI GetVolumeInformationA(LPCSTR lpRootPathName,LPSTR lpVolumeNameBuffer,DWORD nVolumeNameSize,LPDWORD lpVolumeSerialNumber,LPDWORD lpMaximumComponentLength,LPDWORD lpFileSystemFlags,LPSTR lpFileSystemNameBuffer,DWORD nFileSystemNameSize);
  2146. WINBASEAPI WINBOOL WINAPI GetVolumeInformationW(LPCWSTR lpRootPathName,LPWSTR lpVolumeNameBuffer,DWORD nVolumeNameSize,LPDWORD lpVolumeSerialNumber,LPDWORD lpMaximumComponentLength,LPDWORD lpFileSystemFlags,LPWSTR lpFileSystemNameBuffer,DWORD nFileSystemNameSize);
  2147. WINBASEAPI WINBOOL WINAPI CancelIo(HANDLE hFile);
  2148. WINADVAPI WINBOOL WINAPI ClearEventLogA(HANDLE hEventLog,LPCSTR lpBackupFileName);
  2149. WINADVAPI WINBOOL WINAPI ClearEventLogW(HANDLE hEventLog,LPCWSTR lpBackupFileName);
  2150. WINADVAPI WINBOOL WINAPI BackupEventLogA(HANDLE hEventLog,LPCSTR lpBackupFileName);
  2151. WINADVAPI WINBOOL WINAPI BackupEventLogW(HANDLE hEventLog,LPCWSTR lpBackupFileName);
  2152. WINADVAPI WINBOOL WINAPI CloseEventLog(HANDLE hEventLog);
  2153. WINADVAPI WINBOOL WINAPI DeregisterEventSource(HANDLE hEventLog);
  2154. WINADVAPI WINBOOL WINAPI NotifyChangeEventLog(HANDLE hEventLog,HANDLE hEvent);
  2155. WINADVAPI WINBOOL WINAPI GetNumberOfEventLogRecords(HANDLE hEventLog,PDWORD NumberOfRecords);
  2156. WINADVAPI WINBOOL WINAPI GetOldestEventLogRecord(HANDLE hEventLog,PDWORD OldestRecord);
  2157. WINADVAPI HANDLE WINAPI OpenEventLogA(LPCSTR lpUNCServerName,LPCSTR lpSourceName);
  2158. WINADVAPI HANDLE WINAPI OpenEventLogW(LPCWSTR lpUNCServerName,LPCWSTR lpSourceName);
  2159. WINADVAPI HANDLE WINAPI RegisterEventSourceA(LPCSTR lpUNCServerName,LPCSTR lpSourceName);
  2160. WINADVAPI HANDLE WINAPI RegisterEventSourceW(LPCWSTR lpUNCServerName,LPCWSTR lpSourceName);
  2161. WINADVAPI HANDLE WINAPI OpenBackupEventLogA(LPCSTR lpUNCServerName,LPCSTR lpFileName);
  2162. WINADVAPI HANDLE WINAPI OpenBackupEventLogW(LPCWSTR lpUNCServerName,LPCWSTR lpFileName);
  2163. WINADVAPI WINBOOL WINAPI ReadEventLogA(HANDLE hEventLog,DWORD dwReadFlags,DWORD dwRecordOffset,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,DWORD *pnBytesRead,DWORD *pnMinNumberOfBytesNeeded);
  2164. WINADVAPI WINBOOL WINAPI ReadEventLogW(HANDLE hEventLog,DWORD dwReadFlags,DWORD dwRecordOffset,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,DWORD *pnBytesRead,DWORD *pnMinNumberOfBytesNeeded);
  2165. WINADVAPI WINBOOL WINAPI ReportEventA(HANDLE hEventLog,WORD wType,WORD wCategory,DWORD dwEventID,PSID lpUserSid,WORD wNumStrings,DWORD dwDataSize,LPCSTR *lpStrings,LPVOID lpRawData);
  2166. WINADVAPI WINBOOL WINAPI ReportEventW(HANDLE hEventLog,WORD wType,WORD wCategory,DWORD dwEventID,PSID lpUserSid,WORD wNumStrings,DWORD dwDataSize,LPCWSTR *lpStrings,LPVOID lpRawData);
  2167. #define EVENTLOG_FULL_INFO 0
  2168. typedef struct _EVENTLOG_FULL_INFORMATION {
  2169. DWORD dwFull;
  2170. } EVENTLOG_FULL_INFORMATION,*LPEVENTLOG_FULL_INFORMATION;
  2171. WINADVAPI WINBOOL WINAPI GetEventLogInformation(HANDLE hEventLog,DWORD dwInfoLevel,LPVOID lpBuffer,DWORD cbBufSize,LPDWORD pcbBytesNeeded);
  2172. WINADVAPI WINBOOL WINAPI DuplicateToken(HANDLE ExistingTokenHandle,SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,PHANDLE DuplicateTokenHandle);
  2173. WINADVAPI WINBOOL WINAPI GetKernelObjectSecurity(HANDLE Handle,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded);
  2174. WINADVAPI WINBOOL WINAPI ImpersonateNamedPipeClient(HANDLE hNamedPipe);
  2175. WINADVAPI WINBOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel);
  2176. WINADVAPI WINBOOL WINAPI RevertToSelf(VOID);
  2177. WINADVAPI WINBOOL WINAPI SetThreadToken (PHANDLE Thread,HANDLE Token);
  2178. WINADVAPI WINBOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccess,LPBOOL AccessStatus);
  2179. WINADVAPI WINBOOL WINAPI AccessCheckByType(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID PrincipalSelfSid,HANDLE ClientToken,DWORD DesiredAccess,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccess,LPBOOL AccessStatus);
  2180. WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultList(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID PrincipalSelfSid,HANDLE ClientToken,DWORD DesiredAccess,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccessList,LPDWORD AccessStatusList);
  2181. WINADVAPI WINBOOL WINAPI OpenProcessToken(HANDLE ProcessHandle,DWORD DesiredAccess,PHANDLE TokenHandle);
  2182. WINADVAPI WINBOOL WINAPI OpenThreadToken(HANDLE ThreadHandle,DWORD DesiredAccess,WINBOOL OpenAsSelf,PHANDLE TokenHandle);
  2183. WINADVAPI WINBOOL WINAPI GetTokenInformation(HANDLE TokenHandle,TOKEN_INFORMATION_CLASS TokenInformationClass,LPVOID TokenInformation,DWORD TokenInformationLength,PDWORD ReturnLength);
  2184. WINADVAPI WINBOOL WINAPI SetTokenInformation(HANDLE TokenHandle,TOKEN_INFORMATION_CLASS TokenInformationClass,LPVOID TokenInformation,DWORD TokenInformationLength);
  2185. WINADVAPI WINBOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle,WINBOOL DisableAllPrivileges,PTOKEN_PRIVILEGES NewState,DWORD BufferLength,PTOKEN_PRIVILEGES PreviousState,PDWORD ReturnLength);
  2186. WINADVAPI WINBOOL WINAPI AdjustTokenGroups(HANDLE TokenHandle,WINBOOL ResetToDefault,PTOKEN_GROUPS NewState,DWORD BufferLength,PTOKEN_GROUPS PreviousState,PDWORD ReturnLength);
  2187. WINADVAPI WINBOOL WINAPI PrivilegeCheck(HANDLE ClientToken,PPRIVILEGE_SET RequiredPrivileges,LPBOOL pfResult);
  2188. WINADVAPI WINBOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPSTR ObjectTypeName,LPSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose);
  2189. WINADVAPI WINBOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPWSTR ObjectTypeName,LPWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose);
  2190. WINADVAPI WINBOOL WINAPI AccessCheckByTypeAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose);
  2191. WINADVAPI WINBOOL WINAPI AccessCheckByTypeAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose);
  2192. WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose);
  2193. WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose);
  2194. WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmByHandleA(LPCSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose);
  2195. WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmByHandleW(LPCWSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose);
  2196. WINADVAPI WINBOOL WINAPI ObjectOpenAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPSTR ObjectTypeName,LPSTR ObjectName,PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,DWORD GrantedAccess,PPRIVILEGE_SET Privileges,WINBOOL ObjectCreation,WINBOOL AccessGranted,LPBOOL GenerateOnClose);
  2197. WINADVAPI WINBOOL WINAPI ObjectOpenAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPWSTR ObjectTypeName,LPWSTR ObjectName,PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,DWORD GrantedAccess,PPRIVILEGE_SET Privileges,WINBOOL ObjectCreation,WINBOOL AccessGranted,LPBOOL GenerateOnClose);
  2198. WINADVAPI WINBOOL WINAPI ObjectPrivilegeAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,DWORD DesiredAccess,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted);
  2199. WINADVAPI WINBOOL WINAPI ObjectPrivilegeAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,DWORD DesiredAccess,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted);
  2200. WINADVAPI WINBOOL WINAPI ObjectCloseAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose);
  2201. WINADVAPI WINBOOL WINAPI ObjectCloseAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose);
  2202. WINADVAPI WINBOOL WINAPI ObjectDeleteAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose);
  2203. WINADVAPI WINBOOL WINAPI ObjectDeleteAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose);
  2204. WINADVAPI WINBOOL WINAPI PrivilegedServiceAuditAlarmA(LPCSTR SubsystemName,LPCSTR ServiceName,HANDLE ClientToken,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted);
  2205. WINADVAPI WINBOOL WINAPI PrivilegedServiceAuditAlarmW(LPCWSTR SubsystemName,LPCWSTR ServiceName,HANDLE ClientToken,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted);
  2206. WINADVAPI WINBOOL WINAPI IsWellKnownSid(PSID pSid,WELL_KNOWN_SID_TYPE WellKnownSidType);
  2207. WINADVAPI WINBOOL WINAPI CreateWellKnownSid(WELL_KNOWN_SID_TYPE WellKnownSidType,PSID DomainSid,PSID pSid,DWORD *cbSid);
  2208. WINADVAPI WINBOOL WINAPI EqualDomainSid(PSID pSid1,PSID pSid2,WINBOOL *pfEqual);
  2209. WINADVAPI WINBOOL WINAPI GetWindowsAccountDomainSid(PSID pSid,PSID pDomainSid,DWORD *cbDomainSid);
  2210. WINADVAPI WINBOOL WINAPI IsValidSid(PSID pSid);
  2211. WINADVAPI WINBOOL WINAPI EqualSid(PSID pSid1,PSID pSid2);
  2212. WINADVAPI WINBOOL WINAPI EqualPrefixSid(PSID pSid1,PSID pSid2);
  2213. WINADVAPI DWORD WINAPI GetSidLengthRequired (UCHAR nSubAuthorityCount);
  2214. WINADVAPI WINBOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,BYTE nSubAuthorityCount,DWORD nSubAuthority0,DWORD nSubAuthority1,DWORD nSubAuthority2,DWORD nSubAuthority3,DWORD nSubAuthority4,DWORD nSubAuthority5,DWORD nSubAuthority6,DWORD nSubAuthority7,PSID *pSid);
  2215. WINADVAPI PVOID WINAPI FreeSid(PSID pSid);
  2216. WINADVAPI WINBOOL WINAPI InitializeSid(PSID Sid,PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,BYTE nSubAuthorityCount);
  2217. WINADVAPI PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID pSid);
  2218. WINADVAPI PDWORD WINAPI GetSidSubAuthority(PSID pSid,DWORD nSubAuthority);
  2219. WINADVAPI PUCHAR WINAPI GetSidSubAuthorityCount(PSID pSid);
  2220. WINADVAPI DWORD WINAPI GetLengthSid(PSID pSid);
  2221. WINADVAPI WINBOOL WINAPI CopySid(DWORD nDestinationSidLength,PSID pDestinationSid,PSID pSourceSid);
  2222. WINADVAPI WINBOOL WINAPI AreAllAccessesGranted(DWORD GrantedAccess,DWORD DesiredAccess);
  2223. WINADVAPI WINBOOL WINAPI AreAnyAccessesGranted(DWORD GrantedAccess,DWORD DesiredAccess);
  2224. WINADVAPI VOID WINAPI MapGenericMask(PDWORD AccessMask,PGENERIC_MAPPING GenericMapping);
  2225. WINADVAPI WINBOOL WINAPI IsValidAcl(PACL pAcl);
  2226. WINADVAPI WINBOOL WINAPI InitializeAcl(PACL pAcl,DWORD nAclLength,DWORD dwAclRevision);
  2227. WINADVAPI WINBOOL WINAPI GetAclInformation(PACL pAcl,LPVOID pAclInformation,DWORD nAclInformationLength,ACL_INFORMATION_CLASS dwAclInformationClass);
  2228. WINADVAPI WINBOOL WINAPI SetAclInformation(PACL pAcl,LPVOID pAclInformation,DWORD nAclInformationLength,ACL_INFORMATION_CLASS dwAclInformationClass);
  2229. WINADVAPI WINBOOL WINAPI AddAce(PACL pAcl,DWORD dwAceRevision,DWORD dwStartingAceIndex,LPVOID pAceList,DWORD nAceListLength);
  2230. WINADVAPI WINBOOL WINAPI DeleteAce(PACL pAcl,DWORD dwAceIndex);
  2231. WINADVAPI WINBOOL WINAPI GetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce);
  2232. WINADVAPI WINBOOL WINAPI AddAccessAllowedAce(PACL pAcl,DWORD dwAceRevision,DWORD AccessMask,PSID pSid);
  2233. WINADVAPI WINBOOL WINAPI AddAccessAllowedAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,PSID pSid);
  2234. WINADVAPI WINBOOL WINAPI AddAccessDeniedAce(PACL pAcl,DWORD dwAceRevision,DWORD AccessMask,PSID pSid);
  2235. WINADVAPI WINBOOL WINAPI AddAccessDeniedAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,PSID pSid);
  2236. WINADVAPI WINBOOL WINAPI AddAuditAccessAce(PACL pAcl,DWORD dwAceRevision,DWORD dwAccessMask,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure);
  2237. WINADVAPI WINBOOL WINAPI AddAuditAccessAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD dwAccessMask,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure);
  2238. WINADVAPI WINBOOL WINAPI AddAccessAllowedObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid);
  2239. WINADVAPI WINBOOL WINAPI AddAccessDeniedObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid);
  2240. WINADVAPI WINBOOL WINAPI AddAuditAccessObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure);
  2241. WINADVAPI WINBOOL WINAPI FindFirstFreeAce(PACL pAcl,LPVOID *pAce);
  2242. WINADVAPI WINBOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD dwRevision);
  2243. WINADVAPI WINBOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor);
  2244. WINADVAPI DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR pSecurityDescriptor);
  2245. WINADVAPI WINBOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSECURITY_DESCRIPTOR_CONTROL pControl,LPDWORD lpdwRevision);
  2246. WINADVAPI WINBOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor,SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet);
  2247. WINADVAPI WINBOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,WINBOOL bDaclPresent,PACL pDacl,WINBOOL bDaclDefaulted);
  2248. WINADVAPI WINBOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,LPBOOL lpbDaclPresent,PACL *pDacl,LPBOOL lpbDaclDefaulted);
  2249. WINADVAPI WINBOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,WINBOOL bSaclPresent,PACL pSacl,WINBOOL bSaclDefaulted);
  2250. WINADVAPI WINBOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,LPBOOL lpbSaclPresent,PACL *pSacl,LPBOOL lpbSaclDefaulted);
  2251. WINADVAPI WINBOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID pOwner,WINBOOL bOwnerDefaulted);
  2252. WINADVAPI WINBOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID *pOwner,LPBOOL lpbOwnerDefaulted);
  2253. WINADVAPI WINBOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID pGroup,WINBOOL bGroupDefaulted);
  2254. WINADVAPI WINBOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID *pGroup,LPBOOL lpbGroupDefaulted);
  2255. WINADVAPI DWORD WINAPI SetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,PUCHAR RMControl);
  2256. WINADVAPI DWORD WINAPI GetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,PUCHAR RMControl);
  2257. WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,WINBOOL IsDirectoryObject,HANDLE Token,PGENERIC_MAPPING GenericMapping);
  2258. WINADVAPI WINBOOL WINAPI ConvertToAutoInheritPrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CurrentSecurityDescriptor,PSECURITY_DESCRIPTOR *NewSecurityDescriptor,GUID *ObjectType,BOOLEAN IsDirectoryObject,PGENERIC_MAPPING GenericMapping);
  2259. WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurityEx(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,GUID *ObjectType,WINBOOL IsContainerObject,ULONG AutoInheritFlags,HANDLE Token,PGENERIC_MAPPING GenericMapping);
  2260. WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurityWithMultipleInheritance(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,GUID **ObjectTypes,ULONG GuidCount,WINBOOL IsContainerObject,ULONG AutoInheritFlags,HANDLE Token,PGENERIC_MAPPING GenericMapping);
  2261. WINADVAPI WINBOOL WINAPI SetPrivateObjectSecurity (SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ModificationDescriptor,PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,PGENERIC_MAPPING GenericMapping,HANDLE Token);
  2262. WINADVAPI WINBOOL WINAPI SetPrivateObjectSecurityEx (SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ModificationDescriptor,PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,ULONG AutoInheritFlags,PGENERIC_MAPPING GenericMapping,HANDLE Token);
  2263. WINADVAPI WINBOOL WINAPI GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR ObjectDescriptor,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ResultantDescriptor,DWORD DescriptorLength,PDWORD ReturnLength);
  2264. WINADVAPI WINBOOL WINAPI DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR *ObjectDescriptor);
  2265. WINADVAPI WINBOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,LPDWORD lpdwBufferLength);
  2266. WINADVAPI WINBOOL WINAPI MakeAbsoluteSD(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,LPDWORD lpdwAbsoluteSecurityDescriptorSize,PACL pDacl,LPDWORD lpdwDaclSize,PACL pSacl,LPDWORD lpdwSaclSize,PSID pOwner,LPDWORD lpdwOwnerSize,PSID pPrimaryGroup,LPDWORD lpdwPrimaryGroupSize);
  2267. WINADVAPI WINBOOL WINAPI MakeAbsoluteSD2(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,LPDWORD lpdwBufferSize);
  2268. WINADVAPI WINBOOL WINAPI SetFileSecurityA(LPCSTR lpFileName,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor);
  2269. WINADVAPI WINBOOL WINAPI SetFileSecurityW(LPCWSTR lpFileName,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor);
  2270. WINADVAPI WINBOOL WINAPI GetFileSecurityA(LPCSTR lpFileName,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded);
  2271. WINADVAPI WINBOOL WINAPI GetFileSecurityW(LPCWSTR lpFileName,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded);
  2272. WINADVAPI WINBOOL WINAPI SetKernelObjectSecurity(HANDLE Handle,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR SecurityDescriptor);
  2273. WINBASEAPI HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR lpPathName,WINBOOL bWatchSubtree,DWORD dwNotifyFilter);
  2274. WINBASEAPI HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR lpPathName,WINBOOL bWatchSubtree,DWORD dwNotifyFilter);
  2275. WINBASEAPI WINBOOL WINAPI FindNextChangeNotification(HANDLE hChangeHandle);
  2276. WINBASEAPI WINBOOL WINAPI FindCloseChangeNotification(HANDLE hChangeHandle);
  2277. WINBASEAPI WINBOOL WINAPI ReadDirectoryChangesW(HANDLE hDirectory,LPVOID lpBuffer,DWORD nBufferLength,WINBOOL bWatchSubtree,DWORD dwNotifyFilter,LPDWORD lpBytesReturned,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
  2278. WINBASEAPI WINBOOL WINAPI VirtualLock(LPVOID lpAddress,SIZE_T dwSize);
  2279. WINBASEAPI WINBOOL WINAPI VirtualUnlock(LPVOID lpAddress,SIZE_T dwSize);
  2280. WINBASEAPI LPVOID WINAPI MapViewOfFileEx(HANDLE hFileMappingObject,DWORD dwDesiredAccess,DWORD dwFileOffsetHigh,DWORD dwFileOffsetLow,SIZE_T dwNumberOfBytesToMap,LPVOID lpBaseAddress);
  2281. WINBASEAPI WINBOOL WINAPI SetPriorityClass(HANDLE hProcess,DWORD dwPriorityClass);
  2282. WINBASEAPI DWORD WINAPI GetPriorityClass(HANDLE hProcess);
  2283. WINBASEAPI WINBOOL WINAPI IsBadReadPtr(CONST VOID *lp,UINT_PTR ucb);
  2284. WINBASEAPI WINBOOL WINAPI IsBadWritePtr(LPVOID lp,UINT_PTR ucb);
  2285. WINBASEAPI WINBOOL WINAPI IsBadHugeReadPtr(CONST VOID *lp,UINT_PTR ucb);
  2286. WINBASEAPI WINBOOL WINAPI IsBadHugeWritePtr(LPVOID lp,UINT_PTR ucb);
  2287. WINBASEAPI WINBOOL WINAPI IsBadCodePtr(FARPROC lpfn);
  2288. WINBASEAPI WINBOOL WINAPI IsBadStringPtrA(LPCSTR lpsz,UINT_PTR ucchMax);
  2289. WINBASEAPI WINBOOL WINAPI IsBadStringPtrW(LPCWSTR lpsz,UINT_PTR ucchMax);
  2290. WINADVAPI WINBOOL WINAPI LookupAccountSidA(LPCSTR lpSystemName,PSID Sid,LPSTR Name,LPDWORD cchName,LPSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse);
  2291. WINADVAPI WINBOOL WINAPI LookupAccountSidW(LPCWSTR lpSystemName,PSID Sid,LPWSTR Name,LPDWORD cchName,LPWSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse);
  2292. WINADVAPI WINBOOL WINAPI LookupAccountNameA(LPCSTR lpSystemName,LPCSTR lpAccountName,PSID Sid,LPDWORD cbSid,LPSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse);
  2293. WINADVAPI WINBOOL WINAPI LookupAccountNameW(LPCWSTR lpSystemName,LPCWSTR lpAccountName,PSID Sid,LPDWORD cbSid,LPWSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse);
  2294. WINADVAPI WINBOOL WINAPI LookupPrivilegeValueA(LPCSTR lpSystemName,LPCSTR lpName,PLUID lpLuid);
  2295. WINADVAPI WINBOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName,LPCWSTR lpName,PLUID lpLuid);
  2296. WINADVAPI WINBOOL WINAPI LookupPrivilegeNameA(LPCSTR lpSystemName,PLUID lpLuid,LPSTR lpName,LPDWORD cchName);
  2297. WINADVAPI WINBOOL WINAPI LookupPrivilegeNameW(LPCWSTR lpSystemName,PLUID lpLuid,LPWSTR lpName,LPDWORD cchName);
  2298. WINADVAPI WINBOOL WINAPI LookupPrivilegeDisplayNameA(LPCSTR lpSystemName,LPCSTR lpName,LPSTR lpDisplayName,LPDWORD cchDisplayName,LPDWORD lpLanguageId);
  2299. WINADVAPI WINBOOL WINAPI LookupPrivilegeDisplayNameW(LPCWSTR lpSystemName,LPCWSTR lpName,LPWSTR lpDisplayName,LPDWORD cchDisplayName,LPDWORD lpLanguageId);
  2300. WINADVAPI WINBOOL WINAPI AllocateLocallyUniqueId(PLUID Luid);
  2301. WINBASEAPI WINBOOL WINAPI BuildCommDCBA(LPCSTR lpDef,LPDCB lpDCB);
  2302. WINBASEAPI WINBOOL WINAPI BuildCommDCBW(LPCWSTR lpDef,LPDCB lpDCB);
  2303. WINBASEAPI WINBOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR lpDef,LPDCB lpDCB,LPCOMMTIMEOUTS lpCommTimeouts);
  2304. WINBASEAPI WINBOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR lpDef,LPDCB lpDCB,LPCOMMTIMEOUTS lpCommTimeouts);
  2305. WINBASEAPI WINBOOL WINAPI CommConfigDialogA(LPCSTR lpszName,HWND hWnd,LPCOMMCONFIG lpCC);
  2306. WINBASEAPI WINBOOL WINAPI CommConfigDialogW(LPCWSTR lpszName,HWND hWnd,LPCOMMCONFIG lpCC);
  2307. WINBASEAPI WINBOOL WINAPI GetDefaultCommConfigA(LPCSTR lpszName,LPCOMMCONFIG lpCC,LPDWORD lpdwSize);
  2308. WINBASEAPI WINBOOL WINAPI GetDefaultCommConfigW(LPCWSTR lpszName,LPCOMMCONFIG lpCC,LPDWORD lpdwSize);
  2309. WINBASEAPI WINBOOL WINAPI SetDefaultCommConfigA(LPCSTR lpszName,LPCOMMCONFIG lpCC,DWORD dwSize);
  2310. WINBASEAPI WINBOOL WINAPI SetDefaultCommConfigW(LPCWSTR lpszName,LPCOMMCONFIG lpCC,DWORD dwSize);
  2311. #define MAX_COMPUTERNAME_LENGTH 15
  2312. WINBASEAPI WINBOOL WINAPI GetComputerNameA(LPSTR lpBuffer,LPDWORD nSize);
  2313. WINBASEAPI WINBOOL WINAPI GetComputerNameW(LPWSTR lpBuffer,LPDWORD nSize);
  2314. WINBASEAPI WINBOOL WINAPI SetComputerNameA(LPCSTR lpComputerName);
  2315. WINBASEAPI WINBOOL WINAPI SetComputerNameW(LPCWSTR lpComputerName);
  2316. typedef enum _COMPUTER_NAME_FORMAT {
  2317. ComputerNameNetBIOS,ComputerNameDnsHostname,ComputerNameDnsDomain,ComputerNameDnsFullyQualified,ComputerNamePhysicalNetBIOS,ComputerNamePhysicalDnsHostname,ComputerNamePhysicalDnsDomain,ComputerNamePhysicalDnsFullyQualified,ComputerNameMax
  2318. } COMPUTER_NAME_FORMAT;
  2319. WINBASEAPI WINBOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT NameType,LPSTR lpBuffer,LPDWORD nSize);
  2320. WINBASEAPI WINBOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT NameType,LPWSTR lpBuffer,LPDWORD nSize);
  2321. WINBASEAPI WINBOOL WINAPI SetComputerNameExA(COMPUTER_NAME_FORMAT NameType,LPCSTR lpBuffer);
  2322. WINBASEAPI WINBOOL WINAPI SetComputerNameExW(COMPUTER_NAME_FORMAT NameType,LPCWSTR lpBuffer);
  2323. WINBASEAPI WINBOOL WINAPI DnsHostnameToComputerNameA(LPCSTR Hostname,LPSTR ComputerName,LPDWORD nSize);
  2324. WINBASEAPI WINBOOL WINAPI DnsHostnameToComputerNameW(LPCWSTR Hostname,LPWSTR ComputerName,LPDWORD nSize);
  2325. WINADVAPI WINBOOL WINAPI GetUserNameA(LPSTR lpBuffer,LPDWORD pcbBuffer);
  2326. WINADVAPI WINBOOL WINAPI GetUserNameW(LPWSTR lpBuffer,LPDWORD pcbBuffer);
  2327. #define LOGON32_LOGON_INTERACTIVE 2
  2328. #define LOGON32_LOGON_NETWORK 3
  2329. #define LOGON32_LOGON_BATCH 4
  2330. #define LOGON32_LOGON_SERVICE 5
  2331. #define LOGON32_LOGON_UNLOCK 7
  2332. #define LOGON32_LOGON_NETWORK_CLEARTEXT 8
  2333. #define LOGON32_LOGON_NEW_CREDENTIALS 9
  2334. #define LOGON32_PROVIDER_DEFAULT 0
  2335. #define LOGON32_PROVIDER_WINNT35 1
  2336. #define LOGON32_PROVIDER_WINNT40 2
  2337. #define LOGON32_PROVIDER_WINNT50 3
  2338. #ifdef UNICODE
  2339. #define LogonUser LogonUserW
  2340. #define LogonUserEx LogonUserExW
  2341. #define CreateProcessAsUser CreateProcessAsUserW
  2342. #else
  2343. #define LogonUser LogonUserA
  2344. #define LogonUserEx LogonUserExA
  2345. #define CreateProcessAsUser CreateProcessAsUserA
  2346. #endif
  2347. WINADVAPI WINBOOL WINAPI LogonUserA(LPCSTR lpszUsername,LPCSTR lpszDomain,LPCSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken);
  2348. WINADVAPI WINBOOL WINAPI LogonUserW(LPCWSTR lpszUsername,LPCWSTR lpszDomain,LPCWSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken);
  2349. WINADVAPI WINBOOL WINAPI LogonUserExA(LPCSTR lpszUsername,LPCSTR lpszDomain,LPCSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken,PSID *ppLogonSid,PVOID *ppProfileBuffer,LPDWORD pdwProfileLength,PQUOTA_LIMITS pQuotaLimits);
  2350. WINADVAPI WINBOOL WINAPI LogonUserExW(LPCWSTR lpszUsername,LPCWSTR lpszDomain,LPCWSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken,PSID *ppLogonSid,PVOID *ppProfileBuffer,LPDWORD pdwProfileLength,PQUOTA_LIMITS pQuotaLimits);
  2351. WINADVAPI WINBOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken);
  2352. WINADVAPI WINBOOL WINAPI CreateProcessAsUserA(HANDLE hToken,LPCSTR lpApplicationName,LPSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCSTR lpCurrentDirectory,LPSTARTUPINFOA lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
  2353. WINADVAPI WINBOOL WINAPI CreateProcessAsUserW(HANDLE hToken,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
  2354. #define LOGON_WITH_PROFILE 0x1
  2355. #define LOGON_NETCREDENTIALS_ONLY 0x2
  2356. #define LOGON_ZERO_PASSWORD_BUFFER 0x80000000
  2357. WINADVAPI WINBOOL WINAPI CreateProcessWithLogonW(LPCWSTR lpUsername,LPCWSTR lpDomain,LPCWSTR lpPassword,DWORD dwLogonFlags,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
  2358. WINADVAPI WINBOOL WINAPI CreateProcessWithTokenW(HANDLE hToken,DWORD dwLogonFlags,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
  2359. WINADVAPI WINBOOL WINAPI ImpersonateAnonymousToken(HANDLE ThreadHandle);
  2360. WINADVAPI WINBOOL WINAPI DuplicateTokenEx(HANDLE hExistingToken,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpTokenAttributes,SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,TOKEN_TYPE TokenType,PHANDLE phNewToken);
  2361. WINADVAPI WINBOOL WINAPI CreateRestrictedToken(HANDLE ExistingTokenHandle,DWORD Flags,DWORD DisableSidCount,PSID_AND_ATTRIBUTES SidsToDisable,DWORD DeletePrivilegeCount,PLUID_AND_ATTRIBUTES PrivilegesToDelete,DWORD RestrictedSidCount,PSID_AND_ATTRIBUTES SidsToRestrict,PHANDLE NewTokenHandle);
  2362. WINADVAPI WINBOOL WINAPI IsTokenRestricted(HANDLE TokenHandle);
  2363. WINADVAPI WINBOOL WINAPI IsTokenUntrusted(HANDLE TokenHandle);
  2364. WINADVAPI WINBOOL WINAPI CheckTokenMembership(HANDLE TokenHandle,PSID SidToCheck,PBOOL IsMember);
  2365. typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK;
  2366. WINBASEAPI WINBOOL WINAPI RegisterWaitForSingleObject(PHANDLE phNewWaitObject,HANDLE hObject,WAITORTIMERCALLBACK Callback,PVOID Context,ULONG dwMilliseconds,ULONG dwFlags);
  2367. WINBASEAPI HANDLE WINAPI RegisterWaitForSingleObjectEx(HANDLE hObject,WAITORTIMERCALLBACK Callback,PVOID Context,ULONG dwMilliseconds,ULONG dwFlags);
  2368. WINBASEAPI WINBOOL WINAPI UnregisterWait(HANDLE WaitHandle);
  2369. WINBASEAPI WINBOOL WINAPI UnregisterWaitEx(HANDLE WaitHandle,HANDLE CompletionEvent);
  2370. WINBASEAPI WINBOOL WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE Function,PVOID Context,ULONG Flags);
  2371. WINBASEAPI WINBOOL WINAPI BindIoCompletionCallback(HANDLE FileHandle,LPOVERLAPPED_COMPLETION_ROUTINE Function,ULONG Flags);
  2372. WINBASEAPI HANDLE WINAPI CreateTimerQueue(VOID);
  2373. WINBASEAPI WINBOOL WINAPI CreateTimerQueueTimer(PHANDLE phNewTimer,HANDLE TimerQueue,WAITORTIMERCALLBACK Callback,PVOID Parameter,DWORD DueTime,DWORD Period,ULONG Flags);
  2374. WINBASEAPI WINBOOL WINAPI ChangeTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer,ULONG DueTime,ULONG Period);
  2375. WINBASEAPI WINBOOL WINAPI DeleteTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer,HANDLE CompletionEvent);
  2376. WINBASEAPI WINBOOL WINAPI DeleteTimerQueueEx(HANDLE TimerQueue,HANDLE CompletionEvent);
  2377. WINBASEAPI HANDLE WINAPI SetTimerQueueTimer(HANDLE TimerQueue,WAITORTIMERCALLBACK Callback,PVOID Parameter,DWORD DueTime,DWORD Period,WINBOOL PreferIo);
  2378. WINBASEAPI WINBOOL WINAPI CancelTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer);
  2379. WINBASEAPI WINBOOL WINAPI DeleteTimerQueue(HANDLE TimerQueue);
  2380. #define HW_PROFILE_GUIDLEN 39
  2381. #define MAX_PROFILE_LEN 80
  2382. #define DOCKINFO_UNDOCKED (0x1)
  2383. #define DOCKINFO_DOCKED (0x2)
  2384. #define DOCKINFO_USER_SUPPLIED (0x4)
  2385. #define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_UNDOCKED)
  2386. #define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_DOCKED)
  2387. typedef struct tagHW_PROFILE_INFOA {
  2388. DWORD dwDockInfo;
  2389. CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
  2390. CHAR szHwProfileName[MAX_PROFILE_LEN];
  2391. } HW_PROFILE_INFOA,*LPHW_PROFILE_INFOA;
  2392. typedef struct tagHW_PROFILE_INFOW {
  2393. DWORD dwDockInfo;
  2394. WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
  2395. WCHAR szHwProfileName[MAX_PROFILE_LEN];
  2396. } HW_PROFILE_INFOW,*LPHW_PROFILE_INFOW;
  2397. #ifdef UNICODE
  2398. typedef HW_PROFILE_INFOW HW_PROFILE_INFO;
  2399. typedef LPHW_PROFILE_INFOW LPHW_PROFILE_INFO;
  2400. #else
  2401. typedef HW_PROFILE_INFOA HW_PROFILE_INFO;
  2402. typedef LPHW_PROFILE_INFOA LPHW_PROFILE_INFO;
  2403. #endif
  2404. #ifdef UNICODE
  2405. #define GetCurrentHwProfile GetCurrentHwProfileW
  2406. #define GetVersionEx GetVersionExW
  2407. #define VerifyVersionInfo VerifyVersionInfoW
  2408. #else
  2409. #define GetCurrentHwProfile GetCurrentHwProfileA
  2410. #define GetVersionEx GetVersionExA
  2411. #define VerifyVersionInfo VerifyVersionInfoA
  2412. #endif
  2413. WINADVAPI WINBOOL WINAPI GetCurrentHwProfileA (LPHW_PROFILE_INFOA lpHwProfileInfo);
  2414. WINADVAPI WINBOOL WINAPI GetCurrentHwProfileW (LPHW_PROFILE_INFOW lpHwProfileInfo);
  2415. WINBASEAPI WINBOOL WINAPI QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount);
  2416. WINBASEAPI WINBOOL WINAPI QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency);
  2417. WINBASEAPI WINBOOL WINAPI GetVersionExA(LPOSVERSIONINFOA lpVersionInformation);
  2418. WINBASEAPI WINBOOL WINAPI GetVersionExW(LPOSVERSIONINFOW lpVersionInformation);
  2419. WINBASEAPI WINBOOL WINAPI VerifyVersionInfoA(LPOSVERSIONINFOEXA lpVersionInformation,DWORD dwTypeMask,DWORDLONG dwlConditionMask);
  2420. WINBASEAPI WINBOOL WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW lpVersionInformation,DWORD dwTypeMask,DWORDLONG dwlConditionMask);
  2421. #include <winerror.h>
  2422. #define TC_NORMAL 0
  2423. #define TC_HARDERR 1
  2424. #define TC_GP_TRAP 2
  2425. #define TC_SIGNAL 3
  2426. #define AC_LINE_OFFLINE 0x0
  2427. #define AC_LINE_ONLINE 0x1
  2428. #define AC_LINE_BACKUP_POWER 0x2
  2429. #define AC_LINE_UNKNOWN 0xff
  2430. #define BATTERY_FLAG_HIGH 0x1
  2431. #define BATTERY_FLAG_LOW 0x2
  2432. #define BATTERY_FLAG_CRITICAL 0x4
  2433. #define BATTERY_FLAG_CHARGING 0x8
  2434. #define BATTERY_FLAG_NO_BATTERY 0x80
  2435. #define BATTERY_FLAG_UNKNOWN 0xff
  2436. #define BATTERY_PERCENTAGE_UNKNOWN 0xff
  2437. #define BATTERY_LIFE_UNKNOWN 0xffffffff
  2438. typedef struct _SYSTEM_POWER_STATUS {
  2439. BYTE ACLineStatus;
  2440. BYTE BatteryFlag;
  2441. BYTE BatteryLifePercent;
  2442. BYTE Reserved1;
  2443. DWORD BatteryLifeTime;
  2444. DWORD BatteryFullLifeTime;
  2445. } SYSTEM_POWER_STATUS,*LPSYSTEM_POWER_STATUS;
  2446. #ifdef UNICODE
  2447. #define CreateJobObject CreateJobObjectW
  2448. #define OpenJobObject OpenJobObjectW
  2449. #define FindFirstVolume FindFirstVolumeW
  2450. #define FindNextVolume FindNextVolumeW
  2451. #define FindFirstVolumeMountPoint FindFirstVolumeMountPointW
  2452. #define FindNextVolumeMountPoint FindNextVolumeMountPointW
  2453. #define SetVolumeMountPoint SetVolumeMountPointW
  2454. #define DeleteVolumeMountPoint DeleteVolumeMountPointW
  2455. #define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointW
  2456. #define GetVolumePathName GetVolumePathNameW
  2457. #define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameW
  2458. #else
  2459. #define CreateJobObject CreateJobObjectA
  2460. #define OpenJobObject OpenJobObjectA
  2461. #define FindFirstVolume FindFirstVolumeA
  2462. #define FindNextVolume FindNextVolumeA
  2463. #define FindFirstVolumeMountPoint FindFirstVolumeMountPointA
  2464. #define FindNextVolumeMountPoint FindNextVolumeMountPointA
  2465. #define SetVolumeMountPoint SetVolumeMountPointA
  2466. #define DeleteVolumeMountPoint DeleteVolumeMountPointA
  2467. #define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointA
  2468. #define GetVolumePathName GetVolumePathNameA
  2469. #define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameA
  2470. #endif
  2471. WINBOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS lpSystemPowerStatus);
  2472. WINBOOL WINAPI SetSystemPowerState(WINBOOL fSuspend,WINBOOL fForce);
  2473. WINBASEAPI WINBOOL WINAPI AllocateUserPhysicalPages(HANDLE hProcess,PULONG_PTR NumberOfPages,PULONG_PTR PageArray);
  2474. WINBASEAPI WINBOOL WINAPI FreeUserPhysicalPages(HANDLE hProcess,PULONG_PTR NumberOfPages,PULONG_PTR PageArray);
  2475. WINBASEAPI WINBOOL WINAPI MapUserPhysicalPages(PVOID VirtualAddress,ULONG_PTR NumberOfPages,PULONG_PTR PageArray);
  2476. WINBASEAPI WINBOOL WINAPI MapUserPhysicalPagesScatter(PVOID *VirtualAddresses,ULONG_PTR NumberOfPages,PULONG_PTR PageArray);
  2477. WINBASEAPI HANDLE WINAPI CreateJobObjectA(LPSECURITY_ATTRIBUTES lpJobAttributes,LPCSTR lpName);
  2478. WINBASEAPI HANDLE WINAPI CreateJobObjectW(LPSECURITY_ATTRIBUTES lpJobAttributes,LPCWSTR lpName);
  2479. WINBASEAPI HANDLE WINAPI OpenJobObjectA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName);
  2480. WINBASEAPI HANDLE WINAPI OpenJobObjectW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName);
  2481. WINBASEAPI WINBOOL WINAPI AssignProcessToJobObject(HANDLE hJob,HANDLE hProcess);
  2482. WINBASEAPI WINBOOL WINAPI TerminateJobObject(HANDLE hJob,UINT uExitCode);
  2483. WINBASEAPI WINBOOL WINAPI QueryInformationJobObject(HANDLE hJob,JOBOBJECTINFOCLASS JobObjectInformationClass,LPVOID lpJobObjectInformation,DWORD cbJobObjectInformationLength,LPDWORD lpReturnLength);
  2484. WINBASEAPI WINBOOL WINAPI SetInformationJobObject(HANDLE hJob,JOBOBJECTINFOCLASS JobObjectInformationClass,LPVOID lpJobObjectInformation,DWORD cbJobObjectInformationLength);
  2485. WINBASEAPI WINBOOL WINAPI IsProcessInJob(HANDLE ProcessHandle,HANDLE JobHandle,PBOOL Result);
  2486. WINBASEAPI WINBOOL WINAPI CreateJobSet(ULONG NumJob,PJOB_SET_ARRAY UserJobSet,ULONG Flags);
  2487. WINBASEAPI PVOID WINAPI AddVectoredExceptionHandler (ULONG First,PVECTORED_EXCEPTION_HANDLER Handler);
  2488. WINBASEAPI ULONG WINAPI RemoveVectoredExceptionHandler(PVOID Handle);
  2489. WINBASEAPI PVOID WINAPI AddVectoredContinueHandler (ULONG First,PVECTORED_EXCEPTION_HANDLER Handler);
  2490. WINBASEAPI ULONG WINAPI RemoveVectoredContinueHandler(PVOID Handle);
  2491. WINBASEAPI HANDLE WINAPI FindFirstVolumeA(LPSTR lpszVolumeName,DWORD cchBufferLength);
  2492. WINBASEAPI HANDLE WINAPI FindFirstVolumeW(LPWSTR lpszVolumeName,DWORD cchBufferLength);
  2493. WINBASEAPI WINBOOL WINAPI FindNextVolumeA(HANDLE hFindVolume,LPSTR lpszVolumeName,DWORD cchBufferLength);
  2494. WINBASEAPI WINBOOL WINAPI FindNextVolumeW(HANDLE hFindVolume,LPWSTR lpszVolumeName,DWORD cchBufferLength);
  2495. WINBASEAPI WINBOOL WINAPI FindVolumeClose(HANDLE hFindVolume);
  2496. WINBASEAPI HANDLE WINAPI FindFirstVolumeMountPointA(LPCSTR lpszRootPathName,LPSTR lpszVolumeMountPoint,DWORD cchBufferLength);
  2497. WINBASEAPI HANDLE WINAPI FindFirstVolumeMountPointW(LPCWSTR lpszRootPathName,LPWSTR lpszVolumeMountPoint,DWORD cchBufferLength);
  2498. WINBASEAPI WINBOOL WINAPI FindNextVolumeMountPointA(HANDLE hFindVolumeMountPoint,LPSTR lpszVolumeMountPoint,DWORD cchBufferLength);
  2499. WINBASEAPI WINBOOL WINAPI FindNextVolumeMountPointW(HANDLE hFindVolumeMountPoint,LPWSTR lpszVolumeMountPoint,DWORD cchBufferLength);
  2500. WINBASEAPI WINBOOL WINAPI FindVolumeMountPointClose(HANDLE hFindVolumeMountPoint);
  2501. WINBASEAPI WINBOOL WINAPI SetVolumeMountPointA(LPCSTR lpszVolumeMountPoint,LPCSTR lpszVolumeName);
  2502. WINBASEAPI WINBOOL WINAPI SetVolumeMountPointW(LPCWSTR lpszVolumeMountPoint,LPCWSTR lpszVolumeName);
  2503. WINBASEAPI WINBOOL WINAPI DeleteVolumeMountPointA(LPCSTR lpszVolumeMountPoint);
  2504. WINBASEAPI WINBOOL WINAPI DeleteVolumeMountPointW(LPCWSTR lpszVolumeMountPoint);
  2505. WINBASEAPI WINBOOL WINAPI GetVolumeNameForVolumeMountPointA(LPCSTR lpszVolumeMountPoint,LPSTR lpszVolumeName,DWORD cchBufferLength);
  2506. WINBASEAPI WINBOOL WINAPI GetVolumeNameForVolumeMountPointW(LPCWSTR lpszVolumeMountPoint,LPWSTR lpszVolumeName,DWORD cchBufferLength);
  2507. WINBASEAPI WINBOOL WINAPI GetVolumePathNameA(LPCSTR lpszFileName,LPSTR lpszVolumePathName,DWORD cchBufferLength);
  2508. WINBASEAPI WINBOOL WINAPI GetVolumePathNameW(LPCWSTR lpszFileName,LPWSTR lpszVolumePathName,DWORD cchBufferLength);
  2509. WINBASEAPI WINBOOL WINAPI GetVolumePathNamesForVolumeNameA(LPCSTR lpszVolumeName,LPCH lpszVolumePathNames,DWORD cchBufferLength,PDWORD lpcchReturnLength);
  2510. WINBASEAPI WINBOOL WINAPI GetVolumePathNamesForVolumeNameW(LPCWSTR lpszVolumeName,LPWCH lpszVolumePathNames,DWORD cchBufferLength,PDWORD lpcchReturnLength);
  2511. #define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID 0x1
  2512. #define ACTCTX_FLAG_LANGID_VALID 0x2
  2513. #define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID 0x4
  2514. #define ACTCTX_FLAG_RESOURCE_NAME_VALID 0x8
  2515. #define ACTCTX_FLAG_SET_PROCESS_DEFAULT 0x10
  2516. #define ACTCTX_FLAG_APPLICATION_NAME_VALID 0x20
  2517. #define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF 0x40
  2518. #define ACTCTX_FLAG_HMODULE_VALID 0x80
  2519. typedef struct tagACTCTXA {
  2520. ULONG cbSize;
  2521. DWORD dwFlags;
  2522. LPCSTR lpSource;
  2523. USHORT wProcessorArchitecture;
  2524. LANGID wLangId;
  2525. LPCSTR lpAssemblyDirectory;
  2526. LPCSTR lpResourceName;
  2527. LPCSTR lpApplicationName;
  2528. HMODULE hModule;
  2529. } ACTCTXA,*PACTCTXA;
  2530. typedef struct tagACTCTXW {
  2531. ULONG cbSize;
  2532. DWORD dwFlags;
  2533. LPCWSTR lpSource;
  2534. USHORT wProcessorArchitecture;
  2535. LANGID wLangId;
  2536. LPCWSTR lpAssemblyDirectory;
  2537. LPCWSTR lpResourceName;
  2538. LPCWSTR lpApplicationName;
  2539. HMODULE hModule;
  2540. } ACTCTXW,*PACTCTXW;
  2541. typedef const ACTCTXA *PCACTCTXA;
  2542. typedef const ACTCTXW *PCACTCTXW;
  2543. #ifdef UNICODE
  2544. typedef ACTCTXW ACTCTX;
  2545. typedef PACTCTXW PACTCTX;
  2546. typedef PCACTCTXW PCACTCTX;
  2547. #else
  2548. typedef ACTCTXA ACTCTX;
  2549. typedef PACTCTXA PACTCTX;
  2550. typedef PCACTCTXA PCACTCTX;
  2551. #endif
  2552. #ifdef UNICODE
  2553. #define CreateActCtx CreateActCtxW
  2554. #else
  2555. #define CreateActCtx CreateActCtxA
  2556. #endif
  2557. WINBASEAPI HANDLE WINAPI CreateActCtxA(PCACTCTXA pActCtx);
  2558. WINBASEAPI HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx);
  2559. WINBASEAPI VOID WINAPI AddRefActCtx(HANDLE hActCtx);
  2560. WINBASEAPI VOID WINAPI ReleaseActCtx(HANDLE hActCtx);
  2561. WINBASEAPI WINBOOL WINAPI ZombifyActCtx(HANDLE hActCtx);
  2562. WINBASEAPI WINBOOL WINAPI ActivateActCtx(HANDLE hActCtx,ULONG_PTR *lpCookie);
  2563. #define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION (0x1)
  2564. WINBASEAPI WINBOOL WINAPI DeactivateActCtx(DWORD dwFlags,ULONG_PTR ulCookie);
  2565. WINBASEAPI WINBOOL WINAPI GetCurrentActCtx(HANDLE *lphActCtx);
  2566. typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 {
  2567. ULONG cbSize;
  2568. ULONG ulDataFormatVersion;
  2569. PVOID lpData;
  2570. ULONG ulLength;
  2571. PVOID lpSectionGlobalData;
  2572. ULONG ulSectionGlobalDataLength;
  2573. PVOID lpSectionBase;
  2574. ULONG ulSectionTotalLength;
  2575. HANDLE hActCtx;
  2576. ULONG ulAssemblyRosterIndex;
  2577. } ACTCTX_SECTION_KEYED_DATA_2600,*PACTCTX_SECTION_KEYED_DATA_2600;
  2578. typedef const ACTCTX_SECTION_KEYED_DATA_2600 *PCACTCTX_SECTION_KEYED_DATA_2600;
  2579. typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
  2580. PVOID lpInformation;
  2581. PVOID lpSectionBase;
  2582. ULONG ulSectionLength;
  2583. PVOID lpSectionGlobalDataBase;
  2584. ULONG ulSectionGlobalDataLength;
  2585. } ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA,*PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
  2586. typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
  2587. typedef struct tagACTCTX_SECTION_KEYED_DATA {
  2588. ULONG cbSize;
  2589. ULONG ulDataFormatVersion;
  2590. PVOID lpData;
  2591. ULONG ulLength;
  2592. PVOID lpSectionGlobalData;
  2593. ULONG ulSectionGlobalDataLength;
  2594. PVOID lpSectionBase;
  2595. ULONG ulSectionTotalLength;
  2596. HANDLE hActCtx;
  2597. ULONG ulAssemblyRosterIndex;
  2598. ULONG ulFlags;
  2599. ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
  2600. } ACTCTX_SECTION_KEYED_DATA,*PACTCTX_SECTION_KEYED_DATA;
  2601. typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA;
  2602. #define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX 0x1
  2603. #define FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS 0x2
  2604. #define FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA 0x4
  2605. #ifdef UNICODE
  2606. #define FindActCtxSectionString FindActCtxSectionStringW
  2607. #else
  2608. #define FindActCtxSectionString FindActCtxSectionStringA
  2609. #endif
  2610. WINBASEAPI WINBOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,LPCSTR lpStringToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData);
  2611. WINBASEAPI WINBOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,LPCWSTR lpStringToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData);
  2612. WINBASEAPI WINBOOL WINAPI FindActCtxSectionGuid(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,const GUID *lpGuidToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData);
  2613. #ifndef RC_INVOKED
  2614. #ifndef ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED
  2615. typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION {
  2616. HANDLE hActCtx;
  2617. DWORD dwFlags;
  2618. } ACTIVATION_CONTEXT_BASIC_INFORMATION,*PACTIVATION_CONTEXT_BASIC_INFORMATION;
  2619. typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION;
  2620. #define ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED 1
  2621. #endif
  2622. #endif
  2623. #define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX 0x4
  2624. #define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE 0x8
  2625. #define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS 0x10
  2626. #define QUERY_ACTCTX_FLAG_NO_ADDREF 0x80000000
  2627. WINBASEAPI WINBOOL WINAPI QueryActCtxW(DWORD dwFlags,HANDLE hActCtx,PVOID pvSubInstance,ULONG ulInfoClass,PVOID pvBuffer,SIZE_T cbBuffer,SIZE_T *pcbWrittenOrRequired);
  2628. typedef WINBOOL (WINAPI *PQUERYACTCTXW_FUNC)(DWORD dwFlags,HANDLE hActCtx,PVOID pvSubInstance,ULONG ulInfoClass,PVOID pvBuffer,SIZE_T cbBuffer,SIZE_T *pcbWrittenOrRequired);
  2629. WINBASEAPI WINBOOL WINAPI ProcessIdToSessionId(DWORD dwProcessId,DWORD *pSessionId);
  2630. WINBASEAPI DWORD WINAPI WTSGetActiveConsoleSessionId();
  2631. WINBASEAPI WINBOOL WINAPI IsWow64Process(HANDLE hProcess,PBOOL Wow64Process);
  2632. WINBASEAPI WINBOOL WINAPI GetLogicalProcessorInformation(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer,PDWORD ReturnedLength);
  2633. WINBASEAPI WINBOOL WINAPI GetNumaHighestNodeNumber(PULONG HighestNodeNumber);
  2634. WINBASEAPI WINBOOL WINAPI GetNumaProcessorNode(UCHAR Processor,PUCHAR NodeNumber);
  2635. WINBASEAPI WINBOOL WINAPI GetNumaNodeProcessorMask(UCHAR Node,PULONGLONG ProcessorMask);
  2636. WINBASEAPI WINBOOL WINAPI GetNumaAvailableMemoryNode(UCHAR Node,PULONGLONG AvailableBytes);
  2637. #ifdef __cplusplus
  2638. }
  2639. #endif
  2640. #endif