winbase.h 95.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*
 * Copyright (C) the Wine project
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

Alexandre Julliard's avatar
Alexandre Julliard committed
19 20
#ifndef __WINE_WINBASE_H
#define __WINE_WINBASE_H
Alexandre Julliard's avatar
Alexandre Julliard committed
21

22
#include <winerror.h>
Alexandre Julliard's avatar
Alexandre Julliard committed
23

24 25 26 27
#ifdef __cplusplus
extern "C" {
#endif

28 29 30 31
  /* Windows Exit Procedure flag values */
#define	WEP_FREE_DLL        0
#define	WEP_SYSTEM_EXIT     1

32
typedef DWORD (CALLBACK *LPTHREAD_START_ROUTINE)(LPVOID);
33

34
typedef VOID (WINAPI *PFIBER_START_ROUTINE)( LPVOID lpFiberParameter );
35 36 37 38 39 40 41 42 43 44
typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;

typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;

typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG;
typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG;

45 46
typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK;
    
47 48 49 50 51 52 53 54 55
#define EXCEPTION_DEBUG_EVENT       1
#define CREATE_THREAD_DEBUG_EVENT   2
#define CREATE_PROCESS_DEBUG_EVENT  3
#define EXIT_THREAD_DEBUG_EVENT     4
#define EXIT_PROCESS_DEBUG_EVENT    5
#define LOAD_DLL_DEBUG_EVENT        6
#define UNLOAD_DLL_DEBUG_EVENT      7
#define OUTPUT_DEBUG_STRING_EVENT   8
#define RIP_EVENT                   9
56 57

typedef struct _EXCEPTION_DEBUG_INFO {
58 59
    EXCEPTION_RECORD ExceptionRecord;
    DWORD dwFirstChance;
60 61 62
} EXCEPTION_DEBUG_INFO;

typedef struct _CREATE_THREAD_DEBUG_INFO {
63
    HANDLE hThread;
64 65 66 67 68
    LPVOID lpThreadLocalBase;
    LPTHREAD_START_ROUTINE lpStartAddress;
} CREATE_THREAD_DEBUG_INFO;

typedef struct _CREATE_PROCESS_DEBUG_INFO {
69 70 71
    HANDLE hFile;
    HANDLE hProcess;
    HANDLE hThread;
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
    LPVOID lpBaseOfImage;
    DWORD dwDebugInfoFileOffset;
    DWORD nDebugInfoSize;
    LPVOID lpThreadLocalBase;
    LPTHREAD_START_ROUTINE lpStartAddress;
    LPVOID lpImageName;
    WORD fUnicode;
} CREATE_PROCESS_DEBUG_INFO;

typedef struct _EXIT_THREAD_DEBUG_INFO {
    DWORD dwExitCode;
} EXIT_THREAD_DEBUG_INFO;

typedef struct _EXIT_PROCESS_DEBUG_INFO {
    DWORD dwExitCode;
} EXIT_PROCESS_DEBUG_INFO;

typedef struct _LOAD_DLL_DEBUG_INFO {
90
    HANDLE hFile;
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
    LPVOID   lpBaseOfDll;
    DWORD    dwDebugInfoFileOffset;
    DWORD    nDebugInfoSize;
    LPVOID   lpImageName;
    WORD     fUnicode;
} LOAD_DLL_DEBUG_INFO;

typedef struct _UNLOAD_DLL_DEBUG_INFO {
    LPVOID lpBaseOfDll;
} UNLOAD_DLL_DEBUG_INFO;

typedef struct _OUTPUT_DEBUG_STRING_INFO {
    LPSTR lpDebugStringData;
    WORD  fUnicode;
    WORD  nDebugStringLength;
} OUTPUT_DEBUG_STRING_INFO;

typedef struct _RIP_INFO {
    DWORD dwError;
    DWORD dwType;
} RIP_INFO;

typedef struct _DEBUG_EVENT {
    DWORD dwDebugEventCode;
    DWORD dwProcessId;
    DWORD dwThreadId;
    union {
        EXCEPTION_DEBUG_INFO      Exception;
        CREATE_THREAD_DEBUG_INFO  CreateThread;
        CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
        EXIT_THREAD_DEBUG_INFO    ExitThread;
        EXIT_PROCESS_DEBUG_INFO   ExitProcess;
        LOAD_DLL_DEBUG_INFO       LoadDll;
        UNLOAD_DLL_DEBUG_INFO     UnloadDll;
        OUTPUT_DEBUG_STRING_INFO  DebugString;
        RIP_INFO                  RipInfo;
    } u;
} DEBUG_EVENT, *LPDEBUG_EVENT;

130 131 132 133
typedef PCONTEXT LPCONTEXT;
typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;

134
#define OFS_MAXPATHNAME 128
135
typedef struct _OFSTRUCT
136 137 138 139
{
    BYTE cBytes;
    BYTE fFixedDisk;
    WORD nErrCode;
140 141
    WORD Reserved1;
    WORD Reserved2;
142
    CHAR szPathName[OFS_MAXPATHNAME];
143
} OFSTRUCT, *POFSTRUCT, *LPOFSTRUCT;
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176

#define OF_READ               0x0000
#define OF_WRITE              0x0001
#define OF_READWRITE          0x0002
#define OF_SHARE_COMPAT       0x0000
#define OF_SHARE_EXCLUSIVE    0x0010
#define OF_SHARE_DENY_WRITE   0x0020
#define OF_SHARE_DENY_READ    0x0030
#define OF_SHARE_DENY_NONE    0x0040
#define OF_PARSE              0x0100
#define OF_DELETE             0x0200
#define OF_VERIFY             0x0400   /* Used with OF_REOPEN */
#define OF_SEARCH             0x0400   /* Used without OF_REOPEN */
#define OF_CANCEL             0x0800
#define OF_CREATE             0x1000
#define OF_PROMPT             0x2000
#define OF_EXIST              0x4000
#define OF_REOPEN             0x8000

/* SetErrorMode values */
#define SEM_FAILCRITICALERRORS      0x0001
#define SEM_NOGPFAULTERRORBOX       0x0002
#define SEM_NOALIGNMENTFAULTEXCEPT  0x0004
#define SEM_NOOPENFILEERRORBOX      0x8000

/* CopyFileEx flags */
#define COPY_FILE_FAIL_IF_EXISTS        0x00000001
#define COPY_FILE_RESTARTABLE           0x00000002
#define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x00000004

/* GetTempFileName() Flags */
#define TF_FORCEDRIVE	        0x80

177 178
#define DRIVE_UNKNOWN              0
#define DRIVE_NO_ROOT_DIR          1
179 180 181 182 183 184 185
#define DRIVE_REMOVABLE            2
#define DRIVE_FIXED                3
#define DRIVE_REMOTE               4
/* Win32 additions */
#define DRIVE_CDROM                5
#define DRIVE_RAMDISK              6

186
#define MAX_COMPUTERNAME_LENGTH    15
187

188
/* The security attributes structure */
189
typedef struct _SECURITY_ATTRIBUTES
190 191 192
{
    DWORD   nLength;
    LPVOID  lpSecurityDescriptor;
193
    BOOL  bInheritHandle;
194
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
195

196 197
#ifndef _FILETIME_
#define _FILETIME_
198
/* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
199
typedef struct _FILETIME
200
{
201 202 203 204
#ifdef WORDS_BIGENDIAN
  DWORD  dwHighDateTime;
  DWORD  dwLowDateTime;
#else
205 206
  DWORD  dwLowDateTime;
  DWORD  dwHighDateTime;
207
#endif
208
} FILETIME, *PFILETIME, *LPFILETIME;
209
#endif /* _FILETIME_ */
210 211

/* Find* structures */
212
typedef struct _WIN32_FIND_DATAA
213 214 215 216 217 218 219 220 221 222 223
{
    DWORD     dwFileAttributes;
    FILETIME  ftCreationTime;
    FILETIME  ftLastAccessTime;
    FILETIME  ftLastWriteTime;
    DWORD     nFileSizeHigh;
    DWORD     nFileSizeLow;
    DWORD     dwReserved0;
    DWORD     dwReserved1;
    CHAR      cFileName[260];
    CHAR      cAlternateFileName[14];
224
} WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
225

226
typedef struct _WIN32_FIND_DATAW
227 228 229 230 231 232 233 234 235 236 237
{
    DWORD     dwFileAttributes;
    FILETIME  ftCreationTime;
    FILETIME  ftLastAccessTime;
    FILETIME  ftLastWriteTime;
    DWORD     nFileSizeHigh;
    DWORD     nFileSizeLow;
    DWORD     dwReserved0;
    DWORD     dwReserved1;
    WCHAR     cFileName[260];
    WCHAR     cAlternateFileName[14];
238
} WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;
239 240

DECL_WINELIB_TYPE_AW(WIN32_FIND_DATA)
241
DECL_WINELIB_TYPE_AW(PWIN32_FIND_DATA)
242 243
DECL_WINELIB_TYPE_AW(LPWIN32_FIND_DATA)

244 245 246 247 248 249 250 251 252 253 254 255 256 257
typedef enum _FINDEX_INFO_LEVELS
{
	FindExInfoStandard,
	FindExInfoMaxInfoLevel
} FINDEX_INFO_LEVELS;

typedef enum _FINDEX_SEARCH_OPS
{
	FindExSearchNameMatch,
	FindExSearchLimitToDirectories,
	FindExSearchLimitToDevices,
	FindExSearchMaxSearchOp
} FINDEX_SEARCH_OPS;

258
typedef struct _PROCESS_HEAP_ENTRY
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
{
    LPVOID lpData;
    DWORD cbData;
    BYTE cbOverhead;
    BYTE iRegionIndex;
    WORD wFlags;
    union {
        struct {
            HANDLE hMem;
            DWORD dwReserved[3];
        } Block;
        struct {
            DWORD dwCommittedSize;
            DWORD dwUnCommittedSize;
            LPVOID lpFirstBlock;
            LPVOID lpLastBlock;
        } Region;
276
    } DUMMYUNIONNAME;
277
} PROCESS_HEAP_ENTRY, *PPROCESS_HEAP_ENTRY, *LPPROCESS_HEAP_ENTRY;
278 279 280 281 282 283 284

#define PROCESS_HEAP_REGION                   0x0001
#define PROCESS_HEAP_UNCOMMITTED_RANGE        0x0002
#define PROCESS_HEAP_ENTRY_BUSY               0x0004
#define PROCESS_HEAP_ENTRY_MOVEABLE           0x0010
#define PROCESS_HEAP_ENTRY_DDESHARE           0x0020

285 286 287 288
#define INVALID_HANDLE_VALUE     ((HANDLE)~0UL)
#define INVALID_FILE_SIZE        ((DWORD)~0UL)
#define INVALID_SET_FILE_POINTER ((DWORD)~0UL)
#define INVALID_FILE_ATTRIBUTES  ((DWORD)~0UL)
289

290 291
#define LOCKFILE_FAIL_IMMEDIATELY   1
#define LOCKFILE_EXCLUSIVE_LOCK     2
292

293
#define TLS_OUT_OF_INDEXES ((DWORD)~0UL)
294

295 296
#define SHUTDOWN_NORETRY 1

297 298 299 300 301 302 303 304 305 306 307 308 309
/* comm */

#define CBR_110	0xFF10
#define CBR_300	0xFF11
#define CBR_600	0xFF12
#define CBR_1200	0xFF13
#define CBR_2400	0xFF14
#define CBR_4800	0xFF15
#define CBR_9600	0xFF16
#define CBR_14400	0xFF17
#define CBR_19200	0xFF18
#define CBR_38400	0xFF1B
#define CBR_56000	0xFF1F
310 311
#define CBR_57600       0xFF20
#define CBR_115200      0xFF21
312 313 314 315 316 317 318 319 320 321 322 323 324
#define CBR_128000	0xFF23
#define CBR_256000	0xFF27

#define NOPARITY	0
#define ODDPARITY	1
#define EVENPARITY	2
#define MARKPARITY	3
#define SPACEPARITY	4
#define ONESTOPBIT	0
#define ONE5STOPBITS	1
#define TWOSTOPBITS	2

#define IGNORE		0
325
#define INFINITE      0xFFFFFFFF
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350

#define CE_RXOVER	0x0001
#define CE_OVERRUN	0x0002
#define CE_RXPARITY	0x0004
#define CE_FRAME	0x0008
#define CE_BREAK	0x0010
#define CE_CTSTO	0x0020
#define CE_DSRTO	0x0040
#define CE_RLSDTO	0x0080
#define CE_TXFULL	0x0100
#define CE_PTO		0x0200
#define CE_IOE		0x0400
#define CE_DNS		0x0800
#define CE_OOP		0x1000
#define CE_MODE	0x8000

#define IE_BADID	-1
#define IE_OPEN	-2
#define IE_NOPEN	-3
#define IE_MEMORY	-4
#define IE_DEFAULT	-5
#define IE_HARDWARE	-10
#define IE_BYTESIZE	-11
#define IE_BAUDRATE	-12

351 352
#define EV_RXCHAR    0x0001
#define EV_RXFLAG    0x0002
Uwe Bonnes's avatar
Uwe Bonnes committed
353
#define EV_TXEMPTY   0x0004
354 355 356 357 358 359 360 361 362 363
#define EV_CTS       0x0008
#define EV_DSR       0x0010
#define EV_RLSD      0x0020
#define EV_BREAK     0x0040
#define EV_ERR       0x0080
#define EV_RING      0x0100
#define EV_PERR      0x0200
#define EV_RX80FULL  0x0400
#define EV_EVENT1    0x0800
#define EV_EVENT2    0x1000
364 365 366 367 368 369 370 371 372 373 374 375

#define SETXOFF	1
#define SETXON		2
#define SETRTS		3
#define CLRRTS		4
#define SETDTR		5
#define CLRDTR		6
#define RESETDEV	7
#define SETBREAK	8
#define CLRBREAK	9

/* Purge functions for Comm Port */
376
#define PURGE_TXABORT       0x0001  /* Kill the pending/current writes to the
377
				       comm port */
378
#define PURGE_RXABORT       0x0002  /*Kill the pending/current reads to
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399
				     the comm port */
#define PURGE_TXCLEAR       0x0004  /* Kill the transmit queue if there*/
#define PURGE_RXCLEAR       0x0008  /* Kill the typeahead buffer if there*/


/* Modem Status Flags */
#define MS_CTS_ON           ((DWORD)0x0010)
#define MS_DSR_ON           ((DWORD)0x0020)
#define MS_RING_ON          ((DWORD)0x0040)
#define MS_RLSD_ON          ((DWORD)0x0080)

#define	RTS_CONTROL_DISABLE	0
#define	RTS_CONTROL_ENABLE	1
#define	RTS_CONTROL_HANDSHAKE	2
#define	RTS_CONTROL_TOGGLE	3

#define	DTR_CONTROL_DISABLE	0
#define	DTR_CONTROL_ENABLE	1
#define	DTR_CONTROL_HANDSHAKE	2


400
#define LMEM_FIXED          0
401 402 403 404 405 406
#define LMEM_MOVEABLE       0x0002
#define LMEM_NOCOMPACT      0x0010
#define LMEM_NODISCARD      0x0020
#define LMEM_ZEROINIT       0x0040
#define LMEM_MODIFY         0x0080
#define LMEM_DISCARDABLE    0x0F00
407 408 409
#define LMEM_DISCARDED      0x4000
#define LMEM_INVALID_HANDLE 0x8000
#define LMEM_LOCKCOUNT      0x00FF
410 411

#define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
Matthew Lake's avatar
Matthew Lake committed
412
#define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
413

414 415 416
#define NONZEROLHND         (LMEM_MOVEABLE)
#define NONZEROLPTR         (LMEM_FIXED)

417 418
#define LocalDiscard(h)     (LocalReAlloc((h),0,LMEM_MOVEABLE))

419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437
#define GMEM_FIXED          0x0000
#define GMEM_MOVEABLE       0x0002
#define GMEM_NOCOMPACT      0x0010
#define GMEM_NODISCARD      0x0020
#define GMEM_ZEROINIT       0x0040
#define GMEM_MODIFY         0x0080
#define GMEM_DISCARDABLE    0x0100
#define GMEM_NOT_BANKED     0x1000
#define GMEM_SHARE          0x2000
#define GMEM_DDESHARE       0x2000
#define GMEM_NOTIFY         0x4000
#define GMEM_LOWER          GMEM_NOT_BANKED
#define GMEM_DISCARDED      0x4000
#define GMEM_LOCKCOUNT      0x00ff
#define GMEM_INVALID_HANDLE 0x8000

#define GHND                (GMEM_MOVEABLE | GMEM_ZEROINIT)
#define GPTR                (GMEM_FIXED | GMEM_ZEROINIT)

438 439 440 441
#define GlobalLRUNewest(h)  ((HANDLE)(h))
#define GlobalLRUOldest(h)  ((HANDLE)(h))
#define GlobalDiscard(h)    (GlobalReAlloc((h),0,GMEM_MOVEABLE))

442 443
#define INVALID_ATOM        ((ATOM)0)
#define MAXINTATOM          0xc000
444 445 446
#define MAKEINTATOMA(atom)  ((LPCSTR)((ULONG_PTR)((WORD)(atom))))
#define MAKEINTATOMW(atom)  ((LPCWSTR)((ULONG_PTR)((WORD)(atom))))
#define MAKEINTATOM  WINELIB_NAME_AW(MAKEINTATOM)
447 448 449 450 451

typedef struct tagMEMORYSTATUS
{
    DWORD    dwLength;
    DWORD    dwMemoryLoad;
452 453 454 455 456 457
    SIZE_T   dwTotalPhys;
    SIZE_T   dwAvailPhys;
    SIZE_T   dwTotalPageFile;
    SIZE_T   dwAvailPageFile;
    SIZE_T   dwTotalVirtual;
    SIZE_T   dwAvailVirtual;
458 459
} MEMORYSTATUS, *LPMEMORYSTATUS;

460
#include <pshpack8.h>
461 462 463
typedef struct tagMEMORYSTATUSEX {
  DWORD dwLength;
  DWORD dwMemoryLoad;
464 465 466 467 468 469 470
  DWORDLONG DECLSPEC_ALIGN(8) ullTotalPhys;
  DWORDLONG DECLSPEC_ALIGN(8) ullAvailPhys;
  DWORDLONG DECLSPEC_ALIGN(8) ullTotalPageFile;
  DWORDLONG DECLSPEC_ALIGN(8) ullAvailPageFile;
  DWORDLONG DECLSPEC_ALIGN(8) ullTotalVirtual;
  DWORDLONG DECLSPEC_ALIGN(8) ullAvailVirtual;
  DWORDLONG DECLSPEC_ALIGN(8) ullAvailExtendedVirtual;
471
} MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
472
#include <poppack.h>
473

474

475
typedef struct _SYSTEMTIME{
476 477 478 479 480 481 482 483
        WORD wYear;
        WORD wMonth;
        WORD wDayOfWeek;
        WORD wDay;
        WORD wHour;
        WORD wMinute;
        WORD wSecond;
        WORD wMilliseconds;
484
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
485 486 487

/* The 'overlapped' data structure used by async I/O functions.
 */
488
typedef struct _OVERLAPPED {
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507
#ifdef WORDS_BIGENDIAN
        ULONG_PTR InternalHigh;
        ULONG_PTR Internal;
#else
        ULONG_PTR Internal;
        ULONG_PTR InternalHigh;
#endif
        union {
            struct {
#ifdef WORDS_BIGENDIAN
                DWORD OffsetHigh;
                DWORD Offset;
#else
                DWORD Offset;
                DWORD OffsetHigh;
#endif
            } DUMMYSTRUCTNAME;
            PVOID Pointer;
        } DUMMYUNIONNAME;
508
        HANDLE hEvent;
509 510
} OVERLAPPED, *LPOVERLAPPED;

511
typedef VOID (CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPOVERLAPPED);
512

513 514 515 516 517 518 519 520 521 522 523 524 525 526 527
/* Process startup information.
 */

/* STARTUPINFO.dwFlags */
#define	STARTF_USESHOWWINDOW	0x00000001
#define	STARTF_USESIZE		0x00000002
#define	STARTF_USEPOSITION	0x00000004
#define	STARTF_USECOUNTCHARS	0x00000008
#define	STARTF_USEFILLATTRIBUTE	0x00000010
#define	STARTF_RUNFULLSCREEN	0x00000020
#define	STARTF_FORCEONFEEDBACK	0x00000040
#define	STARTF_FORCEOFFFEEDBACK	0x00000080
#define	STARTF_USESTDHANDLES	0x00000100
#define	STARTF_USEHOTKEY	0x00000200

528
typedef struct _STARTUPINFOA{
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
        DWORD cb;		/* 00: size of struct */
        LPSTR lpReserved;	/* 04: */
        LPSTR lpDesktop;	/* 08: */
        LPSTR lpTitle;		/* 0c: */
        DWORD dwX;		/* 10: */
        DWORD dwY;		/* 14: */
        DWORD dwXSize;		/* 18: */
        DWORD dwYSize;		/* 1c: */
        DWORD dwXCountChars;	/* 20: */
        DWORD dwYCountChars;	/* 24: */
        DWORD dwFillAttribute;	/* 28: */
        DWORD dwFlags;		/* 2c: */
        WORD wShowWindow;	/* 30: */
        WORD cbReserved2;	/* 32: */
        BYTE *lpReserved2;	/* 34: */
544 545 546 547
        HANDLE hStdInput;	/* 38: */
        HANDLE hStdOutput;	/* 3c: */
        HANDLE hStdError;	/* 40: */
} STARTUPINFOA, *LPSTARTUPINFOA;
548

549
typedef struct _STARTUPINFOW{
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564
        DWORD cb;
        LPWSTR lpReserved;
        LPWSTR lpDesktop;
        LPWSTR lpTitle;
        DWORD dwX;
        DWORD dwY;
        DWORD dwXSize;
        DWORD dwYSize;
        DWORD dwXCountChars;
        DWORD dwYCountChars;
        DWORD dwFillAttribute;
        DWORD dwFlags;
        WORD wShowWindow;
        WORD cbReserved2;
        BYTE *lpReserved2;
565 566 567 568
        HANDLE hStdInput;
        HANDLE hStdOutput;
        HANDLE hStdError;
} STARTUPINFOW, *LPSTARTUPINFOW;
569 570 571 572

DECL_WINELIB_TYPE_AW(STARTUPINFO)
DECL_WINELIB_TYPE_AW(LPSTARTUPINFO)

573
typedef struct _PROCESS_INFORMATION{
574 575
	HANDLE	hProcess;
	HANDLE	hThread;
576 577
	DWORD		dwProcessId;
	DWORD		dwThreadId;
578
} PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
579

580
typedef struct _TIME_ZONE_INFORMATION{
581 582 583 584 585 586 587
        LONG Bias;
        WCHAR StandardName[32];
        SYSTEMTIME StandardDate;
        LONG StandardBias;
        WCHAR DaylightName[32];
        SYSTEMTIME DaylightDate;
        LONG DaylightBias;
588
} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
589

590
#define TIME_ZONE_ID_INVALID	((DWORD)0xFFFFFFFF)
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605
#define TIME_ZONE_ID_UNKNOWN    0
#define TIME_ZONE_ID_STANDARD   1
#define TIME_ZONE_ID_DAYLIGHT   2

/* CreateProcess: dwCreationFlag values
 */
#define DEBUG_PROCESS               0x00000001
#define DEBUG_ONLY_THIS_PROCESS     0x00000002
#define CREATE_SUSPENDED            0x00000004
#define DETACHED_PROCESS            0x00000008
#define CREATE_NEW_CONSOLE          0x00000010
#define NORMAL_PRIORITY_CLASS       0x00000020
#define IDLE_PRIORITY_CLASS         0x00000040
#define HIGH_PRIORITY_CLASS         0x00000080
#define REALTIME_PRIORITY_CLASS     0x00000100
606 607
#define BELOW_NORMAL_PRIORITY_CLASS 0x00004000
#define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
608 609 610 611
#define CREATE_NEW_PROCESS_GROUP    0x00000200
#define CREATE_UNICODE_ENVIRONMENT  0x00000400
#define CREATE_SEPARATE_WOW_VDM     0x00000800
#define CREATE_SHARED_WOW_VDM       0x00001000
612
#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649
#define CREATE_DEFAULT_ERROR_MODE   0x04000000
#define CREATE_NO_WINDOW            0x08000000
#define PROFILE_USER                0x10000000
#define PROFILE_KERNEL              0x20000000
#define PROFILE_SERVER              0x40000000


/* File object type definitions
 */
#define FILE_TYPE_UNKNOWN       0
#define FILE_TYPE_DISK          1
#define FILE_TYPE_CHAR          2
#define FILE_TYPE_PIPE          3
#define FILE_TYPE_REMOTE        32768

/* File creation flags
 */
#define FILE_FLAG_WRITE_THROUGH    0x80000000UL
#define FILE_FLAG_OVERLAPPED 	   0x40000000L
#define FILE_FLAG_NO_BUFFERING     0x20000000L
#define FILE_FLAG_RANDOM_ACCESS    0x10000000L
#define FILE_FLAG_SEQUENTIAL_SCAN  0x08000000L
#define FILE_FLAG_DELETE_ON_CLOSE  0x04000000L
#define FILE_FLAG_BACKUP_SEMANTICS 0x02000000L
#define FILE_FLAG_POSIX_SEMANTICS  0x01000000L
#define CREATE_NEW              1
#define CREATE_ALWAYS           2
#define OPEN_EXISTING           3
#define OPEN_ALWAYS             4
#define TRUNCATE_EXISTING       5

/* Standard handle identifiers
 */
#define STD_INPUT_HANDLE        ((DWORD) -10)
#define STD_OUTPUT_HANDLE       ((DWORD) -11)
#define STD_ERROR_HANDLE        ((DWORD) -12)

650
typedef struct _BY_HANDLE_FILE_INFORMATION
651
{
652
  DWORD dwFileAttributes;
653 654 655
  FILETIME ftCreationTime;
  FILETIME ftLastAccessTime;
  FILETIME ftLastWriteTime;
656 657 658 659 660 661
  DWORD dwVolumeSerialNumber;
  DWORD nFileSizeHigh;
  DWORD nFileSizeLow;
  DWORD nNumberOfLinks;
  DWORD nFileIndexHigh;
  DWORD nFileIndexLow;
662
} BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION ;
663

664 665 666 667 668 669 670 671 672 673 674 675 676 677
#define PIPE_ACCESS_INBOUND  1
#define PIPE_ACCESS_OUTBOUND 2
#define PIPE_ACCESS_DUPLEX   3

#define PIPE_TYPE_BYTE    0
#define PIPE_TYPE_MESSAGE 4

#define PIPE_READMODE_BYTE    0
#define PIPE_READMODE_MESSAGE 2

#define PIPE_WAIT   0
#define PIPE_NOWAIT 1

#define PIPE_UNLIMITED_INSTANCES 255
678

679 680 681 682
#define NMPWAIT_WAIT_FOREVER		0xffffffff
#define NMPWAIT_NOWAIT			0x00000001
#define NMPWAIT_USE_DEFAULT_WAIT	0x00000000

683 684
typedef struct _SYSTEM_POWER_STATUS
{
685
  BYTE    ACLineStatus;
686 687
  BYTE    BatteryFlag;
  BYTE    BatteryLifePercent;
688
  BYTE    Reserved1;
689 690 691 692 693
  DWORD   BatteryLifeTime;
  DWORD   BatteryFullLifeTime;
} SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS;


694
typedef struct _SYSTEM_INFO
695 696
{
    union {
697
	DWORD	dwOemId; /* Obsolete field - do not use */
698 699 700
	struct {
		WORD wProcessorArchitecture;
		WORD wReserved;
701 702
	} DUMMYSTRUCTNAME;
    } DUMMYUNIONNAME;
703 704 705 706 707 708 709 710 711 712 713
    DWORD	dwPageSize;
    LPVOID	lpMinimumApplicationAddress;
    LPVOID	lpMaximumApplicationAddress;
    DWORD	dwActiveProcessorMask;
    DWORD	dwNumberOfProcessors;
    DWORD	dwProcessorType;
    DWORD	dwAllocationGranularity;
    WORD	wProcessorLevel;
    WORD	wProcessorRevision;
} SYSTEM_INFO, *LPSYSTEM_INFO;

714 715 716 717 718 719
typedef BOOL (CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG_PTR);
typedef BOOL (CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG_PTR);
typedef BOOL (CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG_PTR);
typedef BOOL (CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG_PTR);
typedef BOOL (CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG_PTR);
typedef BOOL (CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG_PTR);
720 721 722 723 724 725 726 727 728 729

DECL_WINELIB_TYPE_AW(ENUMRESTYPEPROC)
DECL_WINELIB_TYPE_AW(ENUMRESNAMEPROC)
DECL_WINELIB_TYPE_AW(ENUMRESLANGPROC)

/* flags that can be passed to LoadLibraryEx */
#define	DONT_RESOLVE_DLL_REFERENCES	0x00000001
#define	LOAD_LIBRARY_AS_DATAFILE	0x00000002
#define	LOAD_WITH_ALTERED_SEARCH_PATH	0x00000008

730
typedef PLDT_ENTRY LPLDT_ENTRY;
731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748

typedef enum _GET_FILEEX_INFO_LEVELS {
    GetFileExInfoStandard
} GET_FILEEX_INFO_LEVELS;

typedef struct _WIN32_FILE_ATTRIBUTES_DATA {
    DWORD    dwFileAttributes;
    FILETIME ftCreationTime;
    FILETIME ftLastAccessTime;
    FILETIME ftLastWriteTime;
    DWORD    nFileSizeHigh;
    DWORD    nFileSizeLow;
} WIN32_FILE_ATTRIBUTE_DATA, *LPWIN32_FILE_ATTRIBUTE_DATA;

/*
 * This one seems to be a Win32 only definition. It also is defined with
 * WINAPI instead of CALLBACK in the windows headers.
 */
749
typedef DWORD (CALLBACK *LPPROGRESS_ROUTINE)(LARGE_INTEGER, LARGE_INTEGER, LARGE_INTEGER,
750 751
                                           LARGE_INTEGER, DWORD, DWORD, HANDLE,
                                           HANDLE, LPVOID);
752 753


Alexandre Julliard's avatar
Alexandre Julliard committed
754 755 756 757
#define WAIT_FAILED		0xffffffff
#define WAIT_OBJECT_0		0
#define WAIT_ABANDONED		STATUS_ABANDONED_WAIT_0
#define WAIT_ABANDONED_0	STATUS_ABANDONED_WAIT_0
Alexandre Julliard's avatar
Alexandre Julliard committed
758
#define WAIT_IO_COMPLETION	STATUS_USER_APC
Alexandre Julliard's avatar
Alexandre Julliard committed
759
#define WAIT_TIMEOUT		STATUS_TIMEOUT
760
#define STILL_ACTIVE            STATUS_PENDING
Alexandre Julliard's avatar
Alexandre Julliard committed
761

Alexandre Julliard's avatar
Alexandre Julliard committed
762 763 764 765
#define FILE_BEGIN              0
#define FILE_CURRENT            1
#define FILE_END                2

Alexandre Julliard's avatar
Alexandre Julliard committed
766 767 768 769
#define FILE_MAP_COPY                   0x00000001
#define FILE_MAP_WRITE                  0x00000002
#define FILE_MAP_READ                   0x00000004
#define FILE_MAP_ALL_ACCESS             0x000f001f
770
#define FILE_MAP_EXECUTE                0x00000020
Alexandre Julliard's avatar
Alexandre Julliard committed
771

Alexandre Julliard's avatar
Alexandre Julliard committed
772 773 774 775
#define MOVEFILE_REPLACE_EXISTING       0x00000001
#define MOVEFILE_COPY_ALLOWED           0x00000002
#define MOVEFILE_DELAY_UNTIL_REBOOT     0x00000004

776 777 778
#define REPLACEFILE_WRITE_THROUGH       0x00000001
#define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002

Alexandre Julliard's avatar
Alexandre Julliard committed
779 780 781
#define FS_CASE_SENSITIVE               FILE_CASE_SENSITIVE_SEARCH
#define FS_CASE_IS_PRESERVED            FILE_CASE_PRESERVED_NAMES
#define FS_UNICODE_STORED_ON_DISK       FILE_UNICODE_ON_DISK
782 783 784
#define FS_PERSISTENT_ACLS              FILE_PERSISTENT_ACLS
#define FS_VOL_IS_COMPRESSED            FILE_VOLUME_IS_COMPRESSED
#define FS_FILE_COMPRESSION             FILE_FILE_COMPRESSION
Alexandre Julliard's avatar
Alexandre Julliard committed
785

786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808
#define EXCEPTION_ACCESS_VIOLATION          STATUS_ACCESS_VIOLATION
#define EXCEPTION_DATATYPE_MISALIGNMENT     STATUS_DATATYPE_MISALIGNMENT
#define EXCEPTION_BREAKPOINT                STATUS_BREAKPOINT
#define EXCEPTION_SINGLE_STEP               STATUS_SINGLE_STEP
#define EXCEPTION_ARRAY_BOUNDS_EXCEEDED     STATUS_ARRAY_BOUNDS_EXCEEDED
#define EXCEPTION_FLT_DENORMAL_OPERAND      STATUS_FLOAT_DENORMAL_OPERAND
#define EXCEPTION_FLT_DIVIDE_BY_ZERO        STATUS_FLOAT_DIVIDE_BY_ZERO
#define EXCEPTION_FLT_INEXACT_RESULT        STATUS_FLOAT_INEXACT_RESULT
#define EXCEPTION_FLT_INVALID_OPERATION     STATUS_FLOAT_INVALID_OPERATION
#define EXCEPTION_FLT_OVERFLOW              STATUS_FLOAT_OVERFLOW
#define EXCEPTION_FLT_STACK_CHECK           STATUS_FLOAT_STACK_CHECK
#define EXCEPTION_FLT_UNDERFLOW             STATUS_FLOAT_UNDERFLOW
#define EXCEPTION_INT_DIVIDE_BY_ZERO        STATUS_INTEGER_DIVIDE_BY_ZERO
#define EXCEPTION_INT_OVERFLOW              STATUS_INTEGER_OVERFLOW
#define EXCEPTION_PRIV_INSTRUCTION          STATUS_PRIVILEGED_INSTRUCTION
#define EXCEPTION_IN_PAGE_ERROR             STATUS_IN_PAGE_ERROR
#define EXCEPTION_ILLEGAL_INSTRUCTION       STATUS_ILLEGAL_INSTRUCTION
#define EXCEPTION_NONCONTINUABLE_EXCEPTION  STATUS_NONCONTINUABLE_EXCEPTION
#define EXCEPTION_STACK_OVERFLOW            STATUS_STACK_OVERFLOW
#define EXCEPTION_INVALID_DISPOSITION       STATUS_INVALID_DISPOSITION
#define EXCEPTION_GUARD_PAGE                STATUS_GUARD_PAGE_VIOLATION
#define EXCEPTION_INVALID_HANDLE            STATUS_INVALID_HANDLE
#define CONTROL_C_EXIT                      STATUS_CONTROL_C_EXIT
Alexandre Julliard's avatar
Alexandre Julliard committed
809

Alexandre Julliard's avatar
Alexandre Julliard committed
810 811 812
#define HANDLE_FLAG_INHERIT             0x00000001
#define HANDLE_FLAG_PROTECT_FROM_CLOSE  0x00000002

813 814
#define HINSTANCE_ERROR 32

Alexandre Julliard's avatar
Alexandre Julliard committed
815 816 817 818 819 820 821 822 823
#define THREAD_PRIORITY_LOWEST          THREAD_BASE_PRIORITY_MIN
#define THREAD_PRIORITY_BELOW_NORMAL    (THREAD_PRIORITY_LOWEST+1)
#define THREAD_PRIORITY_NORMAL          0
#define THREAD_PRIORITY_HIGHEST         THREAD_BASE_PRIORITY_MAX
#define THREAD_PRIORITY_ABOVE_NORMAL    (THREAD_PRIORITY_HIGHEST-1)
#define THREAD_PRIORITY_ERROR_RETURN    (0x7fffffff)
#define THREAD_PRIORITY_TIME_CRITICAL   THREAD_BASE_PRIORITY_LOWRT
#define THREAD_PRIORITY_IDLE            THREAD_BASE_PRIORITY_IDLE

824 825 826 827 828 829 830 831 832
/* flags to FormatMessage */
#define	FORMAT_MESSAGE_ALLOCATE_BUFFER	0x00000100
#define	FORMAT_MESSAGE_IGNORE_INSERTS	0x00000200
#define	FORMAT_MESSAGE_FROM_STRING	0x00000400
#define	FORMAT_MESSAGE_FROM_HMODULE	0x00000800
#define	FORMAT_MESSAGE_FROM_SYSTEM	0x00001000
#define	FORMAT_MESSAGE_ARGUMENT_ARRAY	0x00002000
#define	FORMAT_MESSAGE_MAX_WIDTH_MASK	0x000000FF

833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935
/* flags to ACTCTX[AW] */
#define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID  (0x00000001)
#define ACTCTX_FLAG_LANGID_VALID                  (0x00000002)
#define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID      (0x00000004)
#define ACTCTX_FLAG_RESOURCE_NAME_VALID           (0x00000008)
#define ACTCTX_FLAG_SET_PROCESS_DEFAULT           (0x00000010)
#define ACTCTX_FLAG_APPLICATION_NAME_VALID        (0x00000020)
#define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF         (0x00000040)
#define ACTCTX_FLAG_HMODULE_VALID                 (0x00000080)

/* flags to DeactiveActCtx */
#define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION  (0x00000001)

/* flags to FindActCtxSection{Guid,String[AW]} */
#define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX            (0x00000001)
#define FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS              (0x00000002)
#define FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA  (0x00000004)

/* flags to QueryActCtxW */
#define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX  (0x00000004)
#define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE  (0x00000008)
#define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS  (0x00000010)
#define QUERY_ACTCTX_FLAG_NO_ADDREF          (0x80000000)

typedef struct tagACTCTXA {
    ULONG   cbSize;
    DWORD   dwFlags;
    LPCSTR  lpSource;
    USHORT  wProcessorArchitecture;
    LANGID  wLangId;
    LPCSTR  lpAssemblyDirectory;
    LPCSTR  lpResourceName;
    LPCSTR  lpApplicationName;
    HMODULE hModule;
} ACTCTXA, *PACTCTXA;

typedef struct tagACTCTXW {
    ULONG   cbSize;
    DWORD   dwFlags;
    LPCWSTR lpSource;
    USHORT  wProcessorArchitecture;
    LANGID  wLangId;
    LPCWSTR lpAssemblyDirectory;
    LPCWSTR lpResourceName;
    LPCWSTR lpApplicationName;
    HMODULE hModule;
} ACTCTXW, *PACTCTXW;

DECL_WINELIB_TYPE_AW(ACTCTX)
DECL_WINELIB_TYPE_AW(PACTCTX)

typedef const ACTCTXA *PCACTCTXA;
typedef const ACTCTXW *PCACTCTXW;
DECL_WINELIB_TYPE_AW(PCACTCTX)

typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 {
    ULONG  cbSize;
    ULONG  ulDataFormatVersion;
    PVOID  lpData;
    ULONG  ulLength;
    PVOID  lpSectionGlobalData;
    ULONG  ulSectionGlobalDataLength;
    PVOID  lpSectionBase;
    ULONG  ulSectionTotalLength;
    HANDLE hActCtx;
    ULONG  ulAssemblyRosterIndex;
} ACTCTX_SECTION_KEYED_DATA_2600, *PACTCTX_SECTION_KEYED_DATA_2600;
typedef const ACTCTX_SECTION_KEYED_DATA_2600 *PCACTCTX_SECTION_KEYED_DATA_2600;

typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
    PVOID lpInformation;
    PVOID lpSectionBase;
    ULONG ulSectionLength;
    PVOID lpSectionGlobalDataBase;
    ULONG ulSectionGlobalDataLength;
} ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, *PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;

typedef struct tagACTCTX_SECTION_KEYED_DATA {
    ULONG  cbSize;
    ULONG  ulDataFormatVersion;
    PVOID  lpData;
    ULONG  ulLength;
    PVOID  lpSectionGlobalData;
    ULONG  ulSectionGlobalDataLength;
    PVOID  lpSectionBase;
    ULONG  ulSectionTotalLength;
    HANDLE hActCtx;
    ULONG  ulAssemblyRosterIndex;

    /* Non 2600 extra fields */
    ULONG ulFlags;
    ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
} ACTCTX_SECTION_KEYED_DATA, *PACTCTX_SECTION_KEYED_DATA;
typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA;

typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION {
    HANDLE hActCtx;
    DWORD  dwFlags;
} ACTIVATION_CONTEXT_BASIC_INFORMATION, *PACTIVATION_CONTEXT_BASIC_INFORMATION;

typedef BOOL (WINAPI *PQUERYACTCTXW_FUNC)(DWORD,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T *);

936 937
typedef struct tagCOMSTAT
{
938 939 940 941 942 943 944 945
    DWORD fCtsHold : 1;
    DWORD fDsrHold : 1;
    DWORD fRlsdHold : 1;
    DWORD fXoffHold : 1;
    DWORD fXoffSent : 1;
    DWORD fEof : 1;
    DWORD fTxim : 1;
    DWORD fReserved : 25;
946 947
    DWORD cbInQue;
    DWORD cbOutQue;
948
} COMSTAT, *LPCOMSTAT;
949

950
typedef struct tagDCB
951 952 953
{
    DWORD DCBlength;
    DWORD BaudRate;
954 955 956 957 958 959 960 961 962 963 964 965 966 967
    unsigned fBinary               :1;
    unsigned fParity               :1;
    unsigned fOutxCtsFlow          :1;
    unsigned fOutxDsrFlow          :1;
    unsigned fDtrControl           :2;
    unsigned fDsrSensitivity       :1;
    unsigned fTXContinueOnXoff     :1;
    unsigned fOutX                 :1;
    unsigned fInX                  :1;
    unsigned fErrorChar            :1;
    unsigned fNull                 :1;
    unsigned fRtsControl           :2;
    unsigned fAbortOnError         :1;
    unsigned fDummy2               :17;
968 969 970 971 972 973 974 975 976 977 978
    WORD wReserved;
    WORD XonLim;
    WORD XoffLim;
    BYTE ByteSize;
    BYTE Parity;
    BYTE StopBits;
    char XonChar;
    char XoffChar;
    char ErrorChar;
    char EofChar;
    char EvtChar;
979
    WORD wReserved1;
980
} DCB, *LPDCB;
981

982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085
typedef struct tagCOMMCONFIG {
	DWORD dwSize;
	WORD  wVersion;
	WORD  wReserved;
	DCB   dcb;
	DWORD dwProviderSubType;
	DWORD dwProviderOffset;
	DWORD dwProviderSize;
	DWORD wcProviderData[1];
} COMMCONFIG, *LPCOMMCONFIG;

typedef struct tagCOMMPROP {
	WORD  wPacketLength;
	WORD  wPacketVersion;
	DWORD dwServiceMask;
	DWORD dwReserved1;
	DWORD dwMaxTxQueue;
	DWORD dwMaxRxQueue;
	DWORD dwMaxBaud;
	DWORD dwProvSubType;
	DWORD dwProvCapabilities;
	DWORD dwSettableParams;
	DWORD dwSettableBaud;
	WORD  wSettableData;
	WORD  wSettableStopParity;
	DWORD dwCurrentTxQueue;
	DWORD dwCurrentRxQueue;
	DWORD dwProvSpec1;
	DWORD dwProvSpec2;
	WCHAR wcProvChar[1];
} COMMPROP, *LPCOMMPROP;

#define SP_SERIALCOMM ((DWORD)1)

#define BAUD_075     ((DWORD)0x01)
#define BAUD_110     ((DWORD)0x02)
#define BAUD_134_5   ((DWORD)0x04)
#define BAUD_150     ((DWORD)0x08)
#define BAUD_300     ((DWORD)0x10)
#define BAUD_600     ((DWORD)0x20)
#define BAUD_1200    ((DWORD)0x40)
#define BAUD_1800    ((DWORD)0x80)
#define BAUD_2400    ((DWORD)0x100)
#define BAUD_4800    ((DWORD)0x200)
#define BAUD_7200    ((DWORD)0x400)
#define BAUD_9600    ((DWORD)0x800)
#define BAUD_14400   ((DWORD)0x1000)
#define BAUD_19200   ((DWORD)0x2000)
#define BAUD_38400   ((DWORD)0x4000)
#define BAUD_56K     ((DWORD)0x8000)
#define BAUD_57600   ((DWORD)0x40000)
#define BAUD_115200  ((DWORD)0x20000)
#define BAUD_128K    ((DWORD)0x10000)
#define BAUD_USER    ((DWORD)0x10000000)

#define PST_FAX            ((DWORD)0x21)
#define PST_LAT            ((DWORD)0x101)
#define PST_MODEM          ((DWORD)0x06)
#define PST_NETWORK_BRIDGE ((DWORD)0x100)
#define PST_PARALLEL_PORT  ((DWORD)0x02)
#define PST_RS232          ((DWORD)0x01)
#define PST_RS442          ((DWORD)0x03)
#define PST_RS423          ((DWORD)0x04)
#define PST_RS449          ((DWORD)0x06)
#define PST_SCANNER        ((DWORD)0x22)
#define PST_TCPIP_TELNET   ((DWORD)0x102)
#define PST_UNSPECIFIED    ((DWORD)0x00)
#define PST_X25            ((DWORD)0x103)

#define PCF_16BITMODE     ((DWORD)0x200)
#define PCF_DTRDSR        ((DWORD)0x01)
#define PCF_INTTIMEOUTS   ((DWORD)0x80)
#define PCF_PARITY_CHECK  ((DWORD)0x08)
#define PCF_RLSD          ((DWORD)0x04)
#define PCF_RTSCTS        ((DWORD)0x02)
#define PCF_SETXCHAR      ((DWORD)0x20)
#define PCF_SPECIALCHARS  ((DWORD)0x100)
#define PCF_TOTALTIMEOUTS ((DWORD)0x40)
#define PCF_XONXOFF       ((DWORD)0x10)

#define SP_BAUD         ((DWORD)0x02)
#define SP_DATABITS     ((DWORD)0x04)
#define SP_HANDSHAKING  ((DWORD)0x10)
#define SP_PARITY       ((DWORD)0x01)
#define SP_PARITY_CHECK ((DWORD)0x20)
#define SP_RLSD         ((DWORD)0x40)
#define SP_STOPBITS     ((DWORD)0x08)

#define DATABITS_5   ((DWORD)0x01)
#define DATABITS_6   ((DWORD)0x02)
#define DATABITS_7   ((DWORD)0x04)
#define DATABITS_8   ((DWORD)0x08)
#define DATABITS_16  ((DWORD)0x10)
#define DATABITS_16X ((DWORD)0x20)

#define STOPBITS_10 ((DWORD)1)
#define STOPBITS_15 ((DWORD)2)
#define STOPBITS_20 ((DWORD)4)

#define PARITY_NONE  ((DWORD)0x100)
#define PARITY_ODD   ((DWORD)0x200)
#define PARITY_EVEN  ((DWORD)0x400)
#define PARITY_MARK  ((DWORD)0x800)
#define PARITY_SPACE ((DWORD)0x1000)
1086 1087 1088 1089 1090 1091 1092 1093

typedef struct tagCOMMTIMEOUTS {
	DWORD	ReadIntervalTimeout;
	DWORD	ReadTotalTimeoutMultiplier;
	DWORD	ReadTotalTimeoutConstant;
	DWORD	WriteTotalTimeoutMultiplier;
	DWORD	WriteTotalTimeoutConstant;
} COMMTIMEOUTS,*LPCOMMTIMEOUTS;
1094

1095 1096 1097 1098 1099
#define GET_TAPE_MEDIA_INFORMATION 0
#define GET_TAPE_DRIVE_INFORMATION 1
#define SET_TAPE_MEDIA_INFORMATION 0
#define SET_TAPE_DRIVE_INFORMATION 1

1100 1101
typedef void (CALLBACK *PAPCFUNC)(ULONG_PTR);
typedef void (CALLBACK *PTIMERAPCROUTINE)(LPVOID,DWORD,DWORD);
1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115

typedef enum _COMPUTER_NAME_FORMAT
{
	ComputerNameNetBIOS,
	ComputerNameDnsHostname,
	ComputerNameDnsDomain,
	ComputerNameDnsFullyQualified,
	ComputerNamePhysicalNetBIOS,
	ComputerNamePhysicalDnsHostname,
	ComputerNamePhysicalDnsDomain,
	ComputerNamePhysicalDnsFullyQualified,
	ComputerNameMax
} COMPUTER_NAME_FORMAT;

1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159
#define HW_PROFILE_GUIDLEN	39
#define MAX_PROFILE_LEN		80

#define DOCKINFO_UNDOCKED	0x1
#define DOCKINFO_DOCKED		0x2
#define DOCKINFO_USER_SUPPLIED	0x4
#define DOCKINFO_USER_UNDOCKED	(DOCKINFO_USER_SUPPLIED | DOCKINFO_UNDOCKED)
#define DOCKINFO_USER_DOCKED	(DOCKINFO_USER_SUPPLIED | DOCKINFO_DOCKED)

typedef struct tagHW_PROFILE_INFOA {
    DWORD dwDockInfo;
    CHAR  szHwProfileGuid[HW_PROFILE_GUIDLEN];
    CHAR  szHwProfileName[MAX_PROFILE_LEN];
} HW_PROFILE_INFOA, *LPHW_PROFILE_INFOA;

typedef struct tagHW_PROFILE_INFOW {
    DWORD dwDockInfo;
    WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
    WCHAR szHwProfileName[MAX_PROFILE_LEN];
} HW_PROFILE_INFOW, *LPHW_PROFILE_INFOW;

DECL_WINELIB_TYPE_AW(HW_PROFILE_INFO)
DECL_WINELIB_TYPE_AW(LPHW_PROFILE_INFO)

/* Stream data structures and defines */
/*the types of backup data -- WIN32_STREAM_ID.dwStreamId below*/
#define BACKUP_INVALID        0
#define BACKUP_DATA           1
#define BACKUP_EA_DATA        2
#define BACKUP_SECURITY_DATA  3
#define BACKUP_ALTERNATE_DATA 4
#define BACKUP_LINK           5
#define BACKUP_PROPERTY_DATA  6
#define BACKUP_OBJECT_ID      7
#define BACKUP_REPARSE_DATA   8
#define BACKUP_SPARSE_BLOCK   9

/*flags for WIN32_STREAM_ID.dwStreamAttributes below*/
#define STREAM_NORMAL_ATTRIBUTE    0
#define STREAM_MODIFIED_WHEN_READ  1
#define STREAM_CONTAINS_SECURITY   2
#define STREAM_CONTAINS_PROPERTIES 4
#define STREAM_SPARSE_ATTRIBUTE    8

1160
#include <pshpack8.h>
1161 1162 1163
typedef struct _WIN32_STREAM_ID {
	DWORD   dwStreamId;
	DWORD   dwStreamAttributes;
1164
	LARGE_INTEGER DECLSPEC_ALIGN(8) Size;
1165 1166 1167
	DWORD   dwStreamNameSize;
	WCHAR   cStreamName[ANYSIZE_ARRAY];
} WIN32_STREAM_ID, *LPWIN32_STREAM_ID;
1168
#include <poppack.h>
Alexandre Julliard's avatar
Alexandre Julliard committed
1169

1170 1171 1172 1173 1174 1175 1176 1177 1178 1179

/* GetBinaryType return values.
 */

#define SCS_32BIT_BINARY    0
#define SCS_DOS_BINARY      1
#define SCS_WOW_BINARY      2
#define SCS_PIF_BINARY      3
#define SCS_POSIX_BINARY    4
#define SCS_OS216_BINARY    5
1180
#define SCS_64BIT_BINARY    6
1181

1182 1183 1184 1185 1186 1187 1188
/* flags for DefineDosDevice */
#define DDD_RAW_TARGET_PATH         0x00000001
#define DDD_REMOVE_DEFINITION       0x00000002
#define DDD_EXACT_MATCH_ON_REMOVE   0x00000004
#define DDD_NO_BROADCAST_SYSTEM     0x00000008
#define DDD_LUID_BROADCAST_DRIVE    0x00000010

1189
BOOL        WINAPI ActivateActCtx(HANDLE,ULONG_PTR *);
1190
BOOL        WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
1191
BOOL        WINAPI AddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
1192 1193 1194
BOOL        WINAPI AddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
BOOL        WINAPI AddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
BOOL        WINAPI AddAce(PACL,DWORD,DWORD,LPVOID,DWORD);
1195 1196 1197
ATOM        WINAPI AddAtomA(LPCSTR);
ATOM        WINAPI AddAtomW(LPCWSTR);
#define     AddAtom WINELIB_NAME_AW(AddAtom)
1198
BOOL        WINAPI AddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
1199
VOID        WINAPI AddRefActCtx(HANDLE);
1200
PVOID       WINAPI AddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
1201
BOOL        WINAPI AdjustTokenGroups(HANDLE,BOOL,PTOKEN_GROUPS,DWORD,PTOKEN_GROUPS,PDWORD);
1202
BOOL        WINAPI AttachThreadInput(DWORD,DWORD,BOOL);
1203
BOOL        WINAPI AccessCheck(PSECURITY_DESCRIPTOR,HANDLE,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,LPDWORD,LPDWORD,LPBOOL);
1204 1205 1206 1207
BOOL        WINAPI AccessCheckAndAuditAlarmA(LPCSTR,LPVOID,LPSTR,LPSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,LPDWORD,LPBOOL,LPBOOL);
BOOL        WINAPI AccessCheckAndAuditAlarmW(LPCWSTR,LPVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,LPDWORD,LPBOOL,LPBOOL);
#define     AccessCheckAndAuditAlarm WINELIB_NAME_AW(AccessCheckAndAuditAlarm)
BOOL        WINAPI AccessCheckByType(PSECURITY_DESCRIPTOR,PSID,HANDLE,DWORD,POBJECT_TYPE_LIST,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,LPDWORD,LPDWORD,LPBOOL);
1208 1209 1210
BOOL        WINAPI AdjustTokenPrivileges(HANDLE,BOOL,LPVOID,DWORD,LPVOID,LPDWORD);
BOOL        WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
BOOL        WINAPI AllocateLocallyUniqueId(PLUID);
1211 1212
BOOL        WINAPI AreAllAccessesGranted(DWORD,DWORD);
BOOL        WINAPI AreAnyAccessesGranted(DWORD,DWORD);
1213
BOOL        WINAPI AreFileApisANSI(void);
1214
BOOL        WINAPI AssignProcessToJobObject(HANDLE,HANDLE);
1215 1216 1217
BOOL        WINAPI BackupEventLogA(HANDLE,LPCSTR);
BOOL        WINAPI BackupEventLogW(HANDLE,LPCWSTR);
#define     BackupEventLog WINELIB_NAME_AW(BackupEventLog)
1218 1219 1220
BOOL        WINAPI BackupRead(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
BOOL        WINAPI BackupSeek(HANDLE,DWORD,DWORD,LPDWORD,LPDWORD,LPVOID*);
BOOL        WINAPI BackupWrite(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
1221
BOOL        WINAPI Beep(DWORD,DWORD);
1222 1223 1224
HANDLE      WINAPI BeginUpdateResourceA(LPCSTR,BOOL);
HANDLE      WINAPI BeginUpdateResourceW(LPCWSTR,BOOL);
#define     BeginUpdateResource WINELIB_NAME_AW(BeginUpdateResource)
1225
BOOL        WINAPI BindIoCompletionCallback(HANDLE,LPOVERLAPPED_COMPLETION_ROUTINE,ULONG);
1226 1227 1228 1229 1230 1231
BOOL        WINAPI BuildCommDCBA(LPCSTR,LPDCB);
BOOL        WINAPI BuildCommDCBW(LPCWSTR,LPDCB);
#define     BuildCommDCB WINELIB_NAME_AW(BuildCommDCB)
BOOL        WINAPI BuildCommDCBAndTimeoutsA(LPCSTR,LPDCB,LPCOMMTIMEOUTS);
BOOL        WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR,LPDCB,LPCOMMTIMEOUTS);
#define     BuildCommDCBAndTimeouts WINELIB_NAME_AW(BuildCommDCBAndTimeouts)
1232 1233 1234
BOOL        WINAPI CallNamedPipeA(LPCSTR,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,DWORD);
BOOL        WINAPI CallNamedPipeW(LPCWSTR,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,DWORD);
#define     CallNamedPipe WINELIB_NAME_AW(CallNamedPipe)
1235
BOOL        WINAPI CancelIo(HANDLE);
1236
BOOL        WINAPI CancelWaitableTimer(HANDLE);
1237
BOOL        WINAPI CheckTokenMembership(HANDLE,PSID,PBOOL);
1238
BOOL        WINAPI ClearCommBreak(HANDLE);
1239
BOOL        WINAPI ClearCommError(HANDLE,LPDWORD,LPCOMSTAT);
1240 1241 1242 1243
BOOL        WINAPI ClearEventLogA(HANDLE,LPCSTR);
BOOL        WINAPI ClearEventLogW(HANDLE,LPCWSTR);
#define     ClearEventLog WINELIB_NAME_AW(ClearEventLog)
BOOL        WINAPI CloseEventLog(HANDLE);
1244
BOOL        WINAPI CloseHandle(HANDLE);
1245 1246
BOOL        WINAPI CommConfigDialogA(LPCSTR,HWND,LPCOMMCONFIG);
BOOL        WINAPI CommConfigDialogW(LPCWSTR,HWND,LPCOMMCONFIG);
1247
#define     CommConfigDialog WINELIB_NAME_AW(CommConfigDialog)
1248
BOOL        WINAPI ConnectNamedPipe(HANDLE,LPOVERLAPPED);
1249 1250 1251 1252
BOOL        WINAPI ContinueDebugEvent(DWORD,DWORD,DWORD);
HANDLE      WINAPI ConvertToGlobalHandle(HANDLE hSrc);
BOOL        WINAPI CopyFileA(LPCSTR,LPCSTR,BOOL);
BOOL        WINAPI CopyFileW(LPCWSTR,LPCWSTR,BOOL);
1253
#define     CopyFile WINELIB_NAME_AW(CopyFile)
1254 1255
BOOL        WINAPI CopyFileExA(LPCSTR, LPCSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD);
BOOL        WINAPI CopyFileExW(LPCWSTR, LPCWSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD);
1256
#define     CopyFileEx WINELIB_NAME_AW(CopyFileEx)
1257
BOOL        WINAPI CopySid(DWORD,PSID,PSID);
1258
INT         WINAPI CompareFileTime(const FILETIME*,const FILETIME*);
1259 1260 1261
BOOL        WINAPI ConvertFiberToThread(void);
LPVOID      WINAPI ConvertThreadToFiber(LPVOID);
LPVOID      WINAPI ConvertThreadToFiberEx(LPVOID,DWORD);
1262 1263 1264
HANDLE      WINAPI CreateActCtxA(PCACTCTXA);
HANDLE      WINAPI CreateActCtxW(PCACTCTXW);
#define     CreateActCtx WINELIB_NAME_AW(CreateActCtx)
1265 1266 1267 1268 1269 1270
BOOL        WINAPI CreateDirectoryA(LPCSTR,LPSECURITY_ATTRIBUTES);
BOOL        WINAPI CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES);
#define     CreateDirectory WINELIB_NAME_AW(CreateDirectory)
BOOL        WINAPI CreateDirectoryExA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES);
BOOL        WINAPI CreateDirectoryExW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES);
#define     CreateDirectoryEx WINELIB_NAME_AW(CreateDirectoryEx)
1271 1272
HANDLE      WINAPI CreateEventA(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCSTR);
HANDLE      WINAPI CreateEventW(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCWSTR);
1273
#define     CreateEvent WINELIB_NAME_AW(CreateEvent)
1274 1275
LPVOID      WINAPI CreateFiber(SIZE_T,LPFIBER_START_ROUTINE,LPVOID);
LPVOID      WINAPI CreateFiberEx(SIZE_T,SIZE_T,DWORD,LPFIBER_START_ROUTINE,LPVOID);
1276 1277
HANDLE      WINAPI CreateFileA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE);
HANDLE      WINAPI CreateFileW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE);
1278
#define     CreateFile WINELIB_NAME_AW(CreateFile)
1279 1280
HANDLE      WINAPI CreateFileMappingA(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCSTR);
HANDLE      WINAPI CreateFileMappingW(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCWSTR);
1281
#define     CreateFileMapping WINELIB_NAME_AW(CreateFileMapping)
1282 1283 1284 1285
HANDLE      WINAPI CreateIoCompletionPort(HANDLE,HANDLE,ULONG_PTR,DWORD);
HANDLE      WINAPI CreateJobObjectA(LPSECURITY_ATTRIBUTES,LPCSTR);
HANDLE      WINAPI CreateJobObjectW(LPSECURITY_ATTRIBUTES,LPCWSTR);
#define     CreateJobObject WINELIB_NAME_AW(CreateJobObject)
1286 1287 1288
HANDLE      WINAPI CreateMailslotA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
HANDLE      WINAPI CreateMailslotW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
#define     CreateMailslot WINELIB_NAME_AW(CreateMailslot)
1289 1290
HANDLE      WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
HANDLE      WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
1291
#define     CreateMutex WINELIB_NAME_AW(CreateMutex)
1292 1293 1294
HANDLE      WINAPI CreateNamedPipeA(LPCSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
HANDLE      WINAPI CreateNamedPipeW(LPCWSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
#define     CreateNamedPipe WINELIB_NAME_AW(CreateNamedPipe)
1295
BOOL        WINAPI CreatePipe(PHANDLE,PHANDLE,LPSECURITY_ATTRIBUTES,DWORD);
1296 1297
BOOL        WINAPI CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,
                                               PSECURITY_DESCRIPTOR*,BOOL,HANDLE,PGENERIC_MAPPING);
1298 1299 1300 1301 1302 1303
BOOL        WINAPI CreateProcessA(LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,
                                  LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCSTR,
                                  LPSTARTUPINFOA,LPPROCESS_INFORMATION);
BOOL        WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,
                                  LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCWSTR,
                                  LPSTARTUPINFOW,LPPROCESS_INFORMATION);
1304
#define     CreateProcess WINELIB_NAME_AW(CreateProcess)
1305 1306 1307 1308 1309
BOOL        WINAPI CreateProcessAsUserA(HANDLE,LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,
                                        BOOL,DWORD,LPVOID,LPCSTR,LPSTARTUPINFOA,LPPROCESS_INFORMATION);
BOOL        WINAPI CreateProcessAsUserW(HANDLE,LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,
                                        BOOL,DWORD,LPVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
#define     CreateProcessAsUser WINELIB_NAME_AW(CreateProcessAsUser)
1310
HANDLE      WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
1311 1312
HANDLE      WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCSTR);
HANDLE      WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR);
1313
#define     CreateSemaphore WINELIB_NAME_AW(CreateSemaphore)
1314
DWORD       WINAPI CreateTapePartition(HANDLE,DWORD,DWORD,DWORD);
1315
HANDLE      WINAPI CreateThread(LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
1316
HANDLE      WINAPI CreateTimerQueue(void);
1317
BOOL        WINAPI CreateTimerQueueTimer(PHANDLE,HANDLE,WAITORTIMERCALLBACK,PVOID,DWORD,DWORD,ULONG);
1318 1319 1320
HANDLE      WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
HANDLE      WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
#define     CreateWaitableTimer WINELIB_NAME_AW(CreateWaitableTimer)
1321
BOOL        WINAPI DeactivateActCtx(DWORD,ULONG_PTR);
Alexandre Julliard's avatar
Alexandre Julliard committed
1322
BOOL        WINAPI DebugActiveProcess(DWORD);
1323
BOOL        WINAPI DebugActiveProcessStop(DWORD);
Alexandre Julliard's avatar
Alexandre Julliard committed
1324
void        WINAPI DebugBreak(void);
1325 1326
BOOL        WINAPI DebugBreakProcess(HANDLE);
BOOL        WINAPI DebugSetProcessKillOnExit(BOOL);
1327 1328 1329
BOOL        WINAPI DecryptFileA(LPCSTR,DWORD);
BOOL        WINAPI DecryptFileW(LPCWSTR,DWORD);
#define     DecryptFile WINELIB_NAME_AW(DecryptFile)
1330 1331 1332
BOOL        WINAPI DefineDosDeviceA(DWORD,LPCSTR,LPCSTR);
BOOL        WINAPI DefineDosDeviceW(DWORD,LPCWSTR,LPCWSTR);
#define     DefineDosDevice WINELIB_NAME_AW(DefineDosDevice)
1333
#define     DefineHandleTable(w) ((w),TRUE)
1334
BOOL        WINAPI DeleteAce(PACL,DWORD);
1335
ATOM        WINAPI DeleteAtom(ATOM);
1336
void        WINAPI DeleteCriticalSection(CRITICAL_SECTION *lpCrit);
1337
void        WINAPI DeleteFiber(LPVOID);
1338 1339 1340
BOOL        WINAPI DeleteFileA(LPCSTR);
BOOL        WINAPI DeleteFileW(LPCWSTR);
#define     DeleteFile WINELIB_NAME_AW(DeleteFile)
1341
BOOL        WINAPI DeleteTimerQueueEx(HANDLE,HANDLE);
1342
BOOL        WINAPI DeleteTimerQueueTimer(HANDLE,HANDLE,HANDLE);
1343 1344 1345
BOOL        WINAPI DeleteVolumeMountPointA(LPCSTR);
BOOL        WINAPI DeleteVolumeMountPointW(LPCWSTR);
#define     DeleteVolumeMountPoint WINELIB_NAME_AW(DeleteVolumeMountPoint)
1346
BOOL        WINAPI DeregisterEventSource(HANDLE);
1347
BOOL        WINAPI DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR*);
1348
BOOL        WINAPI DeviceIoControl(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
Alexandre Julliard's avatar
Alexandre Julliard committed
1349
BOOL        WINAPI DisableThreadLibraryCalls(HMODULE);
1350
BOOL        WINAPI DisconnectNamedPipe(HANDLE);
1351 1352 1353
BOOL        WINAPI DnsHostnameToComputerNameA(LPCSTR,LPSTR,LPDWORD);
BOOL        WINAPI DnsHostnameToComputerNameW(LPCWSTR,LPWSTR,LPDWORD);
#define     DnsHostnameToComputerName WINELIB_NAME_AW(DnsHostnameToComputerName)
Alexandre Julliard's avatar
Alexandre Julliard committed
1354 1355
BOOL        WINAPI DosDateTimeToFileTime(WORD,WORD,LPFILETIME);
BOOL        WINAPI DuplicateHandle(HANDLE,HANDLE,HANDLE,HANDLE*,DWORD,BOOL,DWORD);
1356 1357 1358
BOOL        WINAPI DuplicateToken(HANDLE,SECURITY_IMPERSONATION_LEVEL,PHANDLE);
BOOL        WINAPI DuplicateTokenEx(HANDLE,DWORD,LPSECURITY_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,
                                    TOKEN_TYPE,PHANDLE);
1359
BOOL        WINAPI EscapeCommFunction(HANDLE,UINT);
1360 1361 1362
BOOL        WINAPI EncryptFileA(LPCSTR);
BOOL        WINAPI EncryptFileW(LPCWSTR);
#define     EncryptFile WINELIB_NAME_AW(EncryptFile)
1363 1364 1365
BOOL        WINAPI EndUpdateResourceA(HANDLE,BOOL);
BOOL        WINAPI EndUpdateResourceW(HANDLE,BOOL);
#define     EndUpdateResource WINELIB_NAME_AW(EndUpdateResource)
1366
void        WINAPI EnterCriticalSection(CRITICAL_SECTION *lpCrit);
1367 1368
BOOL        WINAPI EnumResourceLanguagesA(HMODULE,LPCSTR,LPCSTR,ENUMRESLANGPROCA,LONG_PTR);
BOOL        WINAPI EnumResourceLanguagesW(HMODULE,LPCWSTR,LPCWSTR,ENUMRESLANGPROCW,LONG_PTR);
1369
#define     EnumResourceLanguages WINELIB_NAME_AW(EnumResourceLanguages)
1370 1371
BOOL        WINAPI EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROCA,LONG_PTR);
BOOL        WINAPI EnumResourceNamesW(HMODULE,LPCWSTR,ENUMRESNAMEPROCW,LONG_PTR);
1372
#define     EnumResourceNames WINELIB_NAME_AW(EnumResourceNames)
1373 1374
BOOL        WINAPI EnumResourceTypesA(HMODULE,ENUMRESTYPEPROCA,LONG_PTR);
BOOL        WINAPI EnumResourceTypesW(HMODULE,ENUMRESTYPEPROCW,LONG_PTR);
1375
#define     EnumResourceTypes WINELIB_NAME_AW(EnumResourceTypes)
1376 1377
BOOL        WINAPI EqualSid(PSID, PSID);
BOOL        WINAPI EqualPrefixSid(PSID,PSID);
1378
DWORD       WINAPI EraseTape(HANDLE,DWORD,BOOL);
1379 1380
VOID DECLSPEC_NORETURN WINAPI ExitProcess(DWORD);
VOID DECLSPEC_NORETURN WINAPI ExitThread(DWORD);
1381 1382
DWORD       WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD);
DWORD       WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD);
1383
#define     ExpandEnvironmentStrings WINELIB_NAME_AW(ExpandEnvironmentStrings)
1384 1385 1386 1387
void        WINAPI FatalAppExitA(UINT,LPCSTR);
void        WINAPI FatalAppExitW(UINT,LPCWSTR);
void        WINAPI FatalExit(int);
#define     FatalAppExit WINELIB_NAME_AW(FatalAppExit)
1388 1389 1390
BOOL        WINAPI FileTimeToDosDateTime(const FILETIME*,LPWORD,LPWORD);
BOOL        WINAPI FileTimeToLocalFileTime(const FILETIME*,LPFILETIME);
BOOL        WINAPI FileTimeToSystemTime(const FILETIME*,LPSYSTEMTIME);
1391 1392 1393 1394
BOOL        WINAPI FindActCtxSectionStringA(DWORD,const GUID *,ULONG,LPCSTR,PACTCTX_SECTION_KEYED_DATA);
BOOL        WINAPI FindActCtxSectionStringW(DWORD,const GUID *,ULONG,LPCWSTR,PACTCTX_SECTION_KEYED_DATA);
#define     FindActCtxSectionString WINELIB_NAME_AW(FindActCtxSectionString)
BOOL        WINAPI FindActCtxSectionGuid(DWORD,const GUID *,ULONG,const GUID *,PACTCTX_SECTION_KEYED_DATA);
1395 1396 1397 1398
ATOM        WINAPI FindAtomA(LPCSTR);
ATOM        WINAPI FindAtomW(LPCWSTR);
#define     FindAtom WINELIB_NAME_AW(FindAtom)
BOOL        WINAPI FindClose(HANDLE);
1399 1400
HANDLE      WINAPI FindFirstChangeNotificationA(LPCSTR,BOOL,DWORD);
HANDLE      WINAPI FindFirstChangeNotificationW(LPCWSTR,BOOL,DWORD);
1401
#define     FindFirstChangeNotification WINELIB_NAME_AW(FindFirstChangeNotification)
1402 1403 1404 1405 1406 1407
HANDLE      WINAPI FindFirstFileA(LPCSTR,LPWIN32_FIND_DATAA);
HANDLE      WINAPI FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW);
#define     FindFirstFile WINELIB_NAME_AW(FindFirstFile)
HANDLE      WINAPI FindFirstFileExA(LPCSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD);
HANDLE      WINAPI FindFirstFileExW(LPCWSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD);
#define     FindFirstFileEx WINELIB_NAME_AW(FindFirstFileEx)
1408
BOOL        WINAPI FindFirstFreeAce(PACL,LPVOID*);
1409
BOOL        WINAPI FindNextChangeNotification(HANDLE);
1410 1411 1412
BOOL        WINAPI FindNextFileA(HANDLE,LPWIN32_FIND_DATAA);
BOOL        WINAPI FindNextFileW(HANDLE,LPWIN32_FIND_DATAW);
#define     FindNextFile WINELIB_NAME_AW(FindNextFile)
1413
BOOL        WINAPI FindCloseChangeNotification(HANDLE);
1414 1415 1416
HRSRC       WINAPI FindResourceA(HMODULE,LPCSTR,LPCSTR);
HRSRC       WINAPI FindResourceW(HMODULE,LPCWSTR,LPCWSTR);
#define     FindResource WINELIB_NAME_AW(FindResource)
1417 1418
HRSRC       WINAPI FindResourceExA(HMODULE,LPCSTR,LPCSTR,WORD);
HRSRC       WINAPI FindResourceExW(HMODULE,LPCWSTR,LPCWSTR,WORD);
1419
#define     FindResourceEx WINELIB_NAME_AW(FindResourceEx)
1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433
HANDLE      WINAPI FindFirstVolumeA(LPSTR,DWORD);
HANDLE      WINAPI FindFirstVolumeW(LPWSTR,DWORD);
#define     FindFirstVolume WINELIB_NAME_AW(FindFirstVolume)
HANDLE      WINAPI FindFirstVolumeMountPointA(LPCSTR,LPSTR,DWORD);
HANDLE      WINAPI FindFirstVolumeMountPointW(LPCWSTR,LPWSTR,DWORD);
#define     FindFirstVolumeMountPoint WINELIB_NAME_AW(FindFirstVolumeMountPoint)
BOOL        WINAPI FindNextVolumeA(HANDLE,LPSTR,DWORD);
BOOL        WINAPI FindNextVolumeW(HANDLE,LPWSTR,DWORD);
#define     FindNextVolume WINELIB_NAME_AW(FindNextVolume)
BOOL        WINAPI FindNextVolumeMountPointA(HANDLE,LPSTR,DWORD);
BOOL        WINAPI FindNextVolumeMountPointW(HANDLE,LPWSTR,DWORD);
#define     FindNextVolumeMountPoint WINELIB_NAME_AW(FindNextVolumeMountPoint)
BOOL        WINAPI FindVolumeClose(HANDLE);
BOOL        WINAPI FindVolumeMountPointClose(HANDLE);
1434
BOOL        WINAPI FlushFileBuffers(HANDLE);
1435
BOOL        WINAPI FlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
1436
BOOL        WINAPI FlushViewOfFile(LPCVOID,SIZE_T);
1437 1438
DWORD       WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*);
DWORD       WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*);
1439
#define     FormatMessage WINELIB_NAME_AW(FormatMessage)
1440 1441
BOOL        WINAPI FreeEnvironmentStringsA(LPSTR);
BOOL        WINAPI FreeEnvironmentStringsW(LPWSTR);
1442
#define     FreeEnvironmentStrings WINELIB_NAME_AW(FreeEnvironmentStrings)
1443
BOOL        WINAPI FreeLibrary(HMODULE);
1444
VOID        WINAPI FreeLibraryAndExitThread(HINSTANCE,DWORD);
1445 1446 1447
#define     FreeModule(handle) FreeLibrary(handle)
#define     FreeProcInstance(proc) /*nothing*/
BOOL        WINAPI FreeResource(HGLOBAL);
1448
PVOID       WINAPI FreeSid(PSID);
1449 1450
BOOL        WINAPI GetAce(PACL,DWORD,LPVOID*);
BOOL        WINAPI GetAclInformation(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
1451 1452 1453
UINT        WINAPI GetAtomNameA(ATOM,LPSTR,INT);
UINT        WINAPI GetAtomNameW(ATOM,LPWSTR,INT);
#define     GetAtomName WINELIB_NAME_AW(GetAtomName)
1454 1455 1456
BOOL        WINAPI GetBinaryTypeA( LPCSTR lpApplicationName, LPDWORD lpBinaryType );
BOOL        WINAPI GetBinaryTypeW( LPCWSTR lpApplicationName, LPDWORD lpBinaryType );
#define     GetBinaryType WINELIB_NAME_AW(GetBinaryType)
1457
BOOL        WINAPI GetCurrentActCtx(HANDLE *);
1458
BOOL        WINAPI GetCommConfig(HANDLE,LPCOMMCONFIG,LPDWORD);
1459 1460 1461 1462 1463
BOOL        WINAPI GetCommMask(HANDLE,LPDWORD);
BOOL        WINAPI GetCommModemStatus(HANDLE,LPDWORD);
BOOL        WINAPI GetCommProperties(HANDLE,LPCOMMPROP);
BOOL        WINAPI GetCommState(HANDLE,LPDCB);
BOOL        WINAPI GetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
1464 1465
LPSTR       WINAPI GetCommandLineA(void);
LPWSTR      WINAPI GetCommandLineW(void);
1466
#define     GetCommandLine WINELIB_NAME_AW(GetCommandLine)
1467 1468 1469
DWORD       WINAPI GetCompressedFileSizeA(LPCSTR,LPDWORD);
DWORD       WINAPI GetCompressedFileSizeW(LPCWSTR,LPDWORD);
#define     GetCompressedFileSize WINELIB_NAME_AW(GetCompressedFileSize)
1470 1471
BOOL        WINAPI GetComputerNameA(LPSTR,LPDWORD);
BOOL        WINAPI GetComputerNameW(LPWSTR,LPDWORD);
1472
#define     GetComputerName WINELIB_NAME_AW(GetComputerName)
1473 1474 1475
BOOL        WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD);
BOOL        WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD);
#define     GetComputerNameEx WINELIB_NAME_AW(GetComputerNameEx)
1476 1477 1478 1479 1480 1481
UINT        WINAPI GetCurrentDirectoryA(UINT,LPSTR);
UINT        WINAPI GetCurrentDirectoryW(UINT,LPWSTR);
#define     GetCurrentDirectory WINELIB_NAME_AW(GetCurrentDirectory)
BOOL        WINAPI GetCurrentHwProfileA(LPHW_PROFILE_INFOA);
BOOL        WINAPI GetCurrentHwProfileW(LPHW_PROFILE_INFOW);
#define     GetCurrentHwProfile WINELIB_NAME_AW(GetCurrentHwProfile)
1482 1483
HANDLE      WINAPI GetCurrentProcess(void);
HANDLE      WINAPI GetCurrentThread(void);
1484
#define     GetCurrentTime() GetTickCount()
1485 1486 1487
BOOL        WINAPI GetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,LPDWORD);
BOOL        WINAPI GetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,LPDWORD);
#define     GetDefaultCommConfig WINELIB_NAME_AW(GetDefaultCommConfig)
1488
BOOL        WINAPI GetDevicePowerState(HANDLE,BOOL*);
1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500
BOOL        WINAPI GetDiskFreeSpaceA(LPCSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
BOOL        WINAPI GetDiskFreeSpaceW(LPCWSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
#define     GetDiskFreeSpace WINELIB_NAME_AW(GetDiskFreeSpace)
BOOL        WINAPI GetDiskFreeSpaceExA(LPCSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
BOOL        WINAPI GetDiskFreeSpaceExW(LPCWSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
#define     GetDiskFreeSpaceEx WINELIB_NAME_AW(GetDiskFreeSpaceEx)
DWORD       WINAPI GetDllDirectoryA(DWORD,LPSTR);
DWORD       WINAPI GetDllDirectoryW(DWORD,LPWSTR);
#define     GetDllDirectory WINELIB_NAME_AW(GetDllDirectory)
UINT        WINAPI GetDriveTypeA(LPCSTR);
UINT        WINAPI GetDriveTypeW(LPCWSTR);
#define     GetDriveType WINELIB_NAME_AW(GetDriveType)
1501 1502
LPSTR       WINAPI GetEnvironmentStringsA(void);
LPWSTR      WINAPI GetEnvironmentStringsW(void);
1503
#define     GetEnvironmentStrings WINELIB_NAME_AW(GetEnvironmentStrings)
1504 1505
DWORD       WINAPI GetEnvironmentVariableA(LPCSTR,LPSTR,DWORD);
DWORD       WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD);
1506
#define     GetEnvironmentVariable WINELIB_NAME_AW(GetEnvironmentVariable)
1507
BOOL        WINAPI GetExitCodeProcess(HANDLE,LPDWORD);
1508
BOOL        WINAPI GetExitCodeThread(HANDLE,LPDWORD);
1509 1510 1511
DWORD       WINAPI GetFileAttributesA(LPCSTR);
DWORD       WINAPI GetFileAttributesW(LPCWSTR);
#define     GetFileAttributes WINELIB_NAME_AW(GetFileAttributes)
1512 1513
BOOL        WINAPI GetFileAttributesExA(LPCSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
BOOL        WINAPI GetFileAttributesExW(LPCWSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
1514
#define     GetFileAttributesEx WINELIB_NAME_AW(GetFileAttributesEx)
1515
BOOL        WINAPI GetFileInformationByHandle(HANDLE,BY_HANDLE_FILE_INFORMATION*);
1516 1517 1518
BOOL        WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
BOOL        WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
#define     GetFileSecurity WINELIB_NAME_AW(GetFileSecurity)
Jim Aston's avatar
Jim Aston committed
1519
DWORD       WINAPI GetFileSize(HANDLE,LPDWORD);
1520
BOOL        WINAPI GetFileSizeEx(HANDLE,PLARGE_INTEGER);
Jim Aston's avatar
Jim Aston committed
1521 1522
BOOL        WINAPI GetFileTime(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME);
DWORD       WINAPI GetFileType(HANDLE);
1523
#define     GetFreeSpace(w) (0x100000L)
1524 1525
DWORD       WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*);
DWORD       WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*);
1526
#define     GetFullPathName WINELIB_NAME_AW(GetFullPathName)
1527
BOOL        WINAPI GetHandleInformation(HANDLE,LPDWORD);
1528
BOOL        WINAPI GetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
1529
DWORD       WINAPI GetLengthSid(PSID);
1530 1531
VOID        WINAPI GetLocalTime(LPSYSTEMTIME);
DWORD       WINAPI GetLogicalDrives(void);
1532 1533 1534
UINT        WINAPI GetLogicalDriveStringsA(UINT,LPSTR);
UINT        WINAPI GetLogicalDriveStringsW(UINT,LPWSTR);
#define     GetLogicalDriveStrings WINELIB_NAME_AW(GetLogicalDriveStrings)
1535 1536
DWORD       WINAPI GetLongPathNameA(LPCSTR,LPSTR,DWORD);
DWORD       WINAPI GetLongPathNameW(LPCWSTR,LPWSTR,DWORD);
1537
#define     GetLongPathName WINELIB_NAME_AW(GetLongPathName)
1538
BOOL        WINAPI GetMailslotInfo(HANDLE,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
1539 1540 1541 1542 1543 1544
DWORD       WINAPI GetModuleFileNameA(HMODULE,LPSTR,DWORD);
DWORD       WINAPI GetModuleFileNameW(HMODULE,LPWSTR,DWORD);
#define     GetModuleFileName WINELIB_NAME_AW(GetModuleFileName)
HMODULE     WINAPI GetModuleHandleA(LPCSTR);
HMODULE     WINAPI GetModuleHandleW(LPCWSTR);
#define     GetModuleHandle WINELIB_NAME_AW(GetModuleHandle)
1545 1546 1547
BOOL        WINAPI GetNamedPipeHandleStateA(HANDLE,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPSTR,DWORD);
BOOL        WINAPI GetNamedPipeHandleStateW(HANDLE,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPWSTR,DWORD);
#define     GetNamedPipeHandleState WINELIB_NAME_AW(GetNamedPipeHandleState)
1548
BOOL        WINAPI GetNamedPipeInfo(HANDLE,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
1549 1550
BOOL        WINAPI GetNumberOfEventLogRecords(HANDLE,PDWORD);
BOOL        WINAPI GetOldestEventLogRecord(HANDLE,PDWORD);
1551
BOOL        WINAPI GetOverlappedResult(HANDLE,LPOVERLAPPED,LPDWORD,BOOL);
1552
DWORD       WINAPI GetPriorityClass(HANDLE);
1553
BOOL        WINAPI GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569
UINT        WINAPI GetPrivateProfileIntA(LPCSTR,LPCSTR,INT,LPCSTR);
UINT        WINAPI GetPrivateProfileIntW(LPCWSTR,LPCWSTR,INT,LPCWSTR);
#define     GetPrivateProfileInt WINELIB_NAME_AW(GetPrivateProfileInt)
INT         WINAPI GetPrivateProfileSectionA(LPCSTR,LPSTR,DWORD,LPCSTR);
INT         WINAPI GetPrivateProfileSectionW(LPCWSTR,LPWSTR,DWORD,LPCWSTR);
#define     GetPrivateProfileSection WINELIB_NAME_AW(GetPrivateProfileSection)
DWORD       WINAPI GetPrivateProfileSectionNamesA(LPSTR,DWORD,LPCSTR);
DWORD       WINAPI GetPrivateProfileSectionNamesW(LPWSTR,DWORD,LPCWSTR);
#define     GetPrivateProfileSectionNames WINELIB_NAME_AW(GetPrivateProfileSectionNames)
INT         WINAPI GetPrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT,LPCSTR);
INT         WINAPI GetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT,LPCWSTR);
#define     GetPrivateProfileString WINELIB_NAME_AW(GetPrivateProfileString)
BOOL        WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
BOOL        WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
#define     GetPrivateProfileStruct WINELIB_NAME_AW(GetPrivateProfileStruct)
FARPROC     WINAPI GetProcAddress(HMODULE,LPCSTR);
1570
BOOL        WINAPI GetProcessAffinityMask(HANDLE,PDWORD_PTR,PDWORD_PTR);
1571
DWORD       WINAPI GetProcessHeaps(DWORD,PHANDLE);
Robert Shearman's avatar
Robert Shearman committed
1572
DWORD       WINAPI GetProcessId(HANDLE);
1573 1574 1575
BOOL        WINAPI GetProcessIoCounters(HANDLE,PIO_COUNTERS);
BOOL        WINAPI GetProcessPriorityBoost(HANDLE,PBOOL);
BOOL        WINAPI GetProcessShutdownParameters(LPDWORD,LPDWORD);
1576
BOOL        WINAPI GetProcessTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
1577
DWORD       WINAPI GetProcessVersion(DWORD);
1578
BOOL        WINAPI GetProcessWorkingSetSize(HANDLE,PSIZE_T,PSIZE_T);
1579 1580 1581 1582 1583 1584 1585 1586 1587
UINT        WINAPI GetProfileIntA(LPCSTR,LPCSTR,INT);
UINT        WINAPI GetProfileIntW(LPCWSTR,LPCWSTR,INT);
#define     GetProfileInt WINELIB_NAME_AW(GetProfileInt)
INT         WINAPI GetProfileSectionA(LPCSTR,LPSTR,DWORD);
INT         WINAPI GetProfileSectionW(LPCWSTR,LPWSTR,DWORD);
#define     GetProfileSection WINELIB_NAME_AW(GetProfileSection)
INT         WINAPI GetProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT);
INT         WINAPI GetProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT);
#define     GetProfileString WINELIB_NAME_AW(GetProfileString)
1588
BOOL        WINAPI GetQueuedCompletionStatus(HANDLE,LPDWORD,PULONG_PTR,LPOVERLAPPED*,DWORD);
1589 1590 1591 1592 1593 1594 1595 1596 1597 1598
BOOL        WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
BOOL        WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL *,LPBOOL);
BOOL        WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID *,LPBOOL);
DWORD       WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR);
BOOL        WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID *,LPBOOL);
BOOL        WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL *,LPBOOL);
PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID);
DWORD       WINAPI GetSidLengthRequired(BYTE);
PDWORD      WINAPI GetSidSubAuthority(PSID,DWORD);
PUCHAR      WINAPI GetSidSubAuthorityCount(PSID);
1599 1600
DWORD       WINAPI GetShortPathNameA(LPCSTR,LPSTR,DWORD);
DWORD       WINAPI GetShortPathNameW(LPCWSTR,LPWSTR,DWORD);
1601
#define     GetShortPathName WINELIB_NAME_AW(GetShortPathName)
1602 1603 1604
VOID        WINAPI GetStartupInfoA(LPSTARTUPINFOA);
VOID        WINAPI GetStartupInfoW(LPSTARTUPINFOW);
#define     GetStartupInfo WINELIB_NAME_AW(GetStartupInfo)
1605
HANDLE      WINAPI GetStdHandle(DWORD);
1606 1607 1608
UINT        WINAPI GetSystemDirectoryA(LPSTR,UINT);
UINT        WINAPI GetSystemDirectoryW(LPWSTR,UINT);
#define     GetSystemDirectory WINELIB_NAME_AW(GetSystemDirectory)
1609
VOID        WINAPI GetSystemInfo(LPSYSTEM_INFO);
1610
BOOL        WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
1611
VOID        WINAPI GetSystemTime(LPSYSTEMTIME);
1612
BOOL        WINAPI GetSystemTimeAdjustment(PDWORD,PDWORD,PBOOL);
1613
VOID        WINAPI GetSystemTimeAsFileTime(LPFILETIME);
1614 1615 1616
UINT        WINAPI GetSystemWindowsDirectoryA(LPSTR,UINT);
UINT        WINAPI GetSystemWindowsDirectoryW(LPWSTR,UINT);
#define     GetSystemWindowsDirectory WINELIB_NAME_AW(GetSystemWindowsDirectory)
1617 1618 1619
DWORD       WINAPI GetTapeParameters(HANDLE,DWORD,LPDWORD,LPVOID);
DWORD       WINAPI GetTapePosition(HANDLE,DWORD,LPDWORD,LPDWORD,LPDWORD);
DWORD       WINAPI GetTapeStatus(HANDLE);
1620 1621 1622 1623 1624 1625 1626
UINT        WINAPI GetTempFileNameA(LPCSTR,LPCSTR,UINT,LPSTR);
UINT        WINAPI GetTempFileNameW(LPCWSTR,LPCWSTR,UINT,LPWSTR);
#define     GetTempFileName WINELIB_NAME_AW(GetTempFileName)
DWORD       WINAPI GetTempPathA(DWORD,LPSTR);
DWORD       WINAPI GetTempPathW(DWORD,LPWSTR);
#define     GetTempPath WINELIB_NAME_AW(GetTempPath)
DWORD       WINAPI GetTickCount(void);
1627
DWORD       WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION);
1628
BOOL        WINAPI GetThreadContext(HANDLE,CONTEXT *);
1629
INT         WINAPI GetThreadPriority(HANDLE);
1630
BOOL        WINAPI GetThreadPriorityBoost(HANDLE,PBOOL);
1631
BOOL        WINAPI GetThreadSelectorEntry(HANDLE,DWORD,LPLDT_ENTRY);
1632
BOOL        WINAPI GetThreadTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
1633 1634 1635 1636
BOOL        WINAPI GetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,LPVOID,DWORD,LPDWORD);
BOOL        WINAPI GetUserNameA(LPSTR,LPDWORD);
BOOL        WINAPI GetUserNameW(LPWSTR,LPDWORD);
#define     GetUserName WINELIB_NAME_AW(GetUserName)
1637 1638 1639 1640 1641 1642 1643
DWORD       WINAPI GetVersion(void);
BOOL        WINAPI GetVersionExA(OSVERSIONINFOA*);
BOOL        WINAPI GetVersionExW(OSVERSIONINFOW*);
#define     GetVersionEx WINELIB_NAME_AW(GetVersionEx)
BOOL        WINAPI GetVolumeInformationA(LPCSTR,LPSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPSTR,DWORD);
BOOL        WINAPI GetVolumeInformationW(LPCWSTR,LPWSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPWSTR,DWORD);
#define     GetVolumeInformation WINELIB_NAME_AW(GetVolumeInformation)
1644 1645 1646 1647 1648 1649 1650 1651 1652
BOOL        WINAPI GetVolumeNameForVolumeMountPointA(LPCSTR,LPSTR,DWORD);
BOOL        WINAPI GetVolumeNameForVolumeMountPointW(LPCWSTR,LPWSTR,DWORD);
#define     GetVolumeNameForVolumeMountPoint WINELIB_NAME_AW(GetVolumeNameForVolumeMountPoint)
BOOL        WINAPI GetVolumePathNameA(LPCSTR,LPSTR,DWORD);
BOOL        WINAPI GetVolumePathNameW(LPCWSTR,LPWSTR,DWORD);
#define     GetVolumePathName WINELIB_NAME_AW(GetVolumePathName)
BOOL        WINAPI GetVolumePathNamesForVolumeNameA(LPCSTR,LPSTR,DWORD,PDWORD);
BOOL        WINAPI GetVolumePathNamesForVolumeNameW(LPCWSTR,LPWSTR,DWORD,PDWORD);
#define     GetVolumePathNamesForVolumeName WINELIB_NAME_AW(GetVolumePathNamesForVolumeName)
1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672
UINT        WINAPI GetWindowsDirectoryA(LPSTR,UINT);
UINT        WINAPI GetWindowsDirectoryW(LPWSTR,UINT);
#define     GetWindowsDirectory WINELIB_NAME_AW(GetWindowsDirectory)
ATOM        WINAPI GlobalAddAtomA(LPCSTR);
ATOM        WINAPI GlobalAddAtomW(LPCWSTR);
#define     GlobalAddAtom WINELIB_NAME_AW(GlobalAddAtom)
HGLOBAL     WINAPI GlobalAlloc(UINT,SIZE_T);
SIZE_T      WINAPI GlobalCompact(DWORD);
ATOM        WINAPI GlobalDeleteAtom(ATOM);
ATOM        WINAPI GlobalFindAtomA(LPCSTR);
ATOM        WINAPI GlobalFindAtomW(LPCWSTR);
#define     GlobalFindAtom WINELIB_NAME_AW(GlobalFindAtom)
VOID        WINAPI GlobalFix(HGLOBAL);
UINT        WINAPI GlobalFlags(HGLOBAL);
HGLOBAL     WINAPI GlobalFree(HGLOBAL);
UINT        WINAPI GlobalGetAtomNameA(ATOM,LPSTR,INT);
UINT        WINAPI GlobalGetAtomNameW(ATOM,LPWSTR,INT);
#define     GlobalGetAtomName WINELIB_NAME_AW(GlobalGetAtomName)
HGLOBAL     WINAPI GlobalHandle(LPCVOID);
LPVOID      WINAPI GlobalLock(HGLOBAL);
1673
VOID        WINAPI GlobalMemoryStatus(LPMEMORYSTATUS);
1674
BOOL        WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX);
1675 1676 1677 1678 1679 1680 1681
HGLOBAL     WINAPI GlobalReAlloc(HGLOBAL,SIZE_T,UINT);
SIZE_T      WINAPI GlobalSize(HGLOBAL);
VOID        WINAPI GlobalUnfix(HGLOBAL);
BOOL        WINAPI GlobalUnlock(HGLOBAL);
BOOL        WINAPI GlobalUnWire(HGLOBAL);
LPVOID      WINAPI GlobalWire(HGLOBAL);
#define     HasOverlappedCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
1682 1683 1684 1685 1686 1687 1688 1689 1690 1691
LPVOID      WINAPI HeapAlloc(HANDLE,DWORD,SIZE_T);
SIZE_T      WINAPI HeapCompact(HANDLE,DWORD);
HANDLE      WINAPI HeapCreate(DWORD,SIZE_T,SIZE_T);
BOOL        WINAPI HeapDestroy(HANDLE);
BOOL        WINAPI HeapFree(HANDLE,DWORD,LPVOID);
BOOL        WINAPI HeapLock(HANDLE);
LPVOID      WINAPI HeapReAlloc(HANDLE,DWORD,LPVOID,SIZE_T);
SIZE_T      WINAPI HeapSize(HANDLE,DWORD,LPVOID);
BOOL        WINAPI HeapUnlock(HANDLE);
BOOL        WINAPI HeapValidate(HANDLE,DWORD,LPCVOID);
1692
BOOL        WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY);
1693
BOOL        WINAPI InitAtomTable(DWORD);
1694
BOOL        WINAPI InitializeAcl(PACL,DWORD,DWORD);
1695 1696
void        WINAPI InitializeCriticalSection(CRITICAL_SECTION *lpCrit);
BOOL        WINAPI InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION *,DWORD);
1697
BOOL        WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
1698
BOOL        WINAPI InitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
1699 1700 1701 1702 1703 1704 1705 1706 1707
BOOL        WINAPI IsBadCodePtr(FARPROC);
BOOL        WINAPI IsBadHugeReadPtr(LPCVOID,UINT);
BOOL        WINAPI IsBadHugeWritePtr(LPVOID,UINT);
BOOL        WINAPI IsBadReadPtr(LPCVOID,UINT);
BOOL        WINAPI IsBadStringPtrA(LPCSTR,UINT);
BOOL        WINAPI IsBadStringPtrW(LPCWSTR,UINT);
#define     IsBadStringPtr WINELIB_NAME_AW(IsBadStringPtr)
BOOL        WINAPI IsBadWritePtr(LPVOID,UINT);
BOOL        WINAPI IsDebuggerPresent(void);
1708
BOOL        WINAPI IsSystemResumeAutomatic(void);
1709
BOOL        WINAPI IsTextUnicode(LPCVOID,INT,LPINT);
1710
BOOL        WINAPI IsTokenRestricted(HANDLE);
1711
BOOL        WINAPI IsValidAcl(PACL);
1712 1713
BOOL        WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
BOOL        WINAPI IsValidSid(PSID);
1714
BOOL        WINAPI ImpersonateLoggedOnUser(HANDLE);
1715
BOOL        WINAPI ImpersonateNamedPipeClient(HANDLE);
1716
BOOL        WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
1717
BOOL        WINAPI IsProcessorFeaturePresent(DWORD);
1718
void        WINAPI LeaveCriticalSection(CRITICAL_SECTION *lpCrit);
1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738
HMODULE     WINAPI LoadLibraryA(LPCSTR);
HMODULE     WINAPI LoadLibraryW(LPCWSTR);
#define     LoadLibrary WINELIB_NAME_AW(LoadLibrary)
HMODULE     WINAPI LoadLibraryExA(LPCSTR,HANDLE,DWORD);
HMODULE     WINAPI LoadLibraryExW(LPCWSTR,HANDLE,DWORD);
#define     LoadLibraryEx WINELIB_NAME_AW(LoadLibraryEx)
HINSTANCE   WINAPI LoadModule(LPCSTR,LPVOID);
HGLOBAL     WINAPI LoadResource(HMODULE,HRSRC);
HLOCAL      WINAPI LocalAlloc(UINT,SIZE_T);
SIZE_T      WINAPI LocalCompact(UINT);
UINT        WINAPI LocalFlags(HLOCAL);
HLOCAL      WINAPI LocalFree(HLOCAL);
HLOCAL      WINAPI LocalHandle(LPCVOID);
LPVOID      WINAPI LocalLock(HLOCAL);
HLOCAL      WINAPI LocalReAlloc(HLOCAL,SIZE_T,UINT);
SIZE_T      WINAPI LocalShrink(HGLOBAL,UINT);
SIZE_T      WINAPI LocalSize(HLOCAL);
BOOL        WINAPI LocalUnlock(HLOCAL);
LPVOID      WINAPI LockResource(HGLOBAL);
#define     LockSegment(handle) GlobalFix((HANDLE)(handle))
1739 1740 1741
BOOL        WINAPI LookupAccountNameA(LPCSTR,LPCSTR,PSID,LPDWORD,LPSTR,LPDWORD,PSID_NAME_USE);
BOOL        WINAPI LookupAccountNameW(LPCWSTR,LPCWSTR,PSID,LPDWORD,LPWSTR,LPDWORD,PSID_NAME_USE);
#define     LookupAccountName WINELIB_NAME_AW(LookupAccountName)
1742 1743
BOOL        WINAPI LookupAccountSidA(LPCSTR,PSID,LPSTR,LPDWORD,LPSTR,LPDWORD,PSID_NAME_USE);
BOOL        WINAPI LookupAccountSidW(LPCWSTR,PSID,LPWSTR,LPDWORD,LPWSTR,LPDWORD,PSID_NAME_USE);
1744
#define     LookupAccountSid WINELIB_NAME_AW(LookupAccountSid)
1745 1746
BOOL        WINAPI LocalFileTimeToFileTime(const FILETIME*,LPFILETIME);
BOOL        WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1747
BOOL        WINAPI LockFileEx(HANDLE, DWORD, DWORD, DWORD, DWORD, LPOVERLAPPED);
1748 1749 1750 1751 1752 1753
BOOL        WINAPI LogonUserA(LPCSTR,LPCSTR,LPCSTR,DWORD,DWORD,PHANDLE);
BOOL        WINAPI LogonUserW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,DWORD,PHANDLE);
#define     LogonUser WINELIB_NAME_AW(LogonUser)
BOOL        WINAPI LookupPrivilegeDisplayNameA(LPCSTR,LPCSTR,LPSTR,LPDWORD,LPDWORD);
BOOL        WINAPI LookupPrivilegeDisplayNameW(LPCWSTR,LPCWSTR,LPWSTR,LPDWORD,LPDWORD);
#define     LookupPrivilegeDisplayName WINELIB_NAME_AW(LookupPrivilegeDisplayName)
1754 1755 1756
BOOL        WINAPI LookupPrivilegeNameA(LPCSTR,PLUID,LPSTR,LPDWORD);
BOOL        WINAPI LookupPrivilegeNameW(LPCWSTR,PLUID,LPWSTR,LPDWORD);
#define     LookupPrivilegeName WINELIB_NAME_AW(LookupPrivilegeName)
Andreas Mohr's avatar
Andreas Mohr committed
1757 1758
BOOL        WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,PLUID);
BOOL        WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,PLUID);
1759
#define     LookupPrivilegeValue WINELIB_NAME_AW(LookupPrivilegeValue)
1760 1761
BOOL        WINAPI MakeAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD,
                                  PACL,LPDWORD,PACL,LPDWORD,PSID,LPDWORD,PSID,LPDWORD);
1762
void        WINAPI MakeCriticalSectionGlobal(CRITICAL_SECTION *lpCrit);
1763
#define     MakeProcInstance(proc,inst) (proc)
1764
BOOL        WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
1765
VOID        WINAPI MapGenericMask(PDWORD,PGENERIC_MAPPING);
1766 1767
HMODULE     WINAPI MapHModuleSL(WORD);
WORD        WINAPI MapHModuleLS(HMODULE);
1768 1769
LPVOID      WINAPI MapViewOfFile(HANDLE,DWORD,DWORD,DWORD,SIZE_T);
LPVOID      WINAPI MapViewOfFileEx(HANDLE,DWORD,DWORD,DWORD,SIZE_T,LPVOID);
1770 1771
BOOL        WINAPI MoveFileA(LPCSTR,LPCSTR);
BOOL        WINAPI MoveFileW(LPCWSTR,LPCWSTR);
1772
#define     MoveFile WINELIB_NAME_AW(MoveFile)
1773 1774
BOOL        WINAPI MoveFileExA(LPCSTR,LPCSTR,DWORD);
BOOL        WINAPI MoveFileExW(LPCWSTR,LPCWSTR,DWORD);
1775
#define     MoveFileEx WINELIB_NAME_AW(MoveFileEx)
1776
INT         WINAPI MulDiv(INT,INT,INT);
1777
BOOL        WINAPI NotifyChangeEventLog(HANDLE,HANDLE);
1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788
BOOL        WINAPI ObjectCloseAuditAlarmA(LPCSTR,LPVOID,BOOL);
BOOL        WINAPI ObjectCloseAuditAlarmW(LPCWSTR,LPVOID,BOOL);
#define     ObjectCloseAuditAlarm WINELIB_NAME_AW(ObjectCloseAuditAlarm)
BOOL        WINAPI ObjectOpenAuditAlarmA(LPCSTR,LPVOID,LPSTR,LPSTR,PSECURITY_DESCRIPTOR,HANDLE,
                                         DWORD,DWORD,PPRIVILEGE_SET,BOOL,BOOL,LPBOOL);
BOOL        WINAPI ObjectOpenAuditAlarmW(LPCWSTR,LPVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,HANDLE,
                                         DWORD,DWORD,PPRIVILEGE_SET,BOOL,BOOL,LPBOOL);
#define     ObjectOpenAuditAlarm WINELIB_NAME_AW(ObjectOpenAuditAlarm)
BOOL        WINAPI ObjectPrivilegeAuditAlarmA(LPCSTR,LPVOID,HANDLE,DWORD,PPRIVILEGE_SET,BOOL);
BOOL        WINAPI ObjectPrivilegeAuditAlarmW(LPCWSTR,LPVOID,HANDLE,DWORD,PPRIVILEGE_SET,BOOL);
#define     ObjectPrivilegeAuditAlarm WINELIB_NAME_AW(ObjectPrivilegeAuditAlarm)
1789 1790 1791
HANDLE      WINAPI OpenBackupEventLogA(LPCSTR,LPCSTR);
HANDLE      WINAPI OpenBackupEventLogW(LPCWSTR,LPCWSTR);
#define     OpenBackupEventLog WINELIB_NAME_AW(OpenBackupEventLog)
1792 1793
HANDLE      WINAPI OpenEventA(DWORD,BOOL,LPCSTR);
HANDLE      WINAPI OpenEventW(DWORD,BOOL,LPCWSTR);
1794
#define     OpenEvent WINELIB_NAME_AW(OpenEvent)
1795 1796 1797
HANDLE      WINAPI OpenEventLogA(LPCSTR,LPCSTR);
HANDLE      WINAPI OpenEventLogW(LPCWSTR,LPCWSTR);
#define     OpenEventLog WINELIB_NAME_AW(OpenEventLog)
1798
HFILE       WINAPI OpenFile(LPCSTR,OFSTRUCT*,UINT);
1799 1800
HANDLE      WINAPI OpenFileMappingA(DWORD,BOOL,LPCSTR);
HANDLE      WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR);
1801
#define     OpenFileMapping WINELIB_NAME_AW(OpenFileMapping)
1802 1803
HANDLE      WINAPI OpenMutexA(DWORD,BOOL,LPCSTR);
HANDLE      WINAPI OpenMutexW(DWORD,BOOL,LPCWSTR);
1804
#define     OpenMutex WINELIB_NAME_AW(OpenMutex)
1805
HANDLE      WINAPI OpenProcess(DWORD,BOOL,DWORD);
1806
BOOL        WINAPI OpenProcessToken(HANDLE,DWORD,PHANDLE);
1807 1808
HANDLE      WINAPI OpenSemaphoreA(DWORD,BOOL,LPCSTR);
HANDLE      WINAPI OpenSemaphoreW(DWORD,BOOL,LPCWSTR);
1809
#define     OpenSemaphore WINELIB_NAME_AW(OpenSemaphore)
1810
HANDLE      WINAPI OpenThread(DWORD,BOOL,DWORD);
1811
BOOL        WINAPI OpenThreadToken(HANDLE,DWORD,BOOL,PHANDLE);
1812 1813 1814
HANDLE      WINAPI OpenWaitableTimerA(DWORD,BOOL,LPCSTR);
HANDLE      WINAPI OpenWaitableTimerW(DWORD,BOOL,LPCWSTR);
#define     OpenWaitableTimer WINELIB_NAME_AW(OpenWaitableTimer)
1815 1816 1817
VOID        WINAPI OutputDebugStringA(LPCSTR);
VOID        WINAPI OutputDebugStringW(LPCWSTR);
#define     OutputDebugString WINELIB_NAME_AW(OutputDebugString)
1818
BOOL        WINAPI PeekNamedPipe(HANDLE,PVOID,DWORD,PDWORD,PDWORD,PDWORD);
1819
BOOL        WINAPI PostQueuedCompletionStatus(HANDLE,DWORD,ULONG_PTR,LPOVERLAPPED);
1820
DWORD       WINAPI PrepareTape(HANDLE,DWORD,BOOL);
1821
BOOL        WINAPI ProcessIdToSessionId(DWORD,DWORD*);
1822
BOOL        WINAPI PrivilegeCheck(HANDLE,PPRIVILEGE_SET,LPBOOL);
1823 1824 1825
BOOL        WINAPI PrivilegedServiceAuditAlarmA(LPCSTR,LPCSTR,HANDLE,PPRIVILEGE_SET,BOOL);
BOOL        WINAPI PrivilegedServiceAuditAlarmW(LPCWSTR,LPCWSTR,HANDLE,PPRIVILEGE_SET,BOOL);
#define     PrivilegedServiceAuditAlarm WINELIB_NAME_AW(PrivilegedServiceAuditAlarm)
1826 1827
BOOL        WINAPI PulseEvent(HANDLE);
BOOL        WINAPI PurgeComm(HANDLE,DWORD);
1828
BOOL        WINAPI QueryActCtxW(DWORD,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T *);
1829 1830
DWORD       WINAPI QueryDosDeviceA(LPCSTR,LPSTR,DWORD);
DWORD       WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD);
1831
#define     QueryDosDevice WINELIB_NAME_AW(QueryDosDevice)
1832 1833
BOOL        WINAPI QueryPerformanceCounter(LARGE_INTEGER*);
BOOL        WINAPI QueryPerformanceFrequency(LARGE_INTEGER*);
1834
DWORD       WINAPI QueueUserAPC(PAPCFUNC,HANDLE,ULONG_PTR);
1835
BOOL        WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE,PVOID,ULONG);
1836
void        WINAPI RaiseException(DWORD,DWORD,DWORD,const ULONG_PTR *);
1837 1838 1839
BOOL        WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
BOOL        WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
#define     ReadEventLog WINELIB_NAME_AW(ReadEventLog)
1840
BOOL        WINAPI ReadDirectoryChangesW(HANDLE,LPVOID,DWORD,BOOL,DWORD,LPDWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
1841 1842
BOOL        WINAPI ReadFile(HANDLE,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
BOOL        WINAPI ReadFileEx(HANDLE,LPVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
1843
BOOL        WINAPI ReadProcessMemory(HANDLE,LPCVOID,LPVOID,SIZE_T,SIZE_T*);
1844 1845 1846
HANDLE      WINAPI RegisterEventSourceA(LPCSTR,LPCSTR);
HANDLE      WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR);
#define     RegisterEventSource WINELIB_NAME_AW(RegisterEventSource)
1847 1848
BOOL        WINAPI RegisterWaitForSingleObject(PHANDLE,HANDLE,WAITORTIMERCALLBACK,PVOID,ULONG,ULONG);
HANDLE      WINAPI RegisterWaitForSingleObjectEx(HANDLE,WAITORTIMERCALLBACK,PVOID,ULONG,ULONG);
1849
VOID        WINAPI ReleaseActCtx(HANDLE);
1850 1851
BOOL        WINAPI ReleaseMutex(HANDLE);
BOOL        WINAPI ReleaseSemaphore(HANDLE,LONG,LPLONG);
1852
ULONG       WINAPI RemoveVectoredExceptionHandler(PVOID);
1853 1854 1855 1856 1857 1858
BOOL        WINAPI ReplaceFileA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPVOID,LPVOID);
BOOL        WINAPI ReplaceFileW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPVOID,LPVOID);
#define     ReplaceFile WINELIB_NAME_AW(ReplaceFile)
BOOL        WINAPI RemoveDirectoryA(LPCSTR);
BOOL        WINAPI RemoveDirectoryW(LPCWSTR);
#define     RemoveDirectory WINELIB_NAME_AW(RemoveDirectory)
1859 1860
BOOL        WINAPI ReportEventA(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCSTR *,LPVOID);
BOOL        WINAPI ReportEventW(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCWSTR *,LPVOID);
1861
BOOL        WINAPI RequestWakeupLatency(LATENCY_TIME latency);
1862
#define     ReportEvent WINELIB_NAME_AW(ReportEvent)
1863
BOOL        WINAPI ResetEvent(HANDLE);
1864
DWORD       WINAPI ResumeThread(HANDLE);
1865
BOOL        WINAPI RevertToSelf(void);
1866 1867
DWORD       WINAPI SearchPathA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*);
DWORD       WINAPI SearchPathW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPWSTR*);
1868
#define     SearchPath WINELIB_NAME_AW(SearchPath)
1869
BOOL        WINAPI SetAclInformation(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
1870
BOOL        WINAPI SetCommConfig(HANDLE,LPCOMMCONFIG,DWORD);
1871
BOOL        WINAPI SetCommBreak(HANDLE);
1872 1873 1874
BOOL        WINAPI SetCommMask(HANDLE,DWORD);
BOOL        WINAPI SetCommState(HANDLE,LPDCB);
BOOL        WINAPI SetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
1875 1876
BOOL        WINAPI SetComputerNameA(LPCSTR);
BOOL        WINAPI SetComputerNameW(LPCWSTR);
1877
#define     SetComputerName WINELIB_NAME_AW(SetComputerName)
1878 1879 1880
BOOL        WINAPI SetComputerNameExA(COMPUTER_NAME_FORMAT,LPCSTR);
BOOL        WINAPI SetComputerNameExW(COMPUTER_NAME_FORMAT,LPCWSTR);
#define     SetComputerNameEx WINELIB_NAME_AW(SetComputerNameEx)
1881
DWORD       WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION,DWORD);
1882 1883 1884
BOOL        WINAPI SetCurrentDirectoryA(LPCSTR);
BOOL        WINAPI SetCurrentDirectoryW(LPCWSTR);
#define     SetCurrentDirectory WINELIB_NAME_AW(SetCurrentDirectory)
1885 1886 1887
BOOL        WINAPI SetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,DWORD);
BOOL        WINAPI SetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,DWORD);
#define     SetDefaultCommConfig WINELIB_NAME_AW(SetDefaultCommConfig)
1888 1889 1890
BOOL        WINAPI SetDllDirectoryA(LPCSTR);
BOOL        WINAPI SetDllDirectoryW(LPCWSTR);
#define     SetDllDirectory WINELIB_NAME_AW(SetDllDirectory)
1891 1892 1893
BOOL        WINAPI SetEndOfFile(HANDLE);
BOOL        WINAPI SetEnvironmentVariableA(LPCSTR,LPCSTR);
BOOL        WINAPI SetEnvironmentVariableW(LPCWSTR,LPCWSTR);
1894
#define     SetEnvironmentVariable WINELIB_NAME_AW(SetEnvironmentVariable)
1895
UINT        WINAPI SetErrorMode(UINT);
1896
BOOL        WINAPI SetEvent(HANDLE);
1897 1898
VOID        WINAPI SetFileApisToANSI(void);
VOID        WINAPI SetFileApisToOEM(void);
1899 1900 1901
BOOL        WINAPI SetFileAttributesA(LPCSTR,DWORD);
BOOL        WINAPI SetFileAttributesW(LPCWSTR,DWORD);
#define     SetFileAttributes WINELIB_NAME_AW(SetFileAttributes)
Jim Aston's avatar
Jim Aston committed
1902
DWORD       WINAPI SetFilePointer(HANDLE,LONG,LPLONG,DWORD);
1903
BOOL        WINAPI SetFilePointerEx(HANDLE,LARGE_INTEGER,LARGE_INTEGER*,DWORD);
1904 1905 1906
BOOL        WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
BOOL        WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
#define     SetFileSecurity WINELIB_NAME_AW(SetFileSecurity)
Jim Aston's avatar
Jim Aston committed
1907
BOOL        WINAPI SetFileTime(HANDLE,const FILETIME*,const FILETIME*,const FILETIME*);
1908
UINT        WINAPI SetHandleCount(UINT);
1909
BOOL        WINAPI SetHandleInformation(HANDLE,DWORD,DWORD);
1910
BOOL        WINAPI SetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1911
BOOL        WINAPI SetLocalTime(const SYSTEMTIME*);
1912
BOOL        WINAPI SetMailslotInfo(HANDLE,DWORD);
1913
BOOL        WINAPI SetNamedPipeHandleState(HANDLE,LPDWORD,LPDWORD,LPDWORD);
1914
BOOL        WINAPI SetPriorityClass(HANDLE,DWORD);
1915 1916
BOOL        WINAPI SetPrivateObjectSecurity(SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,
                                            PSECURITY_DESCRIPTOR*,PGENERIC_MAPPING,HANDLE);
1917
BOOL        WINAPI SetProcessAffinityMask(HANDLE,DWORD_PTR);
1918 1919 1920
BOOL        WINAPI SetProcessPriorityBoost(HANDLE,BOOL);
BOOL        WINAPI SetProcessShutdownParameters(DWORD,DWORD);
BOOL        WINAPI SetProcessWorkingSetSize(HANDLE,SIZE_T,SIZE_T);
1921 1922
BOOL        WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,
                                                SECURITY_DESCRIPTOR_CONTROL);
1923 1924 1925 1926
BOOL        WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
BOOL        WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID,BOOL);
BOOL        WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID,BOOL);
BOOL        WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
1927
BOOL        WINAPI SetStdHandle(DWORD,HANDLE);
1928
#define     SetSwapAreaSize(w) (w)
1929 1930
BOOL        WINAPI SetSystemPowerState(BOOL,BOOL);
BOOL        WINAPI SetSystemTime(const SYSTEMTIME*);
1931
BOOL        WINAPI SetSystemTimeAdjustment(DWORD,BOOL);
1932 1933
DWORD       WINAPI SetTapeParameters(HANDLE,DWORD,LPVOID);
DWORD       WINAPI SetTapePosition(HANDLE,DWORD,DWORD,DWORD,DWORD,BOOL);
1934
DWORD       WINAPI SetThreadAffinityMask(HANDLE,DWORD);
1935
BOOL        WINAPI SetThreadContext(HANDLE,const CONTEXT *);
1936
DWORD       WINAPI SetThreadExecutionState(EXECUTION_STATE);
1937
DWORD       WINAPI SetThreadIdealProcessor(HANDLE,DWORD);
1938
BOOL        WINAPI SetThreadPriority(HANDLE,INT);
1939
BOOL        WINAPI SetThreadPriorityBoost(HANDLE,BOOL);
1940
BOOL        WINAPI SetThreadToken(PHANDLE,HANDLE);
1941
BOOL        WINAPI SetTimeZoneInformation(const TIME_ZONE_INFORMATION *);
1942
BOOL        WINAPI SetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,LPVOID,DWORD);
1943 1944 1945
BOOL        WINAPI SetVolumeLabelA(LPCSTR,LPCSTR);
BOOL        WINAPI SetVolumeLabelW(LPCWSTR,LPCWSTR);
#define     SetVolumeLabel WINELIB_NAME_AW(SetVolumeLabel)
1946 1947 1948
BOOL        WINAPI SetVolumeMountPointA(LPCSTR,LPCSTR);
BOOL        WINAPI SetVolumeMountPointW(LPCSTR,LPCSTR);
#define     SetVolumeMountPoint WINELIB_NAME_AW(SetVolumeMountPoint)
1949
BOOL        WINAPI SetWaitableTimer(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,LPVOID,BOOL);
1950
BOOL        WINAPI SetupComm(HANDLE,DWORD,DWORD);
1951
DWORD       WINAPI SignalObjectAndWait(HANDLE,HANDLE,DWORD,BOOL);
1952
DWORD       WINAPI SizeofResource(HMODULE,HRSRC);
1953
VOID        WINAPI Sleep(DWORD);
1954 1955
DWORD       WINAPI SleepEx(DWORD,BOOL);
DWORD       WINAPI SuspendThread(HANDLE);
1956
void        WINAPI SwitchToFiber(LPVOID);
Francois Gouget's avatar
Francois Gouget committed
1957
BOOL        WINAPI SwitchToThread(void);
1958
BOOL        WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME);
1959
BOOL        WINAPI SystemTimeToTzSpecificLocalTime(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME);
1960 1961
BOOL        WINAPI TerminateProcess(HANDLE,DWORD);
BOOL        WINAPI TerminateThread(HANDLE,DWORD);
1962
DWORD       WINAPI TlsAlloc(void);
1963
BOOL        WINAPI TlsFree(DWORD);
1964
LPVOID      WINAPI TlsGetValue(DWORD);
1965
BOOL        WINAPI TlsSetValue(DWORD,LPVOID);
1966
BOOL        WINAPI TransactNamedPipe(HANDLE,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
1967
BOOL        WINAPI TransmitCommChar(HANDLE,CHAR);
1968
BOOL        WINAPI TryEnterCriticalSection(CRITICAL_SECTION *lpCrit);
1969
BOOL        WINAPI TzSpecificLocalTimeToSystemTime(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME);
1970
BOOL        WINAPI UnlockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1971
BOOL        WINAPI UnlockFileEx(HANDLE,DWORD,DWORD,DWORD,LPOVERLAPPED);
1972
#define     UnlockSegment(handle) GlobalUnfix((HANDLE)(handle))
1973
BOOL        WINAPI UnmapViewOfFile(LPVOID);
1974 1975
BOOL        WINAPI UnregisterWait(HANDLE);
BOOL        WINAPI UnregisterWaitEx(HANDLE,HANDLE);
1976 1977 1978
BOOL        WINAPI UpdateResourceA(HANDLE,LPCSTR,LPCSTR,WORD,LPVOID,DWORD);
BOOL        WINAPI UpdateResourceW(HANDLE,LPCWSTR,LPCWSTR,WORD,LPVOID,DWORD);
#define     UpdateResource WINELIB_NAME_AW(UpdateResource)
1979 1980 1981
BOOL        WINAPI VerifyVersionInfoA(LPOSVERSIONINFOEXA,DWORD,DWORDLONG);
BOOL        WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW,DWORD,DWORDLONG);
#define     VerifyVersionInfo WINELIB_NAME_AW(VerifyVersionInfo)
1982 1983 1984 1985 1986 1987 1988
LPVOID      WINAPI VirtualAlloc(LPVOID,SIZE_T,DWORD,DWORD);
LPVOID      WINAPI VirtualAllocEx(HANDLE,LPVOID,SIZE_T,DWORD,DWORD);
BOOL        WINAPI VirtualFree(LPVOID,SIZE_T,DWORD);
BOOL        WINAPI VirtualFreeEx(HANDLE,LPVOID,SIZE_T,DWORD);
BOOL        WINAPI VirtualLock(LPVOID,SIZE_T);
BOOL        WINAPI VirtualProtect(LPVOID,SIZE_T,DWORD,LPDWORD);
BOOL        WINAPI VirtualProtectEx(HANDLE,LPVOID,SIZE_T,DWORD,LPDWORD);
1989 1990
SIZE_T      WINAPI VirtualQuery(LPCVOID,PMEMORY_BASIC_INFORMATION,SIZE_T);
SIZE_T      WINAPI VirtualQueryEx(HANDLE,LPCVOID,PMEMORY_BASIC_INFORMATION,SIZE_T);
1991
BOOL        WINAPI VirtualUnlock(LPVOID,SIZE_T);
1992 1993
BOOL        WINAPI WaitCommEvent(HANDLE,LPDWORD,LPOVERLAPPED);
BOOL        WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD);
1994 1995 1996 1997
DWORD       WINAPI WaitForMultipleObjects(DWORD,const HANDLE*,BOOL,DWORD);
DWORD       WINAPI WaitForMultipleObjectsEx(DWORD,const HANDLE*,BOOL,DWORD,BOOL);
DWORD       WINAPI WaitForSingleObject(HANDLE,DWORD);
DWORD       WINAPI WaitForSingleObjectEx(HANDLE,DWORD,BOOL);
1998 1999 2000
BOOL        WINAPI WaitNamedPipeA(LPCSTR,DWORD);
BOOL        WINAPI WaitNamedPipeW(LPCWSTR,DWORD);
#define     WaitNamedPipe WINELIB_NAME_AW(WaitNamedPipe)
2001
UINT        WINAPI WinExec(LPCSTR,UINT);
2002
BOOL        WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
2003
BOOL        WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
2004 2005
BOOL        WINAPI WritePrivateProfileSectionA(LPCSTR,LPCSTR,LPCSTR);
BOOL        WINAPI WritePrivateProfileSectionW(LPCWSTR,LPCWSTR,LPCWSTR);
2006
#define     WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
2007 2008
BOOL        WINAPI WritePrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
BOOL        WINAPI WritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
2009
#define     WritePrivateProfileString WINELIB_NAME_AW(WritePrivateProfileString)
2010 2011
BOOL        WINAPI WritePrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
BOOL        WINAPI WritePrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
2012
#define     WritePrivateProfileStruct WINELIB_NAME_AW(WritePrivateProfileStruct)
2013
BOOL        WINAPI WriteProcessMemory(HANDLE,LPVOID,LPCVOID,SIZE_T,SIZE_T*);
2014 2015 2016
BOOL        WINAPI WriteProfileSectionA(LPCSTR,LPCSTR);
BOOL        WINAPI WriteProfileSectionW(LPCWSTR,LPCWSTR);
#define     WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
2017 2018
BOOL        WINAPI WriteProfileStringA(LPCSTR,LPCSTR,LPCSTR);
BOOL        WINAPI WriteProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR);
2019
#define     WriteProfileString WINELIB_NAME_AW(WriteProfileString)
2020
DWORD       WINAPI WriteTapemark(HANDLE,DWORD,DWORD,BOOL);
2021
#define     Yield()
2022
BOOL        WINAPI ZombifyActCtx(HANDLE);
2023

2024 2025 2026 2027 2028 2029
LPSTR       WINAPI lstrcatA(LPSTR,LPCSTR);
LPWSTR      WINAPI lstrcatW(LPWSTR,LPCWSTR);
LPSTR       WINAPI lstrcpyA(LPSTR,LPCSTR);
LPWSTR      WINAPI lstrcpyW(LPWSTR,LPCWSTR);
LPSTR       WINAPI lstrcpynA(LPSTR,LPCSTR,INT);
LPWSTR      WINAPI lstrcpynW(LPWSTR,LPCWSTR,INT);
2030 2031
INT         WINAPI lstrlenA(LPCSTR);
INT         WINAPI lstrlenW(LPCWSTR);
2032

2033
#if !defined(WINE_NO_INLINE_STRING) && defined(__WINESRC__)
2034 2035 2036

/* string functions without the exception handler */

2037
extern inline LPWSTR WINAPI lstrcpynW( LPWSTR dst, LPCWSTR src, INT n )
2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051
{
    LPWSTR d = dst;
    LPCWSTR s = src;
    UINT count = n;

    while ((count > 1) && *s)
    {
        count--;
        *d++ = *s++;
    }
    if (count) *d = 0;
    return dst;
}

2052
extern inline LPSTR WINAPI lstrcpynA( LPSTR dst, LPCSTR src, INT n )
2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066
{
    LPSTR d = dst;
    LPCSTR s = src;
    UINT count = n;

    while ((count > 1) && *s)
    {
        count--;
        *d++ = *s++;
    }
    if (count) *d = 0;
    return dst;
}

2067
extern inline INT WINAPI lstrlenW( LPCWSTR str )
2068 2069 2070 2071 2072 2073
{
    const WCHAR *s = str;
    while (*s) s++;
    return s - str;
}

2074
extern inline INT WINAPI lstrlenA( LPCSTR str )
2075 2076 2077 2078
{
    return strlen( str );
}

2079
extern inline LPWSTR WINAPI lstrcpyW( LPWSTR dst, LPCWSTR src )
2080 2081 2082 2083 2084 2085
{
    WCHAR *p = dst;
    while ((*p++ = *src++));
    return dst;
}

2086
extern inline LPSTR WINAPI lstrcpyA( LPSTR dst, LPCSTR src )
2087 2088 2089 2090
{
    return strcpy( dst, src );
}

2091
extern inline LPWSTR WINAPI lstrcatW( LPWSTR dst, LPCWSTR src )
2092 2093 2094 2095 2096 2097 2098
{
    WCHAR *p = dst;
    while (*p) p++;
    while ((*p++ = *src++));
    return dst;
}

2099
extern inline LPSTR WINAPI lstrcatA( LPSTR dst, LPCSTR src )
2100 2101 2102 2103
{
    return strcat( dst, src );
}

2104 2105 2106 2107
/* strncpy doesn't do what you think, don't use it */
#undef strncpy
#define strncpy(d,s,n) error do_not_use_strncpy_use_lstrcpynA_or_memcpy_instead

2108 2109 2110 2111 2112
#endif /* !defined(WINE_NO_INLINE_STRING) && defined(__WINESRC__) */

#define     lstrcat WINELIB_NAME_AW(lstrcat)
#define     lstrcpy WINELIB_NAME_AW(lstrcpy)
#define     lstrcpyn WINELIB_NAME_AW(lstrcpyn)
2113
#define     lstrlen WINELIB_NAME_AW(lstrlen)
2114

2115 2116
LONG        WINAPI _hread(HFILE,LPVOID,LONG);
LONG        WINAPI _hwrite(HFILE,LPCSTR,LONG);
2117 2118
HFILE       WINAPI _lcreat(LPCSTR,INT);
HFILE       WINAPI _lclose(HFILE);
2119
LONG        WINAPI _llseek(HFILE,LONG,INT);
2120 2121 2122 2123 2124
HFILE       WINAPI _lopen(LPCSTR,INT);
UINT        WINAPI _lread(HFILE,LPVOID,UINT);
UINT        WINAPI _lwrite(HFILE,LPCSTR,UINT);
INT         WINAPI lstrcmpA(LPCSTR,LPCSTR);
INT         WINAPI lstrcmpW(LPCWSTR,LPCWSTR);
2125
#define     lstrcmp WINELIB_NAME_AW(lstrcmp)
2126 2127
INT         WINAPI lstrcmpiA(LPCSTR,LPCSTR);
INT         WINAPI lstrcmpiW(LPCWSTR,LPCWSTR);
2128
#define     lstrcmpi WINELIB_NAME_AW(lstrcmpi)
2129

2130 2131 2132 2133 2134
/* compatibility macros */
#define     FillMemory RtlFillMemory
#define     MoveMemory RtlMoveMemory
#define     ZeroMemory RtlZeroMemory
#define     CopyMemory RtlCopyMemory
2135

2136 2137 2138 2139 2140 2141 2142 2143
/* undocumented functions */

typedef struct tagSYSLEVEL
{
    CRITICAL_SECTION crst;
    INT              level;
} SYSLEVEL;

2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160
/* [GS]etProcessDword offsets */
#define  GPD_APP_COMPAT_FLAGS    (-56)
#define  GPD_LOAD_DONE_EVENT     (-52)
#define  GPD_HINSTANCE16         (-48)
#define  GPD_WINDOWS_VERSION     (-44)
#define  GPD_THDB                (-40)
#define  GPD_PDB                 (-36)
#define  GPD_STARTF_SHELLDATA    (-32)
#define  GPD_STARTF_HOTKEY       (-28)
#define  GPD_STARTF_SHOWWINDOW   (-24)
#define  GPD_STARTF_SIZE         (-20)
#define  GPD_STARTF_POSITION     (-16)
#define  GPD_STARTF_FLAGS        (-12)
#define  GPD_PARENT              (- 8)
#define  GPD_FLAGS               (- 4)
#define  GPD_USERDATA            (  0)

2161 2162
void        WINAPI DisposeLZ32Handle(HANDLE);
HANDLE      WINAPI DosFileHandleToWin32Handle(HFILE);
2163
DWORD       WINAPI GetProcessDword(DWORD,INT);
2164
VOID        WINAPI GetpWin16Lock(SYSLEVEL**);
2165
DWORD       WINAPI MapLS(LPCVOID);
2166 2167 2168 2169
LPVOID      WINAPI MapSL(DWORD);
VOID        WINAPI ReleaseThunkLock(DWORD*);
VOID        WINAPI RestoreThunkLock(DWORD);
VOID        WINAPI UnMapLS(DWORD);
2170
HFILE       WINAPI Win32HandleToDosFileHandle(HANDLE);
2171
VOID        WINAPI _CheckNotSysLevel(SYSLEVEL *lock);
2172 2173 2174 2175 2176
DWORD       WINAPI _ConfirmWin16Lock(void);
DWORD       WINAPI _ConfirmSysLevel(SYSLEVEL*);
VOID        WINAPI _EnterSysLevel(SYSLEVEL*);
VOID        WINAPI _LeaveSysLevel(SYSLEVEL*);

2177 2178 2179

/* Wine internal functions */

2180
extern char *wine_get_unix_file_name( LPCWSTR dos );
2181
extern WCHAR *wine_get_dos_file_name( LPCSTR str );
2182 2183


2184 2185
/* a few optimizations for i386/gcc */

2186
#if defined(__i386__) && defined(__GNUC__) && defined(__WINESRC__) && !defined(_NTSYSTEM_)
2187

2188 2189
extern inline LONG WINAPI InterlockedCompareExchange( LONG volatile *dest, LONG xchg, LONG compare );
extern inline LONG WINAPI InterlockedCompareExchange( LONG volatile *dest, LONG xchg, LONG compare )
2190
{
2191
    LONG ret;
2192 2193 2194 2195 2196
    __asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
                          : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
    return ret;
}

2197 2198
extern inline LONG WINAPI InterlockedExchange( LONG volatile *dest, LONG val );
extern inline LONG WINAPI InterlockedExchange( LONG volatile *dest, LONG val )
2199 2200 2201 2202 2203 2204 2205
{
    LONG ret;
    __asm__ __volatile__( "lock; xchgl %0,(%1)"
                          : "=r" (ret) :"r" (dest), "0" (val) : "memory" );
    return ret;
}

2206 2207
extern inline LONG WINAPI InterlockedExchangeAdd( LONG volatile *dest, LONG incr );
extern inline LONG WINAPI InterlockedExchangeAdd( LONG volatile *dest, LONG incr )
2208 2209 2210 2211 2212 2213 2214
{
    LONG ret;
    __asm__ __volatile__( "lock; xaddl %0,(%1)"
                          : "=r" (ret) : "r" (dest), "0" (incr) : "memory" );
    return ret;
}

2215 2216
extern inline LONG WINAPI InterlockedIncrement( LONG volatile *dest );
extern inline LONG WINAPI InterlockedIncrement( LONG volatile *dest )
2217 2218 2219 2220
{
    return InterlockedExchangeAdd( dest, 1 ) + 1;
}

2221 2222
extern inline LONG WINAPI InterlockedDecrement( LONG volatile *dest );
extern inline LONG WINAPI InterlockedDecrement( LONG volatile *dest )
2223 2224 2225 2226
{
    return InterlockedExchangeAdd( dest, -1 ) - 1;
}

2227 2228
extern inline DWORD WINAPI GetLastError(void);
extern inline DWORD WINAPI GetLastError(void)
2229 2230
{
    DWORD ret;
2231
    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x34,%0" : "=r" (ret) );
2232 2233 2234
    return ret;
}

2235 2236 2237 2238 2239 2240 2241 2242
extern inline DWORD WINAPI GetCurrentProcessId(void);
extern inline DWORD WINAPI GetCurrentProcessId(void)
{
    DWORD ret;
    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x20,%0" : "=r" (ret) );
    return ret;
}

2243 2244
extern inline DWORD WINAPI GetCurrentThreadId(void);
extern inline DWORD WINAPI GetCurrentThreadId(void)
2245 2246 2247 2248 2249 2250
{
    DWORD ret;
    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x24,%0" : "=r" (ret) );
    return ret;
}

2251 2252
extern inline void WINAPI SetLastError( DWORD err );
extern inline void WINAPI SetLastError( DWORD err )
2253
{
2254
    __asm__ __volatile__( ".byte 0x64\n\tmovl %0,0x34" : : "r" (err) : "memory" );
2255 2256
}

2257 2258 2259
extern inline HANDLE WINAPI GetProcessHeap(void);
extern inline HANDLE WINAPI GetProcessHeap(void)
{
2260
    HANDLE *pdb;
2261
    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x30,%0" : "=r" (pdb) );
2262
    return pdb[0x18 / sizeof(HANDLE)];  /* get dword at offset 0x18 in pdb */
2263 2264
}

2265
#else  /* __i386__ && __GNUC__ && __WINESRC__ && !_NTSYSTEM_ */
2266

2267
DWORD       WINAPI GetCurrentProcessId(void);
2268 2269
DWORD       WINAPI GetCurrentThreadId(void);
DWORD       WINAPI GetLastError(void);
2270
HANDLE      WINAPI GetProcessHeap(void);
2271 2272 2273 2274 2275
LONG        WINAPI InterlockedCompareExchange(LONG volatile*,LONG,LONG);
LONG        WINAPI InterlockedDecrement(LONG volatile*);
LONG        WINAPI InterlockedExchange(LONG volatile*,LONG);
LONG        WINAPI InterlockedExchangeAdd(LONG volatile*,LONG);
LONG        WINAPI InterlockedIncrement(LONG volatile*);
2276
VOID        WINAPI SetLastError(DWORD);
2277

2278
#endif  /* __i386__ && __GNUC__ && __WINESRC__ && !_NTSYSTEM_ */
2279

2280
static inline PVOID WINAPI InterlockedCompareExchangePointer( PVOID volatile *dest, PVOID xchg, PVOID compare )
2281
{
2282 2283 2284 2285 2286 2287
#if defined(__x86_64__) && defined(__GNUC__)
    PVOID ret;
    __asm__ __volatile__( "lock; cmpxchgq %2,(%1)"
                          : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
    return ret;
#else
2288
    return (PVOID)InterlockedCompareExchange( (LONG volatile*)dest, (LONG)xchg, (LONG)compare );
2289
#endif
2290 2291
}

2292
static inline PVOID WINAPI InterlockedExchangePointer( PVOID volatile *dest, PVOID val )
2293
{
2294 2295 2296 2297 2298 2299
#if defined(__x86_64__) && defined(__GNUC__)
    PVOID ret;
    __asm__ __volatile__( "lock; xchgq %0,(%1)"
                          : "=r" (ret) :"r" (dest), "0" (val) : "memory" );
    return ret;
#else
2300
    return (PVOID)InterlockedExchange( (LONG volatile*)dest, (LONG)val );
2301
#endif
2302 2303
}

2304
#ifdef __WINESRC__
2305 2306 2307
#define GetCurrentProcess() ((HANDLE)0xffffffff)
#define GetCurrentThread()  ((HANDLE)0xfffffffe)
#endif
2308

2309 2310 2311 2312
/* WinMain(entry point) must be declared in winbase.h. */
/* If this is not declared, we cannot compile many sources written with C++. */
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int);

2313 2314 2315 2316
#ifdef __cplusplus
}
#endif

Alexandre Julliard's avatar
Alexandre Julliard committed
2317
#endif  /* __WINE_WINBASE_H */