Annotation of mstools/h/winbase.h, revision 1.1.1.2

1.1       root        1: /*++ BUILD Version: 0001    // Increment this if a change has global effects
                      2: 
                      3: Copyright (c) 1990  Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:     winbase.h
                      8: 
                      9: Abstract:
                     10: 
                     11:     This module defines the 32-Bit Windows Base APIs
                     12: 
                     13: Created:
                     14: 
                     15:     18-Sep-1990
                     16: 
                     17: Revision History:
                     18: 
                     19: --*/
                     20: 
                     21: #ifndef _WINBASE_
                     22: #define _WINBASE_
                     23: 
                     24: /*
                     25:  * Compatability macros
                     26:  */
                     27: 
                     28: #define DefineHandleTable(w)            ((w),TRUE)
                     29: #define LimitEmsPages(dw)
                     30: #define SetSwapAreaSize(w)              (w)
                     31: #define LockSegment(w)                  GlobalFix((HANDLE)(w))
                     32: #define UnlockSegment(w)                GlobalUnfix((HANDLE)(w))
1.1.1.2 ! root       33: #define GetCurrentTime()                GetTickCount()
1.1       root       34: 
                     35: #define Yield()
                     36: 
                     37: #define INVALID_HANDLE_VALUE (HANDLE)-1
                     38: #define FILE_BEGIN           0
                     39: #define FILE_CURRENT         1
                     40: #define FILE_END             2
                     41: 
                     42: #define WAIT_OBJECT_0       ((STATUS_WAIT_0 ) + 0 )
                     43: 
                     44: #define WAIT_ABANDONED         ((STATUS_ABANDONED_WAIT_0 ) + 0 )
                     45: #define WAIT_ABANDONED_0       ((STATUS_ABANDONED_WAIT_0 ) + 0 )
                     46: 
                     47: #define WAIT_TIMEOUT                    STATUS_TIMEOUT
1.1.1.2 ! root       48: #define WAIT_IO_COMPLETION              STATUS_USER_APC
1.1       root       49: #define STILL_ACTIVE                    STATUS_PENDING
                     50: #define EXCEPTION_ACCESS_VIOLATION      STATUS_ACCESS_VIOLATION
                     51: #define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
                     52: #define EXCEPTION_BREAKPOINT            STATUS_BREAKPOINT
                     53: #define EXCEPTION_SINGLE_STEP           STATUS_SINGLE_STEP
1.1.1.2 ! root       54: #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
        !            55: #define EXCEPTION_FLT_DENORMAL_OPERAND  STATUS_FLOAT_DENORMAL_OPERAND
        !            56: #define EXCEPTION_FLT_DIVIDE_BY_ZERO    STATUS_FLOAT_DIVIDE_BY_ZERO
        !            57: #define EXCEPTION_FLT_INEXACT_RESULT    STATUS_FLOAT_INEXACT_RESULT
        !            58: #define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
        !            59: #define EXCEPTION_FLT_OVERFLOW          STATUS_FLOAT_OVERFLOW
        !            60: #define EXCEPTION_FLT_STACK_CHECK       STATUS_FLOAT_STACK_CHECK
        !            61: #define EXCEPTION_FLT_UNDERFLOW         STATUS_FLOAT_UNDERFLOW
        !            62: #define EXCEPTION_INT_DIVIDE_BY_ZERO    STATUS_INTEGER_DIVIDE_BY_ZERO
        !            63: #define EXCEPTION_INT_OVERFLOW          STATUS_INTEGER_OVERFLOW
        !            64: #define EXCEPTION_PRIV_INSTRUCTION      STATUS_PRIVILEGED_INSTRUCTION
1.1       root       65: #define CONTROL_C_EXIT                  STATUS_CONTROL_C_EXIT
                     66: 
                     67: //
1.1.1.2 ! root       68: // File creation flags must start at the high end since they
1.1       root       69: // are combined with the attributes
                     70: //
                     71: 
1.1.1.2 ! root       72: #define FILE_FLAG_WRITE_THROUGH     0x80000000
        !            73: #define FILE_FLAG_OVERLAPPED        0x40000000
        !            74: #define FILE_FLAG_NO_BUFFERING      0x20000000
        !            75: #define FILE_FLAG_RANDOM_ACCESS     0x10000000
        !            76: #define FILE_FLAG_SEQUENTIAL_SCAN   0x08000000
        !            77: #define FILE_FLAG_DELETE_ON_CLOSE   0x04000000
        !            78: #define FILE_FLAG_BACKUP_SEMANTICS  0x02000000
1.1       root       79: 
                     80: #define CREATE_NEW          1
                     81: #define CREATE_ALWAYS       2
                     82: #define OPEN_EXISTING       3
                     83: #define OPEN_ALWAYS         4
                     84: #define TRUNCATE_EXISTING   5
                     85: 
                     86: //
                     87: // Define the NamedPipe definitions
                     88: //
                     89: 
                     90: 
                     91: //
                     92: // Define the dwOpenMode values for CreateNamedPipe
                     93: //
                     94: 
                     95: #define PIPE_ACCESS_INBOUND         0x00000001
                     96: #define PIPE_ACCESS_OUTBOUND        0x00000002
                     97: #define PIPE_ACCESS_DUPLEX          0x00000003
                     98: 
                     99: //
                    100: // Define the Named Pipe End flags for GetNamedPipeInfo
                    101: //
                    102: 
                    103: #define PIPE_CLIENT_END             0x00000000
                    104: #define PIPE_SERVER_END             0x00000001
                    105: 
                    106: //
                    107: // Define the dwPipeMode values for CreateNamedPipe
                    108: //
                    109: 
                    110: #define PIPE_WAIT                   0x00000000
                    111: #define PIPE_NOWAIT                 0x00000001
                    112: #define PIPE_READMODE_BYTE          0x00000000
                    113: #define PIPE_READMODE_MESSAGE       0x00000002
                    114: #define PIPE_TYPE_BYTE              0x00000000
                    115: #define PIPE_TYPE_MESSAGE           0x00000004
                    116: 
                    117: //
                    118: // Define the well known values for CreateNamedPipe nMaxInstances
                    119: //
                    120: 
                    121: #define PIPE_UNLIMITED_INSTANCES    255
                    122: 
                    123: //
1.1.1.2 ! root      124: // Define the Security Quality of Service bits to be passed
        !           125: // into CreateFile
1.1       root      126: //
                    127: 
1.1.1.2 ! root      128: #define SECURITY_ANONYMOUS          ( SecurityAnonymous      << 16 )
        !           129: #define SECURITY_IDENTIFICATION     ( SecurityIdentification << 16 )
        !           130: #define SECURITY_IMPERSONATION      ( SecurityImpersonation  << 16 )
        !           131: #define SECURITY_DELEGATION         ( SecurityDelegation     << 16 )
        !           132: 
        !           133: #define SECURITY_CONTEXT_TRACKING  0x00040000
        !           134: #define SECURITY_EFFECTIVE_ONLY    0x00080000
        !           135: 
        !           136: #define SECURITY_SQOS_PRESENT      0x00100000
        !           137: #define SECURITY_VALID_SQOS_FLAGS  0x001F0000
        !           138: 
        !           139: 
1.1       root      140: //
1.1.1.2 ! root      141: // Special values for mailslot information.
1.1       root      142: //
                    143: 
                    144: //
1.1.1.2 ! root      145: // Special value for NextMessageSize to indicate that there is no next
        !           146: // message.
1.1       root      147: //
                    148: 
1.1.1.2 ! root      149: #define MAILSLOT_NO_MESSAGE             ((ULONG)-1)
1.1       root      150: 
                    151: //
                    152: // Special value for read timeout to indicate that mailslot reads should
                    153: // never timeout.
                    154: //
                    155: 
1.1.1.2 ! root      156: #define MAILSLOT_WAIT_FOREVER           ((ULONG)-1)
1.1       root      157: 
                    158: //
                    159: //  File structures
                    160: //
                    161: 
                    162: typedef struct _OVERLAPPED {
                    163:     DWORD   Internal;
                    164:     DWORD   InternalHigh;
                    165:     DWORD   Offset;
                    166:     DWORD   OffsetHigh;
                    167:     HANDLE  hEvent;
                    168: } OVERLAPPED, *LPOVERLAPPED;
                    169: 
                    170: typedef struct _SECURITY_ATTRIBUTES {
                    171:     DWORD nLength;
                    172:     LPVOID lpSecurityDescriptor;
                    173:     BOOL bInheritHandle;
                    174: } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
                    175: 
                    176: typedef struct _PROCESS_INFORMATION {
                    177:     HANDLE hProcess;
                    178:     HANDLE hThread;
                    179:     DWORD dwProcessId;
                    180:     DWORD dwThreadId;
                    181: } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
                    182: 
                    183: //
                    184: //  File System time stamps are represented with the following structure:
                    185: //
                    186: 
                    187: typedef struct _FILETIME {
                    188:     DWORD dwLowDateTime;
                    189:     DWORD dwHighDateTime;
                    190: } FILETIME, *PFILETIME, *LPFILETIME;
                    191: 
                    192: //
                    193: // System time is represented with the following structure:
                    194: //
                    195: 
                    196: typedef struct _SYSTEMTIME {
                    197:     WORD wYear;
                    198:     WORD wMonth;
                    199:     WORD wDayOfWeek;
                    200:     WORD wDay;
                    201:     WORD wHour;
                    202:     WORD wMinute;
                    203:     WORD wSecond;
                    204:     WORD wMilliseconds;
                    205: } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
                    206: 
                    207: typedef DWORD (*PTHREAD_START_ROUTINE)(
                    208:     LPVOID lpThreadParameter
                    209:     );
                    210: typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
                    211: 
                    212: typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
                    213: typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
                    214: typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
                    215: 
                    216: #ifdef i386
                    217: typedef PLDT_ENTRY LPLDT_ENTRY;
                    218: #else
                    219: typedef LPVOID LPLDT_ENTRY;
                    220: #endif
                    221: 
                    222: #define MUTEX_MODIFY_STATE MUTANT_QUERY_STATE
                    223: #define MUTEX_ALL_ACCESS MUTANT_ALL_ACCESS
                    224: 
                    225: //
1.1.1.2 ! root      226: // Serial provider type.
        !           227: //
        !           228: 
        !           229: #define SP_SERIALCOMM    ((DWORD)0x00000001)
        !           230: 
        !           231: //
        !           232: // Provider SubTypes
        !           233: //
        !           234: 
        !           235: #define PST_UNSPECIFIED      ((DWORD)0x00000000)
        !           236: #define PST_RS232            ((DWORD)0x00000001)
        !           237: #define PST_PARALLELPORT     ((DWORD)0x00000002)
        !           238: #define PST_RS422            ((DWORD)0x00000003)
        !           239: #define PST_RS423            ((DWORD)0x00000004)
        !           240: #define PST_RS449            ((DWORD)0x00000005)
        !           241: #define PST_FAX              ((DWORD)0x00000021)
        !           242: #define PST_SCANNER          ((DWORD)0x00000022)
        !           243: #define PST_NETWORK_BRIDGE   ((DWORD)0x00000100)
        !           244: #define PST_LAT              ((DWORD)0x00000101)
        !           245: #define PST_TCPIP_TELNET     ((DWORD)0x00000102)
        !           246: #define PST_X25              ((DWORD)0x00000103)
        !           247: 
        !           248: 
        !           249: //
1.1       root      250: // Provider capabilities flags.
                    251: //
                    252: 
1.1.1.2 ! root      253: #define PCF_DTRDSR        ((DWORD)0x0001)
        !           254: #define PCF_RTSCTS        ((DWORD)0x0002)
        !           255: #define PCF_RLSD          ((DWORD)0x0004)
        !           256: #define PCF_PARITY_CHECK  ((DWORD)0x0008)
        !           257: #define PCF_XONXOFF       ((DWORD)0x0010)
        !           258: #define PCF_SETXCHAR      ((DWORD)0x0020)
        !           259: #define PCF_TOTALTIMEOUTS ((DWORD)0x0040)
        !           260: #define PCF_INTTIMEOUTS   ((DWORD)0x0080)
        !           261: #define PCF_SPECIALCHARS  ((DWORD)0x0100)
        !           262: #define PCF_16BITMODE     ((DWORD)0x0200)
1.1       root      263: 
                    264: //
                    265: // Comm provider settable parameters.
                    266: //
                    267: 
                    268: #define SP_PARITY         ((DWORD)0x0001)
                    269: #define SP_BAUD           ((DWORD)0x0002)
                    270: #define SP_DATABITS       ((DWORD)0x0004)
                    271: #define SP_STOPBITS       ((DWORD)0x0008)
                    272: #define SP_HANDSHAKING    ((DWORD)0x0010)
                    273: #define SP_PARITY_CHECK   ((DWORD)0x0020)
1.1.1.2 ! root      274: #define SP_RLSD           ((DWORD)0x0040)
1.1       root      275: 
                    276: //
                    277: // Settable baud rates in the provider.
                    278: //
                    279: 
                    280: #define BAUD_075          ((DWORD)0x00000001)
                    281: #define BAUD_110          ((DWORD)0x00000002)
                    282: #define BAUD_134_5        ((DWORD)0x00000004)
                    283: #define BAUD_150          ((DWORD)0x00000008)
                    284: #define BAUD_300          ((DWORD)0x00000010)
                    285: #define BAUD_600          ((DWORD)0x00000020)
                    286: #define BAUD_1200         ((DWORD)0x00000040)
                    287: #define BAUD_1800         ((DWORD)0x00000080)
                    288: #define BAUD_2400         ((DWORD)0x00000100)
                    289: #define BAUD_4800         ((DWORD)0x00000200)
                    290: #define BAUD_7200         ((DWORD)0x00000400)
                    291: #define BAUD_9600         ((DWORD)0x00000800)
                    292: #define BAUD_14400        ((DWORD)0x00001000)
                    293: #define BAUD_19200        ((DWORD)0x00002000)
                    294: #define BAUD_38400        ((DWORD)0x00004000)
                    295: #define BAUD_56K          ((DWORD)0x00008000)
1.1.1.2 ! root      296: #define BAUD_128K         ((DWORD)0x00010000)
1.1       root      297: #define BAUD_USER         ((DWORD)0x10000000)
                    298: 
                    299: //
                    300: // Settable Data Bits
                    301: //
                    302: 
                    303: #define DATABITS_5        ((WORD)0x0001)
                    304: #define DATABITS_6        ((WORD)0x0002)
                    305: #define DATABITS_7        ((WORD)0x0004)
                    306: #define DATABITS_8        ((WORD)0x0008)
                    307: #define DATABITS_16       ((WORD)0x0010)
                    308: #define DATABITS_16X      ((WORD)0x0020)
                    309: 
                    310: //
                    311: // Settable Stop and Parity bits.
                    312: //
                    313: 
                    314: #define STOPBITS_10       ((WORD)0x0001)
                    315: #define STOPBITS_15       ((WORD)0x0002)
                    316: #define STOPBITS_20       ((WORD)0x0004)
                    317: #define PARITY_NONE       ((WORD)0x0100)
                    318: #define PARITY_ODD        ((WORD)0x0200)
                    319: #define PARITY_EVEN       ((WORD)0x0400)
                    320: #define PARITY_MARK       ((WORD)0x0800)
                    321: #define PARITY_SPACE      ((WORD)0x1000)
                    322: 
                    323: typedef struct _COMMPROP {
                    324:     WORD wPacketLength;
                    325:     WORD wPacketVersion;
                    326:     DWORD dwServiceMask;
1.1.1.2 ! root      327:     DWORD dwReserved1;
1.1       root      328:     DWORD dwMaxTxQueue;
                    329:     DWORD dwMaxRxQueue;
                    330:     DWORD dwMaxBaud;
                    331:     DWORD dwProvSubType;
                    332:     DWORD dwProvCapabilities;
                    333:     DWORD dwSettableParams;
                    334:     DWORD dwSettableBaud;
                    335:     WORD wSettableData;
                    336:     WORD wSettableStopParity;
                    337:     DWORD dwCurrentTxQueue;
                    338:     DWORD dwCurrentRxQueue;
                    339:     DWORD dwProvSpec1;
                    340:     DWORD dwProvSpec2;
1.1.1.2 ! root      341:     WCHAR wcProvChar[1];
1.1       root      342: } COMMPROP,*LPCOMMPROP;
                    343: 
                    344: typedef struct _COMSTAT {
                    345:     DWORD fCtsHold : 1;
                    346:     DWORD fDsrHold : 1;
                    347:     DWORD fRlsdHold : 1;
                    348:     DWORD fXoffHold : 1;
                    349:     DWORD fXoffSent : 1;
                    350:     DWORD fEof : 1;
                    351:     DWORD fTxim : 1;
                    352:     DWORD fReserved : 17;
                    353:     DWORD cbInQue;
                    354:     DWORD cbOutQue;
                    355: } COMSTAT, *LPCOMSTAT;
                    356: 
                    357: //
                    358: // DTR Control Flow Values.
                    359: //
                    360: #define DTR_CONTROL_DISABLE    0x00
                    361: #define DTR_CONTROL_ENABLE     0x01
                    362: #define DTR_CONTROL_HANDSHAKE  0x02
                    363: 
                    364: //
                    365: // RTS Control Flow Values
                    366: //
                    367: #define RTS_CONTROL_DISABLE    0x00
                    368: #define RTS_CONTROL_ENABLE     0x01
                    369: #define RTS_CONTROL_HANDSHAKE  0x02
1.1.1.2 ! root      370: #define RTS_CONTROL_TOGGLE     0x03
1.1       root      371: 
                    372: typedef struct _DCB {
                    373:     DWORD DCBlength;      /* sizeof(DCB)                     */
                    374:     DWORD BaudRate;       /* Baudrate at which running       */
                    375:     DWORD fBinary: 1;     /* Binary Mode (skip EOF check)    */
                    376:     DWORD fParity: 1;     /* Enable parity checking          */
                    377:     DWORD fOutxCtsFlow:1; /* CTS handshaking on output       */
                    378:     DWORD fOutxDsrFlow:1; /* DSR handshaking on output       */
                    379:     DWORD fDtrControl:2;  /* DTR Flow control                */
1.1.1.2 ! root      380:     DWORD fDsrSensitivity:1; /* DSR Sensitivity              */
        !           381:     DWORD fTXContinueOnXoff: 1; /* Continue TX when Xoff sent */
1.1       root      382:     DWORD fOutX: 1;       /* Enable output X-ON/X-OFF        */
                    383:     DWORD fInX: 1;        /* Enable input X-ON/X-OFF         */
1.1.1.2 ! root      384:     DWORD fErrorChar: 1;  /* Enable Err Replacement          */
1.1       root      385:     DWORD fNull: 1;       /* Enable Null stripping           */
                    386:     DWORD fRtsControl:2;  /* Rts Flow control                */
1.1.1.2 ! root      387:     DWORD fAbortOnError:1; /* Abort all reads and writes on Error */
        !           388:     DWORD fDummy2:1;      /* Reserved                        */
        !           389:     WORD wReserved;       /* Not currently used              */
1.1       root      390:     WORD XonLim;          /* Transmit X-ON threshold         */
                    391:     WORD XoffLim;         /* Transmit X-OFF threshold        */
                    392:     BYTE ByteSize;        /* Number of bits/byte, 4-8        */
                    393:     BYTE Parity;          /* 0-4=None,Odd,Even,Mark,Space    */
                    394:     BYTE StopBits;        /* 0,1,2 = 1, 1.5, 2               */
                    395:     char XonChar;         /* Tx and Rx X-ON character        */
                    396:     char XoffChar;        /* Tx and Rx X-OFF character       */
1.1.1.2 ! root      397:     char ErrorChar;       /* Error replacement char          */
1.1       root      398:     char EofChar;         /* End of Input character          */
                    399:     char EvtChar;         /* Recieved Event character        */
                    400: } DCB, *LPDCB;
                    401: 
                    402: typedef struct _COMMTIMEOUTS {
                    403:     DWORD ReadIntervalTimeout;          /* Maximum time between read chars. */
                    404:     DWORD ReadTotalTimeoutMultiplier;   /* Multiplier of characters.        */
                    405:     DWORD ReadTotalTimeoutConstant;     /* Constant in milliseconds.        */
                    406:     DWORD WriteTotalTimeoutMultiplier;  /* Multiplier of characters.        */
                    407:     DWORD WriteTotalTimeoutConstant;    /* Constant in milliseconds.        */
                    408: } COMMTIMEOUTS,*LPCOMMTIMEOUTS;
                    409: 
                    410: typedef struct _SYSTEM_INFO {
                    411:     DWORD dwOemId;
                    412:     DWORD dwPageSize;
                    413:     LPVOID lpMinimumApplicationAddress;
                    414:     LPVOID lpMaximumApplicationAddress;
                    415:     DWORD dwActiveProcessorMask;
                    416:     DWORD dwNumberOfProcessors;
                    417:     DWORD dwProcessorType;
                    418:     DWORD dwProcessorRevision;
                    419:     DWORD dwProcessorOptions;
                    420: } SYSTEM_INFO, *LPSYSTEM_INFO;
                    421: 
                    422: #define FreeModule(hLibModule) FreeLibrary((hLibModule))
                    423: #define MakeProcInstance(lpProc,hInstance) (lpProc)
                    424: #define FreeProcInstance(lpProc)
                    425: 
                    426: /* Global Memory Flags */
                    427: #define GMEM_FIXED          0x0000
                    428: #define GMEM_MOVEABLE       0x0002
                    429: #define GMEM_NOCOMPACT      0x0010
                    430: #define GMEM_NODISCARD      0x0020
                    431: #define GMEM_ZEROINIT       0x0040
                    432: #define GMEM_MODIFY         0x0080
                    433: #define GMEM_DISCARDABLE    0x0100
                    434: #define GMEM_NOT_BANKED     0x1000
                    435: #define GMEM_SHARE          0x2000
                    436: #define GMEM_DDESHARE       0x2000
                    437: #define GMEM_NOTIFY         0x4000
                    438: #define GMEM_LOWER          GMEM_NOT_BANKED
                    439: #define GMEM_VALID_FLAGS    0x7F72
                    440: #define GMEM_INVALID_HANDLE 0x8000
                    441: 
                    442: #define GHND                (GMEM_MOVEABLE | GMEM_ZEROINIT)
                    443: #define GPTR                (GMEM_FIXED | GMEM_ZEROINIT)
                    444: 
1.1.1.2 ! root      445: #define GlobalLRUNewest( h )    (HANDLE)(h)
        !           446: #define GlobalLRUOldest( h )    (HANDLE)(h)
        !           447: #define GlobalDiscard( h )      GlobalReAlloc( (h), 0, GMEM_MOVEABLE )
1.1       root      448: 
                    449: /* Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE) */
                    450: #define GMEM_DISCARDED      0x4000
                    451: #define GMEM_LOCKCOUNT      0x00FF
                    452: 
                    453: typedef struct _MEMORYSTATUS {
                    454:     DWORD dwLength;
                    455:     DWORD dwMemoryLoad;
                    456:     DWORD dwTotalPhys;
                    457:     DWORD dwAvailPhys;
                    458:     DWORD dwTotalPageFile;
                    459:     DWORD dwAvailPageFile;
                    460:     DWORD dwTotalVirtual;
                    461:     DWORD dwAvailVirtual;
                    462: } MEMORYSTATUS, *LPMEMORYSTATUS;
                    463: 
                    464: /* Local Memory Flags */
                    465: #define LMEM_FIXED          0x0000
                    466: #define LMEM_MOVEABLE       0x0002
                    467: #define LMEM_NOCOMPACT      0x0010
                    468: #define LMEM_NODISCARD      0x0020
                    469: #define LMEM_ZEROINIT       0x0040
                    470: #define LMEM_MODIFY         0x0080
                    471: #define LMEM_DISCARDABLE    0x0F00
                    472: #define LMEM_VALID_FLAGS    0x0F72
                    473: #define LMEM_INVALID_HANDLE 0x8000
                    474: 
                    475: #define LHND                (LMEM_MOVEABLE | LMEM_ZEROINIT)
                    476: #define LPTR                (LMEM_FIXED | LMEM_ZEROINIT)
                    477: 
                    478: #define NONZEROLHND         (LMEM_MOVEABLE)
                    479: #define NONZEROLPTR         (LMEM_FIXED)
                    480: 
1.1.1.2 ! root      481: #define LocalDiscard( h )   LocalReAlloc( (h), 0, LMEM_MOVEABLE )
1.1       root      482: 
                    483: /* Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) */
                    484: #define LMEM_DISCARDED      0x4000
                    485: #define LMEM_LOCKCOUNT      0x00FF
                    486: 
                    487: //
                    488: // dwCreationFlag values
                    489: //
                    490: 
                    491: #define DEBUG_PROCESS               0x00000001
                    492: #define DEBUG_ONLY_THIS_PROCESS     0x00000002
                    493: 
                    494: #define CREATE_SUSPENDED            0x00000004
                    495: 
                    496: #define DETACHED_PROCESS            0x00000008
                    497: 
                    498: #define CREATE_NEW_CONSOLE          0x00000010
                    499: 
1.1.1.2 ! root      500: #define NORMAL_PRIORITY_CLASS       0x00000020
        !           501: #define IDLE_PRIORITY_CLASS         0x00000040
        !           502: #define HIGH_PRIORITY_CLASS         0x00000080
        !           503: 
        !           504: #define CREATE_NO_WINDOW            0x08000000
        !           505: 
1.1       root      506: #define PROFILE_USER                0x10000000
                    507: #define PROFILE_KERNEL              0x20000000
                    508: #define PROFILE_SERVER              0x40000000
                    509: 
                    510: #define THREAD_PRIORITY_LOWEST          THREAD_BASE_PRIORITY_MIN
                    511: #define THREAD_PRIORITY_BELOW_NORMAL    (THREAD_PRIORITY_LOWEST+1)
                    512: #define THREAD_PRIORITY_NORMAL          0
                    513: #define THREAD_PRIORITY_HIGHEST         THREAD_BASE_PRIORITY_MAX
                    514: #define THREAD_PRIORITY_ABOVE_NORMAL    (THREAD_PRIORITY_HIGHEST-1)
                    515: #define THREAD_PRIORITY_ERROR_RETURN    (MAXLONG)
                    516: 
                    517: //
                    518: // Debug APIs
                    519: //
                    520: #define EXCEPTION_DEBUG_EVENT       1
                    521: #define CREATE_THREAD_DEBUG_EVENT   2
                    522: #define CREATE_PROCESS_DEBUG_EVENT  3
                    523: #define EXIT_THREAD_DEBUG_EVENT     4
                    524: #define EXIT_PROCESS_DEBUG_EVENT    5
                    525: #define LOAD_DLL_DEBUG_EVENT        6
                    526: #define UNLOAD_DLL_DEBUG_EVENT      7
                    527: #define OUTPUT_DEBUG_STRING_EVENT   8
1.1.1.2 ! root      528: #define RIP_EVENT                   9
1.1       root      529: 
                    530: typedef struct _EXCEPTION_DEBUG_INFO {
                    531:     EXCEPTION_RECORD ExceptionRecord;
                    532:     DWORD dwFirstChance;
                    533: } EXCEPTION_DEBUG_INFO, *LPEXCEPTION_DEBUG_INFO;
                    534: 
                    535: typedef struct _CREATE_THREAD_DEBUG_INFO {
                    536:     HANDLE hThread;
                    537:     LPTHREAD_START_ROUTINE lpStartAddress;
                    538: } CREATE_THREAD_DEBUG_INFO, *LPCREATE_THREAD_DEBUG_INFO;
                    539: 
                    540: typedef struct _CREATE_PROCESS_DEBUG_INFO {
                    541:     HANDLE hFile;
                    542:     HANDLE hProcess;
                    543:     HANDLE hThread;
                    544:     LPVOID lpBaseOfImage;
                    545:     DWORD dwDebugInfoFileOffset;
                    546:     DWORD nDebugInfoSize;
                    547:     LPTHREAD_START_ROUTINE lpStartAddress;
                    548: } CREATE_PROCESS_DEBUG_INFO, *LPCREATE_PROCESS_DEBUG_INFO;
                    549: 
                    550: typedef struct _EXIT_THREAD_DEBUG_INFO {
                    551:     DWORD dwExitCode;
                    552: } EXIT_THREAD_DEBUG_INFO, *LPEXIT_THREAD_DEBUG_INFO;
                    553: 
                    554: typedef struct _EXIT_PROCESS_DEBUG_INFO {
                    555:     DWORD dwExitCode;
                    556: } EXIT_PROCESS_DEBUG_INFO, *LPEXIT_PROCESS_DEBUG_INFO;
                    557: 
                    558: typedef struct _LOAD_DLL_DEBUG_INFO {
                    559:     HANDLE hFile;
                    560:     LPVOID lpBaseOfDll;
                    561:     DWORD dwDebugInfoFileOffset;
                    562:     DWORD nDebugInfoSize;
                    563: } LOAD_DLL_DEBUG_INFO, *LPLOAD_DLL_DEBUG_INFO;
                    564: 
                    565: typedef struct _UNLOAD_DLL_DEBUG_INFO {
                    566:     LPVOID lpBaseOfDll;
                    567: } UNLOAD_DLL_DEBUG_INFO, *LPUNLOAD_DLL_DEBUG_INFO;
                    568: 
                    569: typedef struct _OUTPUT_DEBUG_STRING_INFO {
                    570:     LPSTR lpDebugStringData;
                    571:     WORD fUnicode;
                    572:     WORD nDebugStringLength;
                    573: } OUTPUT_DEBUG_STRING_INFO, *LPOUTPUT_DEBUG_STRING_INFO;
                    574: 
1.1.1.2 ! root      575: typedef struct _RIP_INFO {
        !           576:     DWORD dwError;
        !           577:     DWORD dwType;
        !           578: } RIP_INFO, *LPRIP_INFO;
        !           579: 
        !           580: 
1.1       root      581: typedef struct _DEBUG_EVENT {
                    582:     DWORD dwDebugEventCode;
                    583:     DWORD dwProcessId;
                    584:     DWORD dwThreadId;
                    585:     union {
                    586:         EXCEPTION_DEBUG_INFO Exception;
                    587:         CREATE_THREAD_DEBUG_INFO CreateThread;
                    588:         CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
                    589:         EXIT_THREAD_DEBUG_INFO ExitThread;
                    590:         EXIT_THREAD_DEBUG_INFO ExitProcess;
                    591:         LOAD_DLL_DEBUG_INFO LoadDll;
                    592:         UNLOAD_DLL_DEBUG_INFO UnloadDll;
                    593:         OUTPUT_DEBUG_STRING_INFO DebugString;
1.1.1.2 ! root      594:         RIP_INFO RipInfo;
1.1       root      595:     } u;
                    596: } DEBUG_EVENT, *LPDEBUG_EVENT;
                    597: 
                    598: typedef PCONTEXT LPCONTEXT;
                    599: typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
1.1.1.2 ! root      600: typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
1.1       root      601: 
                    602: #define DRIVE_REMOVABLE 2
                    603: #define DRIVE_FIXED     3
                    604: #define DRIVE_REMOTE    4
                    605: #define DRIVE_CDROM     5
                    606: #define DRIVE_RAMDISK   6
                    607: 
                    608: 
                    609: #define GetFreeSpace(w)                 (0x100000L)
                    610: 
                    611: 
                    612: #define FILE_TYPE_UNKNOWN   0x0000
                    613: #define FILE_TYPE_DISK      0x0001
                    614: #define FILE_TYPE_CHAR      0x0002
                    615: #define FILE_TYPE_PIPE      0x0003
                    616: #define FILE_TYPE_REMOTE    0x8000
                    617: 
                    618: 
                    619: #define STD_INPUT_HANDLE    (DWORD)-10
                    620: #define STD_OUTPUT_HANDLE   (DWORD)-11
                    621: #define STD_ERROR_HANDLE      (DWORD)-12
                    622: 
                    623: #define NOPARITY            0
                    624: #define ODDPARITY           1
                    625: #define EVENPARITY          2
                    626: #define MARKPARITY          3
                    627: #define SPACEPARITY         4
                    628: 
                    629: #define ONESTOPBIT          0
                    630: #define ONE5STOPBITS        1
                    631: #define TWOSTOPBITS         2
                    632: 
                    633: #define IGNORE              0       // Ignore signal
                    634: #define INFINITE            0xFFFFFFFF  // Infinite timeout
                    635: 
                    636: //
                    637: // Basud rates at which the communication device operates
                    638: //
                    639: 
                    640: #define CBR_110             110
                    641: #define CBR_300             300
                    642: #define CBR_600             600
                    643: #define CBR_1200            1200
                    644: #define CBR_2400            2400
                    645: #define CBR_4800            4800
                    646: #define CBR_9600            9600
                    647: #define CBR_14400           14400
                    648: #define CBR_19200           19200
                    649: #define CBR_38400           38400
                    650: #define CBR_56000           56000
                    651: #define CBR_128000          128000
                    652: #define CBR_256000          256000
                    653: 
                    654: //
                    655: // Error Flags
                    656: //
                    657: 
                    658: #define CE_RXOVER           0x0001  // Receive Queue overflow
                    659: #define CE_OVERRUN          0x0002  // Receive Overrun Error
                    660: #define CE_RXPARITY         0x0004  // Receive Parity Error
                    661: #define CE_FRAME            0x0008  // Receive Framing error
                    662: #define CE_BREAK            0x0010  // Break Detected
                    663: #define CE_TXFULL           0x0100  // TX Queue is full
                    664: #define CE_PTO              0x0200  // LPTx Timeout
                    665: #define CE_IOE              0x0400  // LPTx I/O Error
                    666: #define CE_DNS              0x0800  // LPTx Device not selected
                    667: #define CE_OOP              0x1000  // LPTx Out-Of-Paper
                    668: #define CE_MODE             0x8000  // Requested mode unsupported
                    669: 
                    670: #define IE_BADID            (-1)    // Invalid or unsupported id
                    671: #define IE_OPEN             (-2)    // Device Already Open
                    672: #define IE_NOPEN            (-3)    // Device Not Open
                    673: #define IE_MEMORY           (-4)    // Unable to allocate queues
                    674: #define IE_DEFAULT          (-5)    // Error in default parameters
                    675: #define IE_HARDWARE         (-10)   // Hardware Not Present
                    676: #define IE_BYTESIZE         (-11)   // Illegal Byte Size
                    677: #define IE_BAUDRATE         (-12)   // Unsupported BaudRate
                    678: 
                    679: //
                    680: // Events
                    681: //
                    682: 
                    683: #define EV_RXCHAR           0x0001  // Any Character received
                    684: #define EV_RXFLAG           0x0002  // Received certain character
                    685: #define EV_TXEMPTY          0x0004  // Transmitt Queue Empty
                    686: #define EV_CTS              0x0008  // CTS changed state
                    687: #define EV_DSR              0x0010  // DSR changed state
                    688: #define EV_RLSD             0x0020  // RLSD changed state
                    689: #define EV_BREAK            0x0040  // BREAK received
                    690: #define EV_ERR              0x0080  // Line status error occurred
                    691: #define EV_RING             0x0100  // Ring signal detected
                    692: #define EV_PERR             0x0200  // Printer error occured
                    693: #define EV_RX80FULL         0x0400  // Receive buffer is 80 percent full
                    694: #define EV_EVENT1           0x0800  // Provider specific event 1
                    695: #define EV_EVENT2           0x1000  // Provider specific event 2
                    696: 
                    697: //
                    698: // Escape Functions
                    699: //
                    700: 
                    701: #define SETXOFF             1       // Simulate XOFF received
                    702: #define SETXON              2       // Simulate XON received
                    703: #define SETRTS              3       // Set RTS high
                    704: #define CLRRTS              4       // Set RTS low
                    705: #define SETDTR              5       // Set DTR high
                    706: #define CLRDTR              6       // Set DTR low
                    707: #define RESETDEV            7       // Reset device if possible
                    708: #define SETBREAK            8       // Set the device break line.
                    709: #define CLRBREAK            9       // Clear the device break line.
                    710: 
                    711: //
                    712: // PURGE function flags.
                    713: //
                    714: #define PURGE_TXABORT       0x0001  // Kill the pending/current writes to the comm port.
                    715: #define PURGE_RXABORT       0x0002  // Kill the pending/current reads to the comm port.
                    716: #define PURGE_TXCLEAR       0x0004  // Kill the transmit queue if there.
                    717: #define PURGE_RXCLEAR       0x0008  // Kill the typeahead buffer if there.
                    718: 
                    719: #define LPTx                0x80    // Set if ID is for LPT device
                    720: 
                    721: //
                    722: // Modem Status Flags
                    723: //
                    724: #define MS_CTS_ON           ((DWORD)0x0010)
                    725: #define MS_DSR_ON           ((DWORD)0x0020)
                    726: #define MS_RING_ON          ((DWORD)0x0040)
                    727: #define MS_RLSD_ON          ((DWORD)0x0080)
                    728: 
                    729: //
                    730: // WaitSoundState() Constants
                    731: //
                    732: 
                    733: #define S_QUEUEEMPTY        0
                    734: #define S_THRESHOLD         1
                    735: #define S_ALLTHRESHOLD      2
                    736: 
                    737: //
                    738: // Accent Modes
                    739: //
                    740: 
                    741: #define S_NORMAL      0
                    742: #define S_LEGATO      1
                    743: #define S_STACCATO    2
                    744: 
                    745: //
                    746: // SetSoundNoise() Sources
                    747: //
                    748: 
                    749: #define S_PERIOD512   0     // Freq = N/512 high pitch, less coarse hiss
                    750: #define S_PERIOD1024  1     // Freq = N/1024
                    751: #define S_PERIOD2048  2     // Freq = N/2048 low pitch, more coarse hiss
                    752: #define S_PERIODVOICE 3     // Source is frequency from voice channel (3)
                    753: #define S_WHITE512    4     // Freq = N/512 high pitch, less coarse hiss
                    754: #define S_WHITE1024   5     // Freq = N/1024
                    755: #define S_WHITE2048   6     // Freq = N/2048 low pitch, more coarse hiss
                    756: #define S_WHITEVOICE  7     // Source is frequency from voice channel (3)
                    757: 
                    758: #define S_SERDVNA     (-1)  // Device not available
                    759: #define S_SEROFM      (-2)  // Out of memory
                    760: #define S_SERMACT     (-3)  // Music active
                    761: #define S_SERQFUL     (-4)  // Queue full
                    762: #define S_SERBDNT     (-5)  // Invalid note
                    763: #define S_SERDLN      (-6)  // Invalid note length
                    764: #define S_SERDCC      (-7)  // Invalid note count
                    765: #define S_SERDTP      (-8)  // Invalid tempo
                    766: #define S_SERDVL      (-9)  // Invalid volume
                    767: #define S_SERDMD      (-10) // Invalid mode
                    768: #define S_SERDSH      (-11) // Invalid shape
                    769: #define S_SERDPT      (-12) // Invalid pitch
                    770: #define S_SERDFQ      (-13) // Invalid frequency
                    771: #define S_SERDDR      (-14) // Invalid duration
                    772: #define S_SERDSR      (-15) // Invalid source
                    773: #define S_SERDST      (-16) // Invalid state
                    774: 
                    775: #define NMPWAIT_WAIT_FOREVER            0xffffffff
                    776: #define NMPWAIT_NOWAIT                  0x00000001
                    777: #define NMPWAIT_USE_DEFAULT_WAIT        0x00000000
                    778: 
                    779: #define FS_CASE_IS_PRESERVED            FILE_CASE_PRESERVED_NAMES
                    780: #define FS_CASE_SENSITIVE               FILE_CASE_SENSITIVE_SEARCH
                    781: #define FS_UNICODE_STORED_ON_DISK       FILE_UNICODE_ON_DISK
                    782: 
                    783: #define FILE_MAP_WRITE      SECTION_MAP_WRITE
                    784: #define FILE_MAP_READ       SECTION_MAP_READ
                    785: #define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS
                    786: 
                    787: #define OF_READ             0x00000000
                    788: #define OF_WRITE            0x00000001
                    789: #define OF_READWRITE        0x00000002
                    790: #define OF_SHARE_COMPAT     0x00000000
                    791: #define OF_SHARE_EXCLUSIVE  0x00000010
                    792: #define OF_SHARE_DENY_WRITE 0x00000020
                    793: #define OF_SHARE_DENY_READ  0x00000030
                    794: #define OF_SHARE_DENY_NONE  0x00000040
                    795: #define OF_PARSE            0x00000100
                    796: #define OF_DELETE           0x00000200
                    797: #define OF_VERIFY           0x00000400
                    798: #define OF_CANCEL           0x00000800
                    799: #define OF_CREATE           0x00001000
                    800: #define OF_PROMPT           0x00002000
                    801: #define OF_EXIST            0x00004000
                    802: #define OF_REOPEN           0x00008000
                    803: 
1.1.1.2 ! root      804: #define OFS_MAXPATHNAME 128
1.1       root      805: typedef struct _OFSTRUCT {
                    806:     BYTE cBytes;
                    807:     BYTE fFixedDisk;
                    808:     WORD nErrCode;
                    809:     WORD Reserved1;
                    810:     WORD Reserved2;
1.1.1.2 ! root      811:     BYTE szPathName[OFS_MAXPATHNAME];
1.1       root      812: } OFSTRUCT, *LPOFSTRUCT, *POFSTRUCT;
                    813: 
                    814: LONG
1.1.1.2 ! root      815: WINAPI
1.1       root      816: InterlockedIncrement(
                    817:     LPLONG lpAddend
                    818:     );
                    819: 
                    820: LONG
1.1.1.2 ! root      821: WINAPI
1.1       root      822: InterlockedDecrement(
                    823:     LPLONG lpAddend
                    824:     );
                    825: 
1.1.1.2 ! root      826: BOOL
        !           827: WINAPI
1.1       root      828: FreeResource(
1.1.1.2 ! root      829:         HGLOBAL hResData
1.1       root      830:         );
                    831: 
1.1.1.2 ! root      832: LPVOID
        !           833: WINAPI
1.1       root      834: LockResource(
1.1.1.2 ! root      835:         HGLOBAL hResData
1.1       root      836:         );
                    837: 
                    838: #define UnlockResource(hResData) ((hResData), 0)
                    839: #define MAXINTATOM 0xC000
1.1.1.2 ! root      840: #define MAKEINTATOM(i)  (LPTSTR)((DWORD)((WORD)(i)))
        !           841: #define INVALID_ATOM ((ATOM)0)
1.1       root      842: 
                    843: int
1.1.1.2 ! root      844: WINAPI
1.1       root      845: WinMain(
                    846:     HANDLE hInstance,
                    847:     HANDLE hPrevInstance,
                    848:     LPSTR lpCmdLine,
                    849:     int nShowCmd
                    850:     );
                    851: 
                    852: BOOL
1.1.1.2 ! root      853: WINAPI
1.1       root      854: FreeLibrary(
                    855:     HANDLE hLibModule
                    856:     );
                    857: 
                    858: FARPROC
1.1.1.2 ! root      859: WINAPI
1.1       root      860: GetProcAddress(
                    861:     HANDLE hModule,
1.1.1.2 ! root      862:     LPCSTR lpProcName
1.1       root      863:     );
                    864: 
                    865: DWORD
1.1.1.2 ! root      866: WINAPI
1.1       root      867: GetVersion( VOID );
                    868: 
1.1.1.2 ! root      869: HGLOBAL
        !           870: WINAPI
1.1       root      871: GlobalAlloc(
1.1.1.2 ! root      872:     UINT uFlags,
1.1       root      873:     DWORD dwBytes
                    874:     );
                    875: 
1.1.1.2 ! root      876: HGLOBAL
        !           877: WINAPI
1.1       root      878: GlobalReAlloc(
1.1.1.2 ! root      879:     HGLOBAL hMem,
1.1       root      880:     DWORD dwBytes,
1.1.1.2 ! root      881:     UINT uFlags
1.1       root      882:     );
                    883: 
                    884: DWORD
1.1.1.2 ! root      885: WINAPI
1.1       root      886: GlobalSize(
1.1.1.2 ! root      887:     HGLOBAL hMem
1.1       root      888:     );
                    889: 
1.1.1.2 ! root      890: UINT
        !           891: WINAPI
1.1       root      892: GlobalFlags(
1.1.1.2 ! root      893:     HGLOBAL hMem
1.1       root      894:     );
                    895: 
                    896: 
1.1.1.2 ! root      897: LPVOID
        !           898: WINAPI
1.1       root      899: GlobalLock(
1.1.1.2 ! root      900:     HGLOBAL hMem
1.1       root      901:     );
                    902: 
1.1.1.2 ! root      903: //!!!MWH My version  win31 = DWORD WINAPI GlobalHandle(UINT)
        !           904: HGLOBAL
        !           905: WINAPI
1.1       root      906: GlobalHandle(
1.1.1.2 ! root      907:     LPVOID pMem
1.1       root      908:     );
                    909: 
                    910: 
                    911: BOOL
1.1.1.2 ! root      912: WINAPI
1.1       root      913: GlobalUnlock(
1.1.1.2 ! root      914:     HGLOBAL hMem
1.1       root      915:     );
                    916: 
                    917: 
1.1.1.2 ! root      918: HGLOBAL
        !           919: WINAPI
1.1       root      920: GlobalFree(
1.1.1.2 ! root      921:     HGLOBAL hMem
        !           922:     );
        !           923: 
        !           924: UINT
        !           925: WINAPI
        !           926: GlobalCompact(
        !           927:     DWORD dwMinFree
        !           928:     );
        !           929: 
        !           930: VOID
        !           931: WINAPI
        !           932: GlobalFix(
        !           933:     HGLOBAL hMem
        !           934:     );
        !           935: 
        !           936: VOID
        !           937: WINAPI
        !           938: GlobalUnfix(
        !           939:     HGLOBAL hMem
        !           940:     );
        !           941: 
        !           942: LPVOID
        !           943: WINAPI
        !           944: GlobalWire(
        !           945:     HGLOBAL hMem
1.1       root      946:     );
                    947: 
1.1.1.2 ! root      948: BOOL
        !           949: WINAPI
        !           950: GlobalUnWire(
        !           951:     HGLOBAL hMem
        !           952:     );
1.1       root      953: 
                    954: VOID
1.1.1.2 ! root      955: WINAPI
1.1       root      956: GlobalMemoryStatus(
                    957:     LPMEMORYSTATUS lpBuffer
                    958:     );
                    959: 
1.1.1.2 ! root      960: HLOCAL
        !           961: WINAPI
1.1       root      962: LocalAlloc(
1.1.1.2 ! root      963:     UINT uFlags,
        !           964:     UINT uBytes
1.1       root      965:     );
                    966: 
1.1.1.2 ! root      967: HLOCAL
        !           968: WINAPI
1.1       root      969: LocalReAlloc(
1.1.1.2 ! root      970:     HLOCAL hMem,
        !           971:     UINT uBytes,
        !           972:     UINT uFlags
1.1       root      973:     );
                    974: 
1.1.1.2 ! root      975: LPVOID
        !           976: WINAPI
1.1       root      977: LocalLock(
1.1.1.2 ! root      978:     HLOCAL hMem
1.1       root      979:     );
                    980: 
1.1.1.2 ! root      981: HLOCAL
        !           982: WINAPI
1.1       root      983: LocalHandle(
1.1.1.2 ! root      984:     LPVOID pMem
1.1       root      985:     );
                    986: 
                    987: BOOL
1.1.1.2 ! root      988: WINAPI
1.1       root      989: LocalUnlock(
1.1.1.2 ! root      990:     HLOCAL hMem
1.1       root      991:     );
                    992: 
1.1.1.2 ! root      993: UINT
        !           994: WINAPI
1.1       root      995: LocalSize(
1.1.1.2 ! root      996:     HLOCAL hMem
1.1       root      997:     );
                    998: 
1.1.1.2 ! root      999: UINT
        !          1000: WINAPI
1.1       root     1001: LocalFlags(
1.1.1.2 ! root     1002:     HLOCAL hMem
1.1       root     1003:     );
                   1004: 
1.1.1.2 ! root     1005: HLOCAL
        !          1006: WINAPI
1.1       root     1007: LocalFree(
1.1.1.2 ! root     1008:     HLOCAL hMem
        !          1009:     );
        !          1010: 
        !          1011: UINT
        !          1012: WINAPI
        !          1013: LocalShrink(
        !          1014:     HLOCAL hMem,
        !          1015:     UINT cbNewSize
        !          1016:     );
        !          1017: 
        !          1018: UINT
        !          1019: WINAPI
        !          1020: LocalCompact(
        !          1021:     UINT uMinFree
        !          1022:     );
        !          1023: 
        !          1024: BOOL
        !          1025: WINAPI
        !          1026: FlushInstructionCache(
        !          1027:     HANDLE hProcess,
        !          1028:     LPVOID lpBaseAddress,
        !          1029:     DWORD dwSize
1.1       root     1030:     );
                   1031: 
                   1032: LPVOID
1.1.1.2 ! root     1033: WINAPI
1.1       root     1034: VirtualAlloc(
                   1035:     LPVOID lpAddress,
                   1036:     DWORD dwSize,
                   1037:     DWORD flAllocationType,
                   1038:     DWORD flProtect
                   1039:     );
                   1040: 
                   1041: BOOL
1.1.1.2 ! root     1042: WINAPI
1.1       root     1043: VirtualFree(
                   1044:     LPVOID lpAddress,
                   1045:     DWORD dwSize,
                   1046:     DWORD dwFreeType
                   1047:     );
                   1048: 
                   1049: BOOL
1.1.1.2 ! root     1050: WINAPI
1.1       root     1051: VirtualProtect(
                   1052:     LPVOID lpAddress,
                   1053:     DWORD dwSize,
                   1054:     DWORD flNewProtect,
                   1055:     PDWORD lpflOldProtect
                   1056:     );
                   1057: 
                   1058: DWORD
1.1.1.2 ! root     1059: WINAPI
1.1       root     1060: VirtualQuery(
                   1061:     LPVOID lpAddress,
                   1062:     PMEMORY_BASIC_INFORMATION lpBuffer,
                   1063:     DWORD dwLength
                   1064:     );
                   1065: 
1.1.1.2 ! root     1066: BOOL
        !          1067: WINAPI
        !          1068: VirtualProtectEx(
        !          1069:     HANDLE hProcess,
        !          1070:     LPVOID lpAddress,
        !          1071:     DWORD dwSize,
        !          1072:     DWORD flNewProtect,
        !          1073:     PDWORD lpflOldProtect
        !          1074:     );
        !          1075: 
        !          1076: DWORD
        !          1077: WINAPI
        !          1078: VirtualQueryEx(
        !          1079:     HANDLE hProcess,
        !          1080:     LPVOID lpAddress,
        !          1081:     PMEMORY_BASIC_INFORMATION lpBuffer,
        !          1082:     DWORD dwLength
        !          1083:     );
        !          1084: 
1.1       root     1085: HANDLE
1.1.1.2 ! root     1086: WINAPI
1.1       root     1087: HeapCreate(
                   1088:     DWORD flOptions,
                   1089:     DWORD dwInitialSize,
                   1090:     DWORD dwMaximumSize
                   1091:     );
                   1092: 
                   1093: BOOL
1.1.1.2 ! root     1094: WINAPI
1.1       root     1095: HeapDestroy(
                   1096:     HANDLE hHeap
                   1097:     );
                   1098: 
                   1099: LPSTR
1.1.1.2 ! root     1100: WINAPI
1.1       root     1101: HeapAlloc(
                   1102:     HANDLE hHeap,
                   1103:     DWORD dwBytes
                   1104:     );
                   1105: 
                   1106: BOOL
1.1.1.2 ! root     1107: WINAPI
1.1       root     1108: HeapFree(
                   1109:     HANDLE hHeap,
                   1110:     LPSTR lpMem
                   1111:     );
                   1112: 
                   1113: DWORD
1.1.1.2 ! root     1114: WINAPI
1.1       root     1115: HeapSize(
                   1116:     HANDLE hHeap,
                   1117:     LPSTR lpMem
                   1118:     );
                   1119: 
                   1120: 
                   1121: HANDLE
1.1.1.2 ! root     1122: WINAPI
1.1       root     1123: OpenProcess(
                   1124:     DWORD dwDesiredAccess,
                   1125:     BOOL bInheritHandle,
                   1126:     DWORD dwProcessId
                   1127:     );
                   1128: 
                   1129: HANDLE
1.1.1.2 ! root     1130: WINAPI
1.1       root     1131: GetCurrentProcess(
                   1132:     VOID
                   1133:     );
                   1134: 
                   1135: DWORD
1.1.1.2 ! root     1136: WINAPI
1.1       root     1137: GetCurrentProcessId(
                   1138:     VOID
                   1139:     );
                   1140: 
                   1141: VOID
1.1.1.2 ! root     1142: WINAPI
1.1       root     1143: ExitProcess(
1.1.1.2 ! root     1144:     UINT uExitCode
1.1       root     1145:     );
                   1146: 
                   1147: BOOL
1.1.1.2 ! root     1148: WINAPI
1.1       root     1149: TerminateProcess(
                   1150:     HANDLE hProcess,
1.1.1.2 ! root     1151:     UINT uExitCode
1.1       root     1152:     );
                   1153: 
                   1154: BOOL
1.1.1.2 ! root     1155: WINAPI
1.1       root     1156: GetExitCodeProcess(
                   1157:     HANDLE hProcess,
                   1158:     LPDWORD lpExitCode
                   1159:     );
                   1160: 
                   1161: 
                   1162: VOID
1.1.1.2 ! root     1163: WINAPI
1.1       root     1164: FatalExit(
1.1.1.2 ! root     1165:     int ExitCode
1.1       root     1166:     );
                   1167: 
                   1168: LPVOID
1.1.1.2 ! root     1169: WINAPI
1.1       root     1170: GetEnvironmentStrings(
                   1171:     VOID
                   1172:     );
                   1173: 
                   1174: VOID
1.1.1.2 ! root     1175: WINAPI
1.1       root     1176: RaiseException(
                   1177:     DWORD dwExceptionCode,
                   1178:     DWORD dwExceptionFlags,
                   1179:     DWORD nNumberOfArguments,
                   1180:     LPDWORD lpArguments
                   1181:     );
                   1182: 
                   1183: EXCEPTION_DISPOSITION
1.1.1.2 ! root     1184: WINAPI
1.1       root     1185: UnhandledExceptionFilter(
                   1186:     struct _EXCEPTION_POINTERS *ExceptionInfo
                   1187:     );
                   1188: 
                   1189: HANDLE
1.1.1.2 ! root     1190: WINAPI
1.1       root     1191: CreateThread(
                   1192:     LPSECURITY_ATTRIBUTES lpThreadAttributes,
                   1193:     DWORD dwStackSize,
                   1194:     LPTHREAD_START_ROUTINE lpStartAddress,
                   1195:     LPVOID lpParameter,
                   1196:     DWORD dwCreationFlags,
                   1197:     LPDWORD lpThreadId
                   1198:     );
                   1199: 
                   1200: HANDLE
1.1.1.2 ! root     1201: WINAPI
        !          1202: CreateRemoteThread(
        !          1203:     HANDLE hProcess,
        !          1204:     LPSECURITY_ATTRIBUTES lpThreadAttributes,
        !          1205:     DWORD dwStackSize,
        !          1206:     LPTHREAD_START_ROUTINE lpStartAddress,
        !          1207:     LPVOID lpParameter,
        !          1208:     DWORD dwCreationFlags,
        !          1209:     LPDWORD lpThreadId
        !          1210:     );
        !          1211: 
        !          1212: HANDLE
        !          1213: WINAPI
1.1       root     1214: GetCurrentThread(
                   1215:     VOID
                   1216:     );
                   1217: 
                   1218: DWORD
1.1.1.2 ! root     1219: WINAPI
1.1       root     1220: GetCurrentThreadId(
                   1221:     VOID
                   1222:     );
                   1223: 
                   1224: BOOL
1.1.1.2 ! root     1225: WINAPI
1.1       root     1226: SetThreadPriority(
                   1227:     HANDLE hThread,
                   1228:     int nPriority
                   1229:     );
                   1230: 
                   1231: int
1.1.1.2 ! root     1232: WINAPI
1.1       root     1233: GetThreadPriority(
                   1234:     HANDLE hThread
                   1235:     );
                   1236: 
                   1237: VOID
1.1.1.2 ! root     1238: WINAPI
1.1       root     1239: ExitThread(
                   1240:     DWORD dwExitCode
                   1241:     );
                   1242: 
                   1243: BOOL
1.1.1.2 ! root     1244: WINAPI
1.1       root     1245: TerminateThread(
                   1246:     HANDLE hThread,
                   1247:     DWORD dwExitCode
                   1248:     );
                   1249: 
                   1250: BOOL
1.1.1.2 ! root     1251: WINAPI
1.1       root     1252: GetExitCodeThread(
                   1253:     HANDLE hThread,
                   1254:     LPDWORD lpExitCode
                   1255:     );
                   1256: 
                   1257: BOOL
1.1.1.2 ! root     1258: WINAPI
1.1       root     1259: GetThreadSelectorEntry(
                   1260:     HANDLE hThread,
                   1261:     DWORD dwSelector,
                   1262:     LPLDT_ENTRY lpSelectorEntry
                   1263:     );
                   1264: 
                   1265: DWORD
1.1.1.2 ! root     1266: WINAPI
1.1       root     1267: GetLastError(
                   1268:     VOID
                   1269:     );
                   1270: 
                   1271: VOID
1.1.1.2 ! root     1272: WINAPI
1.1       root     1273: SetLastError(
                   1274:     DWORD dwErrCode
                   1275:     );
                   1276: 
1.1.1.2 ! root     1277: //
        !          1278: // SetLastErrorEx() types.
        !          1279: //
        !          1280: #define SLE_ERROR       0x00000001
        !          1281: #define SLE_MINORERROR  0x00000002
        !          1282: #define SLE_WARNING     0x00000003
        !          1283: 
        !          1284: VOID
        !          1285: SetLastErrorEx(
        !          1286:     DWORD dwErrCode,
        !          1287:     DWORD dwType
        !          1288:     );
        !          1289: 
1.1       root     1290: BOOL
1.1.1.2 ! root     1291: WINAPI
1.1       root     1292: GetOverlappedResult(
                   1293:     HANDLE hFile,
                   1294:     LPOVERLAPPED lpOverlapped,
                   1295:     LPDWORD lpNumberOfBytesTransferred,
                   1296:     BOOL bWait
                   1297:     );
                   1298: 
1.1.1.2 ! root     1299: #define SEM_FAILCRITICALERRORS  0x0001
        !          1300: #define SEM_NOGPFAULTERRORBOX   0x0002
        !          1301: #define SEM_NOOPENFILEERRORBOX  0x8000
        !          1302: 
        !          1303: VOID
        !          1304: WINAPI
        !          1305: SetDebugErrorLevel(
        !          1306:     DWORD dwLevel
        !          1307:     );
        !          1308: 
        !          1309: UINT
        !          1310: WINAPI
1.1       root     1311: SetErrorMode(
1.1.1.2 ! root     1312:     UINT uMode
1.1       root     1313:     );
                   1314: 
                   1315: 
                   1316: BOOL
1.1.1.2 ! root     1317: WINAPI
1.1       root     1318: ReadProcessMemory(
                   1319:     HANDLE hProcess,
                   1320:     LPVOID lpBaseAddress,
                   1321:     LPVOID lpBuffer,
                   1322:     DWORD nSize,
                   1323:     LPDWORD lpNumberOfBytesRead
                   1324:     );
                   1325: 
                   1326: BOOL
1.1.1.2 ! root     1327: WINAPI
1.1       root     1328: WriteProcessMemory(
                   1329:     HANDLE hProcess,
                   1330:     LPVOID lpBaseAddress,
                   1331:     LPVOID lpBuffer,
                   1332:     DWORD nSize,
                   1333:     LPDWORD lpNumberOfBytesWritten
                   1334:     );
                   1335: 
                   1336: BOOL
1.1.1.2 ! root     1337: WINAPI
1.1       root     1338: GetThreadContext(
                   1339:     HANDLE hThread,
                   1340:     LPCONTEXT lpContext
                   1341:     );
                   1342: 
                   1343: BOOL
1.1.1.2 ! root     1344: WINAPI
1.1       root     1345: SetThreadContext(
                   1346:     HANDLE hThread,
                   1347:     LPCONTEXT lpContext
                   1348:     );
                   1349: 
                   1350: DWORD
1.1.1.2 ! root     1351: WINAPI
1.1       root     1352: SuspendThread(
                   1353:     HANDLE hThread
                   1354:     );
                   1355: 
                   1356: DWORD
1.1.1.2 ! root     1357: WINAPI
1.1       root     1358: ResumeThread(
1.1.1.2 ! root     1359:     HANDLE hThread
1.1       root     1360:     );
                   1361: 
                   1362: VOID
1.1.1.2 ! root     1363: WINAPI
1.1       root     1364: DebugBreak(
                   1365:     VOID
                   1366:     );
                   1367: 
                   1368: BOOL
1.1.1.2 ! root     1369: WINAPI
1.1       root     1370: WaitForDebugEvent(
                   1371:     LPDEBUG_EVENT lpDebugEvent,
                   1372:     DWORD dwMilliseconds
                   1373:     );
                   1374: 
                   1375: BOOL
1.1.1.2 ! root     1376: WINAPI
1.1       root     1377: ContinueDebugEvent(
                   1378:     DWORD dwProcessId,
                   1379:     DWORD dwThreadId,
                   1380:     DWORD dwContinueStatus
                   1381:     );
                   1382: 
                   1383: BOOL
1.1.1.2 ! root     1384: WINAPI
1.1       root     1385: DebugActiveProcess(
                   1386:     DWORD dwProcessId
                   1387:     );
                   1388: 
1.1.1.2 ! root     1389: HANDLE
        !          1390: WINAPI
        !          1391: DebugSnapShotProcessHeaps(
        !          1392:     DWORD dwProcessId
        !          1393:     );
        !          1394: 
        !          1395: typedef struct _DEBUG_HEAP_BACKTRACE {
        !          1396:     DWORD Depth;
        !          1397:     DWORD ReturnAddresses[ 1 ];
        !          1398: } DEBUG_HEAP_BACKTRACE, *PDEBUG_HEAP_BACKTRACE;
        !          1399: 
        !          1400: typedef struct _DEBUG_HEAP_ALLOCATOR {
        !          1401:     DWORD TotalBytesAllocated;
        !          1402:     DWORD OffsetToBackTrace;
        !          1403: } DEBUG_HEAP_ALLOCATOR, *PDEBUG_HEAP_ALLOCATOR;
        !          1404: 
        !          1405: typedef struct _DEBUG_HEAP_ENTRY {
        !          1406:     DWORD Address;
        !          1407:     USHORT Size;
        !          1408:     USHORT Allocator;
        !          1409: } DEBUG_HEAP_ENTRY, *PDEBUG_HEAP_ENTRY;
        !          1410: 
        !          1411: #define DEBUG_HEAP_ENTRY_FREE (USHORT)-1
        !          1412: 
        !          1413: typedef struct _DEBUG_HEAP_INFO {
        !          1414:     USHORT Creator;
        !          1415:     USHORT HeaderSizeLog2;
        !          1416:     USHORT ReservedPages;
        !          1417:     USHORT CommittedPages;
        !          1418:     USHORT AllocatorReservedPages;
        !          1419:     USHORT AllocatorCommittedPages;
        !          1420:     DWORD NumberOfEntries;
        !          1421:     DEBUG_HEAP_ENTRY Entries[ 1 ];
        !          1422: } DEBUG_HEAP_INFO, *PDEBUG_HEAP_INFO;
        !          1423: 
        !          1424: typedef struct _DEBUG_HEAP_DUMP {
        !          1425:     DWORD OffsetToAllocatorTable;
        !          1426:     DWORD NumberOfHeaps;
        !          1427:     DEBUG_HEAP_INFO HeapInfo[ 1 ];
        !          1428: } DEBUG_HEAP_DUMP, *PDEBUG_HEAP_DUMP;
        !          1429: 
1.1       root     1430: VOID
1.1.1.2 ! root     1431: WINAPI
1.1       root     1432: InitializeCriticalSection(
                   1433:     LPCRITICAL_SECTION lpCriticalSection
                   1434:     );
                   1435: 
                   1436: VOID
1.1.1.2 ! root     1437: WINAPI
1.1       root     1438: EnterCriticalSection(
                   1439:     LPCRITICAL_SECTION lpCriticalSection
                   1440:     );
                   1441: 
                   1442: VOID
1.1.1.2 ! root     1443: WINAPI
1.1       root     1444: LeaveCriticalSection(
                   1445:     LPCRITICAL_SECTION lpCriticalSection
                   1446:     );
                   1447: 
                   1448: VOID
1.1.1.2 ! root     1449: WINAPI
1.1       root     1450: DeleteCriticalSection(
                   1451:     LPCRITICAL_SECTION lpCriticalSection
                   1452:     );
                   1453: 
                   1454: BOOL
1.1.1.2 ! root     1455: WINAPI
1.1       root     1456: SetEvent(
                   1457:     HANDLE hEvent
                   1458:     );
                   1459: 
                   1460: BOOL
1.1.1.2 ! root     1461: WINAPI
1.1       root     1462: ResetEvent(
                   1463:     HANDLE hEvent
                   1464:     );
                   1465: 
                   1466: BOOL
1.1.1.2 ! root     1467: WINAPI
1.1       root     1468: PulseEvent(
                   1469:     HANDLE hEvent
                   1470:     );
                   1471: 
                   1472: BOOL
1.1.1.2 ! root     1473: WINAPI
1.1       root     1474: ReleaseSemaphore(
                   1475:     HANDLE hSemaphore,
                   1476:     LONG lReleaseCount,
                   1477:     LPLONG lpPreviousCount
                   1478:     );
                   1479: 
                   1480: BOOL
1.1.1.2 ! root     1481: WINAPI
1.1       root     1482: ReleaseMutex(
                   1483:     HANDLE hMutex
                   1484:     );
                   1485: 
                   1486: DWORD
1.1.1.2 ! root     1487: WINAPI
1.1       root     1488: WaitForSingleObject(
                   1489:     HANDLE hHandle,
                   1490:     DWORD dwMilliseconds
                   1491:     );
                   1492: 
                   1493: DWORD
1.1.1.2 ! root     1494: WINAPI
1.1       root     1495: WaitForMultipleObjects(
                   1496:     DWORD nCount,
                   1497:     LPHANDLE lpHandles,
                   1498:     BOOL bWaitAll,
                   1499:     DWORD dwMilliseconds
                   1500:     );
                   1501: 
                   1502: VOID
1.1.1.2 ! root     1503: WINAPI
1.1       root     1504: Sleep(
                   1505:     DWORD dwMilliseconds
                   1506:     );
                   1507: 
1.1.1.2 ! root     1508: HRSRC
        !          1509: WINAPI
1.1       root     1510: LoadResource(
                   1511:     HANDLE hModule,
1.1.1.2 ! root     1512:     HRSRC hResInfo
1.1       root     1513:     );
                   1514: 
                   1515: DWORD
1.1.1.2 ! root     1516: WINAPI
1.1       root     1517: SizeofResource(
                   1518:     HANDLE hModule,
1.1.1.2 ! root     1519:     HRSRC hResInfo
1.1       root     1520:     );
                   1521: 
                   1522: ATOM
1.1.1.2 ! root     1523: WINAPI
1.1       root     1524: GlobalDeleteAtom(
                   1525:     ATOM nAtom
                   1526:     );
                   1527: 
                   1528: BOOL
1.1.1.2 ! root     1529: WINAPI
1.1       root     1530: InitAtomTable(
                   1531:     DWORD nSize
                   1532:     );
                   1533: 
                   1534: ATOM
1.1.1.2 ! root     1535: WINAPI
1.1       root     1536: DeleteAtom(
                   1537:     ATOM nAtom
                   1538:     );
                   1539: 
1.1.1.2 ! root     1540: UINT
        !          1541: WINAPI
1.1       root     1542: SetHandleCount(
1.1.1.2 ! root     1543:     UINT uNumber
1.1       root     1544:     );
                   1545: 
                   1546: DWORD
1.1.1.2 ! root     1547: WINAPI
1.1       root     1548: GetLogicalDrives(
                   1549:     VOID
                   1550:     );
                   1551: 
                   1552: BOOL
1.1.1.2 ! root     1553: WINAPI
1.1       root     1554: LockFile(
                   1555:     HANDLE hFile,
                   1556:     DWORD dwFileOffsetLow,
1.1.1.2 ! root     1557:     DWORD dwFileOffsetHigh,
        !          1558:     DWORD nNumberOfBytesToLockLow,
        !          1559:     DWORD nNumberOfBytesToLockHigh
1.1       root     1560:     );
                   1561: 
                   1562: BOOL
1.1.1.2 ! root     1563: WINAPI
1.1       root     1564: UnlockFile(
                   1565:     HANDLE hFile,
                   1566:     DWORD dwFileOffsetLow,
1.1.1.2 ! root     1567:     DWORD dwFileOffsetHigh,
        !          1568:     DWORD nNumberOfBytesToUnlockLow,
        !          1569:     DWORD nNumberOfBytesToUnlockHigh
        !          1570:     );
        !          1571: 
        !          1572: typedef struct _BY_HANDLE_FILE_INFORMATION {
        !          1573:     DWORD dwFileAttributes;
        !          1574:     FILETIME ftCreationTime;
        !          1575:     FILETIME ftLastAccessTime;
        !          1576:     FILETIME ftLastWriteTime;
        !          1577:     DWORD dwVolumeSerialNumber;
        !          1578:     DWORD nFileSizeHigh;
        !          1579:     DWORD nFileSizeLow;
        !          1580:     DWORD nNumberOfLinks;
        !          1581:     DWORD nFileIndexHigh;
        !          1582:     DWORD nFileIndexLow;
        !          1583: } BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION;
        !          1584: 
        !          1585: BOOL
        !          1586: WINAPI
        !          1587: GetFileInformationByHandle(
        !          1588:     HANDLE hFile,
        !          1589:     LPBY_HANDLE_FILE_INFORMATION lpFileInformation
1.1       root     1590:     );
                   1591: 
                   1592: DWORD
1.1.1.2 ! root     1593: WINAPI
1.1       root     1594: GetFileType(
                   1595:     HANDLE hFile
                   1596:     );
                   1597: 
                   1598: DWORD
1.1.1.2 ! root     1599: WINAPI
1.1       root     1600: GetFileSize(
                   1601:     HANDLE hFile,
                   1602:     LPDWORD lpFileSizeHigh
                   1603:     );
                   1604: 
                   1605: HANDLE
1.1.1.2 ! root     1606: WINAPI
1.1       root     1607: GetStdHandle(
                   1608:     DWORD nStdHandle
                   1609:     );
                   1610: 
                   1611: BOOL
1.1.1.2 ! root     1612: WINAPI
1.1       root     1613: SetStdHandle(
                   1614:     DWORD nStdHandle,
                   1615:     HANDLE hHandle
                   1616:     );
                   1617: 
                   1618: BOOL
1.1.1.2 ! root     1619: WINAPI
1.1       root     1620: WriteFile(
                   1621:     HANDLE hFile,
1.1.1.2 ! root     1622:     CONST VOID *lpBuffer,
1.1       root     1623:     DWORD nNumberOfBytesToWrite,
                   1624:     LPDWORD lpNumberOfBytesWritten,
                   1625:     LPOVERLAPPED lpOverlapped
                   1626:     );
                   1627: 
                   1628: BOOL
1.1.1.2 ! root     1629: WINAPI
1.1       root     1630: ReadFile(
                   1631:     HANDLE hFile,
                   1632:     LPVOID lpBuffer,
                   1633:     DWORD nNumberOfBytesToRead,
                   1634:     LPDWORD lpNumberOfBytesRead,
                   1635:     LPOVERLAPPED lpOverlapped
                   1636:     );
                   1637: 
                   1638: BOOL
1.1.1.2 ! root     1639: WINAPI
1.1       root     1640: FlushFileBuffers(
                   1641:     HANDLE hFile
                   1642:     );
                   1643: 
                   1644: BOOL
1.1.1.2 ! root     1645: WINAPI
        !          1646: DeviceIoControl(
        !          1647:     HANDLE hDevice,
        !          1648:     DWORD dwIoControlCode,
        !          1649:     LPVOID lpInBuffer,
        !          1650:     DWORD nInBufferSize,
        !          1651:     LPVOID lpOutBuffer,
        !          1652:     DWORD nOutBufferSize,
        !          1653:     LPDWORD lpBytesReturned,
        !          1654:     LPOVERLAPPED lpOverlapped
        !          1655:     );
        !          1656: 
        !          1657: BOOL
        !          1658: WINAPI
1.1       root     1659: SetEndOfFile(
                   1660:     HANDLE hFile
                   1661:     );
                   1662: 
                   1663: DWORD
1.1.1.2 ! root     1664: WINAPI
1.1       root     1665: SetFilePointer(
                   1666:     HANDLE hFile,
                   1667:     LONG lDistanceToMove,
                   1668:     PLONG lpDistanceToMoveHigh,
                   1669:     DWORD dwMoveMethod
                   1670:     );
                   1671: 
                   1672: BOOL
1.1.1.2 ! root     1673: WINAPI
1.1       root     1674: FindClose(
                   1675:     HANDLE hFindFile
                   1676:     );
                   1677: 
                   1678: BOOL
1.1.1.2 ! root     1679: WINAPI
1.1       root     1680: GetFileTime(
                   1681:     HANDLE hFile,
                   1682:     LPFILETIME lpCreationTime,
                   1683:     LPFILETIME lpLastAccessTime,
                   1684:     LPFILETIME lpLastWriteTime
                   1685:     );
                   1686: 
                   1687: BOOL
1.1.1.2 ! root     1688: WINAPI
1.1       root     1689: SetFileTime(
                   1690:     HANDLE hFile,
                   1691:     LPFILETIME lpCreationTime,
                   1692:     LPFILETIME lpLastAccessTime,
                   1693:     LPFILETIME lpLastWriteTime
                   1694:     );
                   1695: 
                   1696: BOOL
1.1.1.2 ! root     1697: WINAPI
1.1       root     1698: CloseHandle(
                   1699:     HANDLE hObject
                   1700:     );
                   1701: 
                   1702: BOOL
1.1.1.2 ! root     1703: WINAPI
1.1       root     1704: DuplicateHandle(
                   1705:     HANDLE hSourceProcessHandle,
                   1706:     HANDLE hSourceHandle,
                   1707:     HANDLE hTargetProcessHandle,
                   1708:     LPHANDLE lpTargetHandle,
                   1709:     DWORD dwDesiredAccess,
                   1710:     BOOL bInheritHandle,
                   1711:     DWORD dwOptions
                   1712:     );
                   1713: 
                   1714: DWORD
1.1.1.2 ! root     1715: WINAPI
1.1       root     1716: LoadModule(
1.1.1.2 ! root     1717:     LPCSTR lpModuleName,
1.1       root     1718:     LPVOID lpParameterBlock
                   1719:     );
                   1720: 
1.1.1.2 ! root     1721: UINT
        !          1722: WINAPI
1.1       root     1723: WinExec(
1.1.1.2 ! root     1724:     LPCSTR lpCmdLine,
        !          1725:     UINT uCmdShow
1.1       root     1726:     );
                   1727: 
                   1728: BOOL
1.1.1.2 ! root     1729: WINAPI
1.1       root     1730: BuildCommDCB(
                   1731:     LPSTR lpDef,
                   1732:     LPDCB lpDCB
                   1733:     );
                   1734: 
                   1735: BOOL
1.1.1.2 ! root     1736: WINAPI
1.1       root     1737: ClearCommBreak(
                   1738:     HANDLE hFile
                   1739:     );
                   1740: 
                   1741: BOOL
1.1.1.2 ! root     1742: WINAPI
1.1       root     1743: ClearCommError(
                   1744:     HANDLE hFile,
                   1745:     LPDWORD lpErrors,
                   1746:     LPCOMSTAT lpStat
                   1747:     );
                   1748: 
                   1749: BOOL
1.1.1.2 ! root     1750: WINAPI
1.1       root     1751: SetupComm(
                   1752:     HANDLE hFile,
                   1753:     DWORD dwInQueue,
                   1754:     DWORD dwOutQueue
                   1755:     );
                   1756: 
                   1757: BOOL
1.1.1.2 ! root     1758: WINAPI
1.1       root     1759: EscapeCommFunction(
                   1760:     HANDLE hFile,
                   1761:     DWORD dwFunc
                   1762:     );
                   1763: 
                   1764: BOOL
1.1.1.2 ! root     1765: WINAPI
        !          1766: GetCommMask(
1.1       root     1767:     HANDLE hFile,
1.1.1.2 ! root     1768:     LPDWORD lpEvtMask
1.1       root     1769:     );
                   1770: 
                   1771: BOOL
1.1.1.2 ! root     1772: WINAPI
        !          1773: GetCommProperties(
1.1       root     1774:     HANDLE hFile,
1.1.1.2 ! root     1775:     LPCOMMPROP lpCommProp
1.1       root     1776:     );
                   1777: 
                   1778: BOOL
1.1.1.2 ! root     1779: WINAPI
1.1       root     1780: GetCommModemStatus(
                   1781:     HANDLE hFile,
                   1782:     LPDWORD lpModemStat
                   1783:     );
                   1784: 
                   1785: BOOL
1.1.1.2 ! root     1786: WINAPI
1.1       root     1787: GetCommState(
                   1788:     HANDLE hFile,
                   1789:     LPDCB lpDCB
                   1790:     );
                   1791: 
                   1792: BOOL
1.1.1.2 ! root     1793: WINAPI
1.1       root     1794: GetCommTimeouts(
                   1795:     HANDLE hFile,
                   1796:     LPCOMMTIMEOUTS lpCommTimeouts
                   1797:     );
                   1798: 
                   1799: BOOL
1.1.1.2 ! root     1800: WINAPI
1.1       root     1801: PurgeComm(
                   1802:     HANDLE hFile,
                   1803:     DWORD dwFlags
                   1804:     );
                   1805: 
                   1806: BOOL
1.1.1.2 ! root     1807: WINAPI
1.1       root     1808: SetCommBreak(
                   1809:     HANDLE hFile
                   1810:     );
                   1811: 
                   1812: BOOL
1.1.1.2 ! root     1813: WINAPI
1.1       root     1814: SetCommMask(
                   1815:     HANDLE hFile,
                   1816:     DWORD dwEvtMask
                   1817:     );
                   1818: 
                   1819: BOOL
1.1.1.2 ! root     1820: WINAPI
1.1       root     1821: SetCommState(
                   1822:     HANDLE hFile,
                   1823:     LPDCB lpDCB
                   1824:     );
                   1825: 
                   1826: BOOL
1.1.1.2 ! root     1827: WINAPI
1.1       root     1828: SetCommTimeouts(
                   1829:     HANDLE hFile,
                   1830:     LPCOMMTIMEOUTS lpCommTimeouts
                   1831:     );
                   1832: 
                   1833: BOOL
1.1.1.2 ! root     1834: WINAPI
1.1       root     1835: TransmitCommChar(
                   1836:     HANDLE hFile,
                   1837:     char cChar
                   1838:     );
                   1839: 
                   1840: BOOL
1.1.1.2 ! root     1841: WINAPI
1.1       root     1842: WaitCommEvent(
                   1843:     HANDLE hFile,
                   1844:     LPDWORD lpEvtMask,
1.1.1.2 ! root     1845:     LPOVERLAPPED lpOverlapped
        !          1846:     );
        !          1847: 
        !          1848: 
        !          1849: DWORD
        !          1850: WINAPI
        !          1851: SetTapePosition(
        !          1852:     HANDLE hDevice,
        !          1853:     DWORD dwPositionMethod,
        !          1854:     DWORD dwPartition,
        !          1855:     DWORD dwOffset,
        !          1856:     LPDWORD lpdwOffsetHigh,
        !          1857:     LPOVERLAPPED lpOverlapped
        !          1858:     );
        !          1859: 
        !          1860: DWORD
        !          1861: WINAPI
        !          1862: GetTapePosition(
        !          1863:     HANDLE hDevice,
        !          1864:     LPDWORD dwPartition,
        !          1865:     LPDWORD lpdwOffsetHigh,
        !          1866:     LPOVERLAPPED lpOverlapped
        !          1867:     );
        !          1868: 
        !          1869: DWORD
        !          1870: WINAPI
        !          1871: PrepareTape(
        !          1872:     HANDLE hDevice,
        !          1873:     DWORD dwTapeOperation,
        !          1874:     LPOVERLAPPED lpOverlapped
        !          1875:     );
        !          1876: 
        !          1877: DWORD
        !          1878: WINAPI
        !          1879: EraseTape(
        !          1880:     HANDLE hDevice,
        !          1881:     DWORD dwPartition,
        !          1882:     DWORD dwEraseType,
        !          1883:     LPOVERLAPPED lpOverlapped
        !          1884:     );
        !          1885: 
        !          1886: DWORD
        !          1887: CreateTapePartition(
        !          1888:     HANDLE hDevice,
        !          1889:     DWORD dwSize,
        !          1890:     LPVOID lpPartitionParameters,
        !          1891:     LPOVERLAPPED lpOverlapped
        !          1892:     );
        !          1893: 
        !          1894: DWORD
        !          1895: WINAPI
        !          1896: WriteTapemark(
        !          1897:     HANDLE hDevice,
        !          1898:     DWORD dwTapemarkType,
        !          1899:     DWORD dwTapemarkCount,
        !          1900:     LPOVERLAPPED lpOverlapped
        !          1901:     );
        !          1902: 
        !          1903: DWORD
        !          1904: WINAPI
        !          1905: GetTapeStatus(
        !          1906:     HANDLE hDevice,
        !          1907:     LPVOID lpTapeStatus,
        !          1908:     LPOVERLAPPED lpOverlapped
        !          1909:     );
        !          1910: 
        !          1911: DWORD
        !          1912: WINAPI
        !          1913: GetTapeParameters(
        !          1914:     HANDLE hDevice,
        !          1915:     DWORD dwOperation,
        !          1916:     LPVOID lpTapeInformation,
        !          1917:     LPOVERLAPPED lpOverlapped
        !          1918:     );
        !          1919: 
        !          1920: #define GET_TAPE_MEDIA_INFORMATION 0
        !          1921: #define GET_TAPE_DRIVE_INFORMATION 1
        !          1922: 
        !          1923: DWORD
        !          1924: WINAPI
        !          1925: SetTapeParameters(
        !          1926:     HANDLE hDevice,
        !          1927:     DWORD dwOperation,
        !          1928:     LPVOID lpTapeInformation,
        !          1929:     LPOVERLAPPED lpOverlapped
1.1       root     1930:     );
                   1931: 
1.1.1.2 ! root     1932: #define SET_TAPE_MEDIA_INFORMATION 0
        !          1933: #define SET_TAPE_DRIVE_INFORMATION 1
        !          1934: 
1.1       root     1935: BOOL
1.1.1.2 ! root     1936: WINAPI
1.1       root     1937: Beep(
                   1938:     DWORD dwFreq,
                   1939:     DWORD dwDuration
                   1940:     );
                   1941: 
                   1942: VOID
1.1.1.2 ! root     1943: WINAPI
1.1       root     1944: OpenSound(
                   1945:     VOID
                   1946:     );
                   1947: 
                   1948: VOID
1.1.1.2 ! root     1949: WINAPI
1.1       root     1950: CloseSound(
                   1951:     VOID
                   1952:     );
                   1953: 
                   1954: VOID
1.1.1.2 ! root     1955: WINAPI
1.1       root     1956: StartSound(
                   1957:     VOID
                   1958:     );
                   1959: 
                   1960: VOID
1.1.1.2 ! root     1961: WINAPI
1.1       root     1962: StopSound(
                   1963:     VOID
                   1964:     );
                   1965: 
                   1966: DWORD
1.1.1.2 ! root     1967: WINAPI
1.1       root     1968: WaitSoundState(
                   1969:     DWORD nState
                   1970:     );
                   1971: 
                   1972: DWORD
1.1.1.2 ! root     1973: WINAPI
1.1       root     1974: SyncAllVoices(
                   1975:     VOID
                   1976:     );
                   1977: 
                   1978: DWORD
1.1.1.2 ! root     1979: WINAPI
1.1       root     1980: CountVoiceNotes(
                   1981:     DWORD nVoice
                   1982:     );
                   1983: 
                   1984: LPDWORD
1.1.1.2 ! root     1985: WINAPI
1.1       root     1986: GetThresholdEvent(
                   1987:     VOID
                   1988:     );
                   1989: 
                   1990: DWORD
1.1.1.2 ! root     1991: WINAPI
1.1       root     1992: GetThresholdStatus(
                   1993:     VOID
                   1994:     );
                   1995: 
                   1996: DWORD
1.1.1.2 ! root     1997: WINAPI
1.1       root     1998: SetSoundNoise(
                   1999:     DWORD nSource,
                   2000:     DWORD nDuration
                   2001:     );
                   2002: 
                   2003: DWORD
1.1.1.2 ! root     2004: WINAPI
1.1       root     2005: SetVoiceAccent(
                   2006:     DWORD nVoice,
                   2007:     DWORD nTempo,
                   2008:     DWORD nVolume,
                   2009:     DWORD nMode,
                   2010:     DWORD nPitch
                   2011:     );
                   2012: 
                   2013: DWORD
1.1.1.2 ! root     2014: WINAPI
1.1       root     2015: SetVoiceEnvelope(
                   2016:     DWORD nVoice,
                   2017:     DWORD nShape,
                   2018:     DWORD nRepeat
                   2019:     );
                   2020: 
                   2021: DWORD
1.1.1.2 ! root     2022: WINAPI
1.1       root     2023: SetVoiceNote(
                   2024:     DWORD nVoice,
                   2025:     DWORD nValue,
                   2026:     DWORD nLength,
                   2027:     DWORD nCdots
                   2028:     );
                   2029: 
                   2030: DWORD
1.1.1.2 ! root     2031: WINAPI
1.1       root     2032: SetVoiceQueueSize(
                   2033:     DWORD nVoice,
                   2034:     DWORD nBytes
                   2035:     );
                   2036: 
                   2037: DWORD
1.1.1.2 ! root     2038: WINAPI
1.1       root     2039: SetVoiceSound(
                   2040:     DWORD nVoice,
1.1.1.2 ! root     2041:     DWORD Frequency,
1.1       root     2042:     DWORD nDuration
                   2043:     );
                   2044: 
                   2045: DWORD
1.1.1.2 ! root     2046: WINAPI
1.1       root     2047: SetVoiceThreshold(
                   2048:     DWORD nVoice,
                   2049:     DWORD nNotes
                   2050:     );
                   2051: 
                   2052: int
1.1.1.2 ! root     2053: WINAPI
1.1       root     2054: MulDiv(
                   2055:     int nNumber,
                   2056:     int nNumerator,
                   2057:     int nDenominator
                   2058:     );
                   2059: 
                   2060: VOID
1.1.1.2 ! root     2061: WINAPI
1.1       root     2062: GetSystemTime(
                   2063:     LPSYSTEMTIME lpSystemTime
                   2064:     );
                   2065: 
                   2066: BOOL
1.1.1.2 ! root     2067: WINAPI
1.1       root     2068: SetSystemTime(
                   2069:     LPSYSTEMTIME lpSystemTime
                   2070:     );
                   2071: 
                   2072: VOID
1.1.1.2 ! root     2073: WINAPI
1.1       root     2074: GetSystemInfo(
                   2075:     LPSYSTEM_INFO lpSystemInfo
                   2076:     );
                   2077: 
                   2078: 
                   2079: //
                   2080: // Routines to convert back and forth between system time and file time
                   2081: //
                   2082: 
                   2083: BOOL
1.1.1.2 ! root     2084: WINAPI
1.1       root     2085: SystemTimeToFileTime(
                   2086:     LPSYSTEMTIME lpSystemTime,
                   2087:     LPFILETIME lpFileTime
                   2088:     );
                   2089: 
                   2090: BOOL
1.1.1.2 ! root     2091: WINAPI
1.1       root     2092: FileTimeToSystemTime(
                   2093:     LPFILETIME lpFileTime,
                   2094:     LPSYSTEMTIME lpSystemTime
                   2095:     );
                   2096: 
                   2097: LONG
1.1.1.2 ! root     2098: WINAPI
1.1       root     2099: CompareFileTime(
                   2100:     LPFILETIME lpFileTime1,
                   2101:     LPFILETIME lpFileTime2
                   2102:     );
                   2103: 
                   2104: BOOL
1.1.1.2 ! root     2105: WINAPI
1.1       root     2106: FileTimeToDosDateTime(
                   2107:     LPFILETIME lpFileTime,
                   2108:     LPWORD lpFatDate,
                   2109:     LPWORD lpFatTime
                   2110:     );
                   2111: 
                   2112: BOOL
1.1.1.2 ! root     2113: WINAPI
1.1       root     2114: DosDateTimeToFileTime(
                   2115:     WORD wFatDate,
                   2116:     WORD wFatTime,
                   2117:     LPFILETIME lpFileTime
                   2118:     );
                   2119: 
                   2120: DWORD
1.1.1.2 ! root     2121: WINAPI
1.1       root     2122: GetTickCount(
                   2123:     VOID
                   2124:     );
                   2125: 
                   2126: DWORD
1.1.1.2 ! root     2127: WINAPI
1.1       root     2128: FormatMessage(
                   2129:     DWORD dwFlags,
                   2130:     LPVOID lpSource,
                   2131:     DWORD dwMessageId,
                   2132:     DWORD dwLanguageId,
                   2133:     LPSTR lpBuffer,
                   2134:     DWORD nSize,
                   2135:     LPVOID lpArguments
                   2136:     );
                   2137: 
                   2138: #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
                   2139: #define FORMAT_MESSAGE_IGNORE_INSERTS  0x00000200
                   2140: #define FORMAT_MESSAGE_FROM_STRING     0x00000400
                   2141: #define FORMAT_MESSAGE_FROM_HMODULE    0x00000800
                   2142: #define FORMAT_MESSAGE_FROM_SYSTEM     0x00001000
                   2143: #define FORMAT_MESSAGE_MAX_WIDTH_MASK  0x000000FF
                   2144: 
                   2145: 
                   2146: BOOL
1.1.1.2 ! root     2147: WINAPI
1.1       root     2148: CreatePipe(
                   2149:     PHANDLE hReadPipe,
                   2150:     PHANDLE hWritePipe,
                   2151:     LPSECURITY_ATTRIBUTES lpPipeAttributes,
                   2152:     DWORD nSize
                   2153:     );
                   2154: 
                   2155: BOOL
1.1.1.2 ! root     2156: WINAPI
1.1       root     2157: ConnectNamedPipe(
                   2158:     HANDLE hNamedPipe,
                   2159:     LPOVERLAPPED lpOverlapped
                   2160:     );
                   2161: 
                   2162: BOOL
1.1.1.2 ! root     2163: WINAPI
1.1       root     2164: DisconnectNamedPipe(
                   2165:     HANDLE hNamedPipe
                   2166:     );
                   2167: 
                   2168: BOOL
1.1.1.2 ! root     2169: WINAPI
1.1       root     2170: SetNamedPipeHandleState(
                   2171:     HANDLE hNamedPipe,
                   2172:     LPDWORD lpMode,
                   2173:     LPDWORD lpMaxCollectionCount,
                   2174:     LPDWORD lpCollectDataTimeout
                   2175:     );
                   2176: 
                   2177: BOOL
1.1.1.2 ! root     2178: WINAPI
1.1       root     2179: GetNamedPipeInfo(
                   2180:     HANDLE hNamedPipe,
                   2181:     LPDWORD lpFlags,
                   2182:     LPDWORD lpOutBufferSize,
                   2183:     LPDWORD lpInBufferSize,
                   2184:     LPDWORD lpMaxInstances
                   2185:     );
                   2186: 
                   2187: BOOL
1.1.1.2 ! root     2188: WINAPI
1.1       root     2189: PeekNamedPipe(
                   2190:     HANDLE hNamedPipe,
                   2191:     LPVOID lpBuffer,
                   2192:     DWORD nBufferSize,
                   2193:     LPDWORD lpBytesRead,
                   2194:     LPDWORD lpTotalBytesAvail,
                   2195:     LPDWORD lpBytesLeftThisMessage
                   2196:     );
                   2197: 
                   2198: BOOL
1.1.1.2 ! root     2199: WINAPI
1.1       root     2200: TransactNamedPipe(
                   2201:     HANDLE hNamedPipe,
                   2202:     LPVOID lpInBuffer,
                   2203:     DWORD nInBufferSize,
                   2204:     LPVOID lpOutBuffer,
                   2205:     DWORD nOutBufferSize,
                   2206:     LPDWORD lpBytesRead,
                   2207:     LPOVERLAPPED lpOverlapped
                   2208:     );
                   2209: 
                   2210: HANDLE
1.1.1.2 ! root     2211: WINAPI
1.1       root     2212: CreateMailslotA(
1.1.1.2 ! root     2213:     LPSTR lpName,
        !          2214:     DWORD nMaxMessageSize,
        !          2215:     DWORD lReadTimeout,
        !          2216:     LPSECURITY_ATTRIBUTES lpSecurityAttributes
1.1       root     2217:     );
                   2218: HANDLE
1.1.1.2 ! root     2219: WINAPI
1.1       root     2220: CreateMailslotW(
1.1.1.2 ! root     2221:     LPWSTR lpName,
        !          2222:     DWORD nMaxMessageSize,
        !          2223:     DWORD lReadTimeout,
        !          2224:     LPSECURITY_ATTRIBUTES lpSecurityAttributes
1.1       root     2225:     );
                   2226: #ifdef UNICODE
                   2227: #define CreateMailslot CreateMailslotW
                   2228: #else
                   2229: #define CreateMailslot CreateMailslotA
                   2230: #endif // !UNICODE
                   2231: 
                   2232: BOOL
1.1.1.2 ! root     2233: WINAPI
1.1       root     2234: GetMailslotInfo(
1.1.1.2 ! root     2235:     HANDLE hMailslot,
        !          2236:     LPDWORD lpMaxMessageSize,
        !          2237:     LPDWORD lpNextSize,
        !          2238:     LPDWORD lpMessageCount,
        !          2239:     LPDWORD lpReadTimeout
1.1       root     2240:     );
                   2241: 
                   2242: BOOL
1.1.1.2 ! root     2243: WINAPI
1.1       root     2244: SetMailslotInfo(
1.1.1.2 ! root     2245:     HANDLE hMailslot,
        !          2246:     DWORD lReadTimeout
1.1       root     2247:     );
                   2248: 
                   2249: LPVOID
1.1.1.2 ! root     2250: WINAPI
1.1       root     2251: MapViewOfFile(
                   2252:     HANDLE hFileMappingObject,
                   2253:     DWORD dwDesiredAccess,
                   2254:     DWORD dwFileOffsetHigh,
                   2255:     DWORD dwFileOffsetLow,
                   2256:     DWORD dwNumberOfBytesToMap
                   2257:     );
                   2258: 
                   2259: BOOL
1.1.1.2 ! root     2260: WINAPI
1.1       root     2261: FlushViewOfFile(
                   2262:     LPVOID lpBaseAddress,
                   2263:     DWORD dwNumberOfBytesToFlush
                   2264:     );
                   2265: 
                   2266: BOOL
1.1.1.2 ! root     2267: WINAPI
1.1       root     2268: UnmapViewOfFile(
                   2269:     LPVOID lpBaseAddress
                   2270:     );
                   2271: 
                   2272: //
                   2273: // _l Compat Functions
                   2274: //
                   2275: 
                   2276: int
1.1.1.2 ! root     2277: WINAPI
        !          2278: lstrcmpA(
        !          2279:     LPCSTR lpString1,
        !          2280:     LPCSTR lpString2
1.1       root     2281:     );
1.1.1.2 ! root     2282: int
        !          2283: WINAPI
        !          2284: lstrcmpW(
        !          2285:     LPCWSTR lpString1,
        !          2286:     LPCWSTR lpString2
        !          2287:     );
        !          2288: #ifdef UNICODE
        !          2289: #define lstrcmp lstrcmpW
        !          2290: #else
        !          2291: #define lstrcmp lstrcmpA
        !          2292: #endif // !UNICODE
1.1       root     2293: 
                   2294: int
1.1.1.2 ! root     2295: WINAPI
        !          2296: lstrcmpiA(
        !          2297:     LPCSTR lpString1,
        !          2298:     LPCSTR lpString2
        !          2299:     );
        !          2300: int
        !          2301: WINAPI
        !          2302: lstrcmpiW(
        !          2303:     LPCWSTR lpString1,
        !          2304:     LPCWSTR lpString2
1.1       root     2305:     );
1.1.1.2 ! root     2306: #ifdef UNICODE
        !          2307: #define lstrcmpi lstrcmpiW
        !          2308: #else
        !          2309: #define lstrcmpi lstrcmpiA
        !          2310: #endif // !UNICODE
1.1       root     2311: 
                   2312: LPSTR
1.1.1.2 ! root     2313: WINAPI
        !          2314: lstrcpyA(
1.1       root     2315:     LPSTR lpString1,
1.1.1.2 ! root     2316:     LPCSTR lpString2
        !          2317:     );
        !          2318: LPWSTR
        !          2319: WINAPI
        !          2320: lstrcpyW(
        !          2321:     LPWSTR lpString1,
        !          2322:     LPCWSTR lpString2
1.1       root     2323:     );
1.1.1.2 ! root     2324: #ifdef UNICODE
        !          2325: #define lstrcpy lstrcpyW
        !          2326: #else
        !          2327: #define lstrcpy lstrcpyA
        !          2328: #endif // !UNICODE
1.1       root     2329: 
                   2330: LPSTR
1.1.1.2 ! root     2331: WINAPI
        !          2332: lstrcatA(
1.1       root     2333:     LPSTR lpString1,
1.1.1.2 ! root     2334:     LPCSTR lpString2
1.1       root     2335:     );
1.1.1.2 ! root     2336: LPWSTR
        !          2337: WINAPI
        !          2338: lstrcatW(
        !          2339:     LPWSTR lpString1,
        !          2340:     LPCWSTR lpString2
        !          2341:     );
        !          2342: #ifdef UNICODE
        !          2343: #define lstrcat lstrcatW
        !          2344: #else
        !          2345: #define lstrcat lstrcatA
        !          2346: #endif // !UNICODE
1.1       root     2347: 
                   2348: int
1.1.1.2 ! root     2349: WINAPI
        !          2350: lstrlenA(
        !          2351:     LPCSTR lpString
1.1       root     2352:     );
                   2353: int
1.1.1.2 ! root     2354: WINAPI
        !          2355: lstrlenW(
        !          2356:     LPCWSTR lpString
1.1       root     2357:     );
1.1.1.2 ! root     2358: #ifdef UNICODE
        !          2359: #define lstrlen lstrlenW
        !          2360: #else
        !          2361: #define lstrlen lstrlenA
        !          2362: #endif // !UNICODE
1.1       root     2363: 
1.1.1.2 ! root     2364: HFILE
        !          2365: WINAPI
        !          2366: OpenFile(
        !          2367:     LPCSTR lpFileName,
1.1       root     2368:     LPOFSTRUCT lpReOpenBuff,
1.1.1.2 ! root     2369:     UINT uStyle
1.1       root     2370:     );
                   2371: 
1.1.1.2 ! root     2372: HFILE
        !          2373: WINAPI
1.1       root     2374: _lopen(
1.1.1.2 ! root     2375:     LPCSTR lpPathName,
1.1       root     2376:     int iReadWrite
                   2377:     );
                   2378: 
1.1.1.2 ! root     2379: HFILE
        !          2380: WINAPI
1.1       root     2381: _lcreat(
1.1.1.2 ! root     2382:     LPCSTR lpPathName,
        !          2383:     int  iAttribute
1.1       root     2384:     );
                   2385: 
1.1.1.2 ! root     2386: UINT
        !          2387: WINAPI
1.1       root     2388: _lread(
1.1.1.2 ! root     2389:     HFILE hFile,
        !          2390:     LPVOID lpBuffer,
        !          2391:     UINT uBytes
1.1       root     2392:     );
                   2393: 
1.1.1.2 ! root     2394: UINT
        !          2395: WINAPI
1.1       root     2396: _lwrite(
1.1.1.2 ! root     2397:     HFILE hFile,
        !          2398:     LPCSTR lpBuffer,
        !          2399:     UINT uBytes
1.1       root     2400:     );
                   2401: 
1.1.1.2 ! root     2402: HFILE
        !          2403: WINAPI
1.1       root     2404: _lclose(
1.1.1.2 ! root     2405:     HFILE hFile
1.1       root     2406:     );
                   2407: 
1.1.1.2 ! root     2408: LONG
        !          2409: WINAPI
1.1       root     2410: _llseek(
1.1.1.2 ! root     2411:     HFILE hFile,
        !          2412:     LONG lOffset,
1.1       root     2413:     int iOrigin
                   2414:     );
                   2415: 
                   2416: DWORD
1.1.1.2 ! root     2417: WINAPI
1.1       root     2418: TlsAlloc(
                   2419:     VOID
                   2420:     );
                   2421: 
                   2422: LPVOID
1.1.1.2 ! root     2423: WINAPI
1.1       root     2424: TlsGetValue(
                   2425:     DWORD dwTlsIndex
                   2426:     );
                   2427: 
                   2428: BOOL
1.1.1.2 ! root     2429: WINAPI
1.1       root     2430: TlsSetValue(
                   2431:     DWORD dwTlsIndex,
                   2432:     LPVOID lpTlsValue
                   2433:     );
                   2434: 
                   2435: BOOL
1.1.1.2 ! root     2436: WINAPI
1.1       root     2437: TlsFree(
                   2438:     DWORD dwTlsIndex
                   2439:     );
                   2440: 
1.1.1.2 ! root     2441: typedef
        !          2442: VOID
        !          2443: (*LPOVERLAPPED_COMPLETION_ROUTINE)(
        !          2444:     DWORD dwErrorCode,
        !          2445:     DWORD dwNumberOfBytesTransfered,
        !          2446:     LPOVERLAPPED lpOverlapped
        !          2447:     );
        !          2448: 
        !          2449: DWORD
        !          2450: WINAPI
        !          2451: SleepEx(
        !          2452:     DWORD dwMilliseconds,
        !          2453:     BOOL bAlertable
        !          2454:     );
        !          2455: 
        !          2456: DWORD
        !          2457: WINAPI
        !          2458: WaitForSingleObjectEx(
        !          2459:     HANDLE hHandle,
        !          2460:     DWORD dwMilliseconds,
        !          2461:     BOOL bAlertable
        !          2462:     );
        !          2463: 
        !          2464: DWORD
        !          2465: WINAPI
        !          2466: WaitForMultipleObjectsEx(
        !          2467:     DWORD nCount,
        !          2468:     LPHANDLE lpHandles,
        !          2469:     BOOL bWaitAll,
        !          2470:     DWORD dwMilliseconds,
        !          2471:     BOOL bAlertable
        !          2472:     );
        !          2473: 
        !          2474: BOOL
        !          2475: WINAPI
        !          2476: ReadFileEx(
        !          2477:     HANDLE hFile,
        !          2478:     LPVOID lpBuffer,
        !          2479:     DWORD nNumberOfBytesToRead,
        !          2480:     LPOVERLAPPED lpOverlapped,
        !          2481:     LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
        !          2482:     );
        !          2483: 
        !          2484: BOOL
        !          2485: WINAPI
        !          2486: WriteFileEx(
        !          2487:     HANDLE hFile,
        !          2488:     LPVOID lpBuffer,
        !          2489:     DWORD nNumberOfBytesToWrite,
        !          2490:     LPOVERLAPPED lpOverlapped,
        !          2491:     LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
        !          2492:     );
        !          2493: 
        !          2494: BOOL
        !          2495: WINAPI
        !          2496: BackupRead(
        !          2497:     HANDLE hFile,
        !          2498:     LPBYTE lpBuffer,
        !          2499:     DWORD nNumberOfBytesToRead,
        !          2500:     LPDWORD lpNumberOfBytesRead,
        !          2501:     BOOL fAbort ,
        !          2502:     LPVOID *lpContext
        !          2503:     );
        !          2504: 
        !          2505: BOOL
        !          2506: WINAPI
        !          2507: BackupWrite(
        !          2508:     HANDLE hFile,
        !          2509:     LPBYTE lpBuffer,
        !          2510:     DWORD nNumberOfBytesToWrite,
        !          2511:     LPDWORD lpNumberOfBytesWritten,
        !          2512:     BOOL fAbort ,
        !          2513:     LPVOID *lpContext
        !          2514:     );
        !          2515: 
        !          2516: //
1.1       root     2517: // Dual Mode API below this line. Dual Mode Structures also included.
                   2518: //
                   2519: 
1.1.1.2 ! root     2520: #define STARTF_USESHOWWINDOW    0x00000001
        !          2521: #define STARTF_USESIZE          0x00000002
        !          2522: #define STARTF_USEPOSITION      0x00000004
        !          2523: #define STARTF_USECOUNTCHARS    0x00000008
        !          2524: #define STARTF_USEFILLATTRIBUTE 0x00000010
        !          2525: #define STARTF_RUNFULLSCREEN    0x00000020  // ignored for non-x86 platforms
        !          2526: #define STARTF_FORCEONFEEDBACK  0x00000040
        !          2527: #define STARTF_FORCEOFFFEEDBACK 0x00000080
1.1       root     2528: 
                   2529: typedef struct _STARTUPINFOA {
                   2530:     DWORD   cb;
                   2531:     LPSTR   lpReserved;
                   2532:     LPSTR   lpDesktop;
                   2533:     LPSTR   lpTitle;
                   2534:     DWORD   dwX;
                   2535:     DWORD   dwY;
                   2536:     DWORD   dwXSize;
                   2537:     DWORD   dwYSize;
                   2538:     DWORD   dwXCountChars;
                   2539:     DWORD   dwYCountChars;
                   2540:     DWORD   dwFillAttribute;
                   2541:     DWORD   dwFlags;
                   2542:     WORD    wShowWindow;
                   2543:     WORD    cbReserved2;
                   2544:     LPBYTE  lpReserved2;
                   2545: } STARTUPINFOA, *LPSTARTUPINFOA;
                   2546: typedef struct _STARTUPINFOW {
                   2547:     DWORD   cb;
                   2548:     LPWSTR  lpReserved;
                   2549:     LPWSTR  lpDesktop;
                   2550:     LPWSTR  lpTitle;
                   2551:     DWORD   dwX;
                   2552:     DWORD   dwY;
                   2553:     DWORD   dwXSize;
                   2554:     DWORD   dwYSize;
                   2555:     DWORD   dwXCountChars;
                   2556:     DWORD   dwYCountChars;
                   2557:     DWORD   dwFillAttribute;
                   2558:     DWORD   dwFlags;
                   2559:     WORD    wShowWindow;
                   2560:     WORD    cbReserved2;
                   2561:     LPBYTE  lpReserved2;
                   2562: } STARTUPINFOW, *LPSTARTUPINFOW;
                   2563: #ifdef UNICODE
                   2564: #define STARTUPINFO STARTUPINFOW
                   2565: #define LPSTARTUPINFO LPSTARTUPINFOW
                   2566: #else
                   2567: #define STARTUPINFO STARTUPINFOA
                   2568: #define LPSTARTUPINFO LPSTARTUPINFOA
                   2569: #endif // UNICODE
                   2570: 
                   2571: typedef struct _WIN32_FIND_DATAA {
                   2572:     DWORD dwFileAttributes;
                   2573:     FILETIME ftCreationTime;
                   2574:     FILETIME ftLastAccessTime;
                   2575:     FILETIME ftLastWriteTime;
                   2576:     DWORD nFileSizeHigh;
                   2577:     DWORD nFileSizeLow;
1.1.1.2 ! root     2578:     DWORD dwReserved0;
        !          2579:     DWORD dwReserved1;
1.1       root     2580:     CHAR   cFileName[ MAX_PATH ];
1.1.1.2 ! root     2581:     CHAR   cAlternateFileName[ 14 ];
1.1       root     2582: } WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
                   2583: typedef struct _WIN32_FIND_DATAW {
                   2584:     DWORD dwFileAttributes;
                   2585:     FILETIME ftCreationTime;
                   2586:     FILETIME ftLastAccessTime;
                   2587:     FILETIME ftLastWriteTime;
                   2588:     DWORD nFileSizeHigh;
                   2589:     DWORD nFileSizeLow;
1.1.1.2 ! root     2590:     DWORD dwReserved0;
        !          2591:     DWORD dwReserved1;
1.1       root     2592:     WCHAR  cFileName[ MAX_PATH ];
1.1.1.2 ! root     2593:     WCHAR  cAlternateFileName[ 14 ];
1.1       root     2594: } WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;
                   2595: #ifdef UNICODE
                   2596: #define WIN32_FIND_DATA WIN32_FIND_DATAW
                   2597: #define PWIN32_FIND_DATA PWIN32_FIND_DATAW
                   2598: #define LPWIN32_FIND_DATA LPWIN32_FIND_DATAW
                   2599: #else
                   2600: #define WIN32_FIND_DATA WIN32_FIND_DATAA
                   2601: #define PWIN32_FIND_DATA PWIN32_FIND_DATAA
                   2602: #define LPWIN32_FIND_DATA LPWIN32_FIND_DATAA
                   2603: #endif // UNICODE
                   2604: 
1.1.1.2 ! root     2605: 
        !          2606: 
1.1       root     2607: HANDLE
1.1.1.2 ! root     2608: WINAPI
1.1       root     2609: CreateMutexA(
                   2610:     LPSECURITY_ATTRIBUTES lpMutexAttributes,
                   2611:     BOOL bInitialOwner,
                   2612:     LPSTR lpName
                   2613:     );
                   2614: HANDLE
1.1.1.2 ! root     2615: WINAPI
1.1       root     2616: CreateMutexW(
                   2617:     LPSECURITY_ATTRIBUTES lpMutexAttributes,
                   2618:     BOOL bInitialOwner,
                   2619:     LPWSTR lpName
                   2620:     );
                   2621: #ifdef UNICODE
                   2622: #define CreateMutex CreateMutexW
                   2623: #else
                   2624: #define CreateMutex CreateMutexA
                   2625: #endif // !UNICODE
                   2626: 
                   2627: HANDLE
1.1.1.2 ! root     2628: WINAPI
1.1       root     2629: OpenMutexA(
                   2630:     DWORD dwDesiredAccess,
                   2631:     BOOL bInheritHandle,
                   2632:     LPSTR lpName
                   2633:     );
                   2634: HANDLE
1.1.1.2 ! root     2635: WINAPI
1.1       root     2636: OpenMutexW(
                   2637:     DWORD dwDesiredAccess,
                   2638:     BOOL bInheritHandle,
                   2639:     LPWSTR lpName
                   2640:     );
                   2641: #ifdef UNICODE
                   2642: #define OpenMutex OpenMutexW
                   2643: #else
                   2644: #define OpenMutex OpenMutexA
                   2645: #endif // !UNICODE
                   2646: 
                   2647: HANDLE
1.1.1.2 ! root     2648: WINAPI
1.1       root     2649: CreateEventA(
                   2650:     LPSECURITY_ATTRIBUTES lpEventAttributes,
                   2651:     BOOL bManualReset,
                   2652:     BOOL bInitialState,
                   2653:     LPSTR lpName
                   2654:     );
                   2655: HANDLE
1.1.1.2 ! root     2656: WINAPI
1.1       root     2657: CreateEventW(
                   2658:     LPSECURITY_ATTRIBUTES lpEventAttributes,
                   2659:     BOOL bManualReset,
                   2660:     BOOL bInitialState,
                   2661:     LPWSTR lpName
                   2662:     );
                   2663: #ifdef UNICODE
                   2664: #define CreateEvent CreateEventW
                   2665: #else
                   2666: #define CreateEvent CreateEventA
                   2667: #endif // !UNICODE
                   2668: 
                   2669: HANDLE
1.1.1.2 ! root     2670: WINAPI
1.1       root     2671: OpenEventA(
                   2672:     DWORD dwDesiredAccess,
                   2673:     BOOL bInheritHandle,
                   2674:     LPSTR lpName
                   2675:     );
                   2676: HANDLE
1.1.1.2 ! root     2677: WINAPI
1.1       root     2678: OpenEventW(
                   2679:     DWORD dwDesiredAccess,
                   2680:     BOOL bInheritHandle,
                   2681:     LPWSTR lpName
                   2682:     );
                   2683: #ifdef UNICODE
                   2684: #define OpenEvent OpenEventW
                   2685: #else
                   2686: #define OpenEvent OpenEventA
                   2687: #endif // !UNICODE
                   2688: 
                   2689: HANDLE
1.1.1.2 ! root     2690: WINAPI
1.1       root     2691: CreateSemaphoreA(
                   2692:     LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
                   2693:     LONG lInitialCount,
                   2694:     LONG lMaximumCount,
                   2695:     LPSTR lpName
                   2696:     );
                   2697: HANDLE
1.1.1.2 ! root     2698: WINAPI
1.1       root     2699: CreateSemaphoreW(
                   2700:     LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
                   2701:     LONG lInitialCount,
                   2702:     LONG lMaximumCount,
                   2703:     LPWSTR lpName
                   2704:     );
                   2705: #ifdef UNICODE
                   2706: #define CreateSemaphore CreateSemaphoreW
                   2707: #else
                   2708: #define CreateSemaphore CreateSemaphoreA
                   2709: #endif // !UNICODE
                   2710: 
                   2711: HANDLE
1.1.1.2 ! root     2712: WINAPI
1.1       root     2713: OpenSemaphoreA(
                   2714:     DWORD dwDesiredAccess,
                   2715:     BOOL bInheritHandle,
                   2716:     LPSTR lpName
                   2717:     );
                   2718: HANDLE
1.1.1.2 ! root     2719: WINAPI
1.1       root     2720: OpenSemaphoreW(
                   2721:     DWORD dwDesiredAccess,
                   2722:     BOOL bInheritHandle,
                   2723:     LPWSTR lpName
                   2724:     );
                   2725: #ifdef UNICODE
                   2726: #define OpenSemaphore OpenSemaphoreW
                   2727: #else
                   2728: #define OpenSemaphore OpenSemaphoreA
                   2729: #endif // !UNICODE
                   2730: 
                   2731: HANDLE
1.1.1.2 ! root     2732: WINAPI
1.1       root     2733: CreateFileMappingA(
                   2734:     HANDLE hFile,
                   2735:     LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
                   2736:     DWORD flProtect,
                   2737:     DWORD dwMaximumSizeHigh,
                   2738:     DWORD dwMaximumSizeLow,
                   2739:     LPSTR lpName
                   2740:     );
                   2741: HANDLE
1.1.1.2 ! root     2742: WINAPI
1.1       root     2743: CreateFileMappingW(
                   2744:     HANDLE hFile,
                   2745:     LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
                   2746:     DWORD flProtect,
                   2747:     DWORD dwMaximumSizeHigh,
                   2748:     DWORD dwMaximumSizeLow,
                   2749:     LPWSTR lpName
                   2750:     );
                   2751: #ifdef UNICODE
                   2752: #define CreateFileMapping CreateFileMappingW
                   2753: #else
                   2754: #define CreateFileMapping CreateFileMappingA
                   2755: #endif // !UNICODE
                   2756: 
                   2757: HANDLE
1.1.1.2 ! root     2758: WINAPI
1.1       root     2759: OpenFileMappingA(
                   2760:     DWORD dwDesiredAccess,
                   2761:     BOOL bInheritHandle,
                   2762:     LPSTR lpName
                   2763:     );
                   2764: HANDLE
1.1.1.2 ! root     2765: WINAPI
1.1       root     2766: OpenFileMappingW(
                   2767:     DWORD dwDesiredAccess,
                   2768:     BOOL bInheritHandle,
                   2769:     LPWSTR lpName
                   2770:     );
                   2771: #ifdef UNICODE
                   2772: #define OpenFileMapping OpenFileMappingW
                   2773: #else
                   2774: #define OpenFileMapping OpenFileMappingA
                   2775: #endif // !UNICODE
                   2776: 
                   2777: DWORD
1.1.1.2 ! root     2778: WINAPI
1.1       root     2779: GetLogicalDriveStringsA(
                   2780:     DWORD nBufferLength,
                   2781:     LPSTR lpBuffer
                   2782:     );
                   2783: DWORD
1.1.1.2 ! root     2784: WINAPI
1.1       root     2785: GetLogicalDriveStringsW(
                   2786:     DWORD nBufferLength,
                   2787:     LPWSTR lpBuffer
                   2788:     );
                   2789: #ifdef UNICODE
                   2790: #define GetLogicalDriveStrings GetLogicalDriveStringsW
                   2791: #else
                   2792: #define GetLogicalDriveStrings GetLogicalDriveStringsA
                   2793: #endif // !UNICODE
                   2794: 
                   2795: HANDLE
1.1.1.2 ! root     2796: WINAPI
1.1       root     2797: LoadLibraryA(
1.1.1.2 ! root     2798:     LPCSTR lpLibFileName
1.1       root     2799:     );
                   2800: HANDLE
1.1.1.2 ! root     2801: WINAPI
1.1       root     2802: LoadLibraryW(
1.1.1.2 ! root     2803:     LPCWSTR lpLibFileName
1.1       root     2804:     );
                   2805: #ifdef UNICODE
                   2806: #define LoadLibrary LoadLibraryW
                   2807: #else
                   2808: #define LoadLibrary LoadLibraryA
                   2809: #endif // !UNICODE
                   2810: 
                   2811: DWORD
1.1.1.2 ! root     2812: WINAPI
1.1       root     2813: GetModuleFileNameA(
                   2814:     HANDLE hModule,
                   2815:     LPSTR lpFilename,
                   2816:     DWORD nSize
                   2817:     );
                   2818: DWORD
1.1.1.2 ! root     2819: WINAPI
1.1       root     2820: GetModuleFileNameW(
                   2821:     HANDLE hModule,
                   2822:     LPWSTR lpFilename,
                   2823:     DWORD nSize
                   2824:     );
                   2825: #ifdef UNICODE
                   2826: #define GetModuleFileName GetModuleFileNameW
                   2827: #else
                   2828: #define GetModuleFileName GetModuleFileNameA
                   2829: #endif // !UNICODE
                   2830: 
                   2831: HANDLE
1.1.1.2 ! root     2832: WINAPI
1.1       root     2833: GetModuleHandleA(
1.1.1.2 ! root     2834:     LPCSTR lpModuleName
1.1       root     2835:     );
                   2836: HANDLE
1.1.1.2 ! root     2837: WINAPI
1.1       root     2838: GetModuleHandleW(
1.1.1.2 ! root     2839:     LPCWSTR lpModuleName
1.1       root     2840:     );
                   2841: #ifdef UNICODE
                   2842: #define GetModuleHandle GetModuleHandleW
                   2843: #else
                   2844: #define GetModuleHandle GetModuleHandleA
                   2845: #endif // !UNICODE
                   2846: 
                   2847: BOOL
1.1.1.2 ! root     2848: WINAPI
1.1       root     2849: CreateProcessA(
1.1.1.2 ! root     2850:     LPCSTR lpApplicationName,
        !          2851:     LPCSTR lpCommandLine,
1.1       root     2852:     LPSECURITY_ATTRIBUTES lpProcessAttributes,
                   2853:     LPSECURITY_ATTRIBUTES lpThreadAttributes,
                   2854:     BOOL bInheritHandles,
                   2855:     DWORD dwCreationFlags,
                   2856:     LPVOID lpEnvironment,
                   2857:     LPSTR lpCurrentDirectory,
                   2858:     LPSTARTUPINFOA lpStartupInfo,
                   2859:     LPPROCESS_INFORMATION lpProcessInformation
                   2860:     );
                   2861: BOOL
1.1.1.2 ! root     2862: WINAPI
1.1       root     2863: CreateProcessW(
1.1.1.2 ! root     2864:     LPCWSTR lpApplicationName,
        !          2865:     LPCWSTR lpCommandLine,
1.1       root     2866:     LPSECURITY_ATTRIBUTES lpProcessAttributes,
                   2867:     LPSECURITY_ATTRIBUTES lpThreadAttributes,
                   2868:     BOOL bInheritHandles,
                   2869:     DWORD dwCreationFlags,
                   2870:     LPVOID lpEnvironment,
                   2871:     LPWSTR lpCurrentDirectory,
                   2872:     LPSTARTUPINFOW lpStartupInfo,
                   2873:     LPPROCESS_INFORMATION lpProcessInformation
                   2874:     );
                   2875: #ifdef UNICODE
                   2876: #define CreateProcess CreateProcessW
                   2877: #else
                   2878: #define CreateProcess CreateProcessA
                   2879: #endif // !UNICODE
                   2880: 
                   2881: VOID
1.1.1.2 ! root     2882: WINAPI
1.1       root     2883: FatalAppExitA(
1.1.1.2 ! root     2884:     UINT uAction,
        !          2885:     LPCSTR lpMessageText
1.1       root     2886:     );
                   2887: VOID
1.1.1.2 ! root     2888: WINAPI
1.1       root     2889: FatalAppExitW(
1.1.1.2 ! root     2890:     UINT uAction,
        !          2891:     LPCWSTR lpMessageText
1.1       root     2892:     );
                   2893: #ifdef UNICODE
                   2894: #define FatalAppExit FatalAppExitW
                   2895: #else
                   2896: #define FatalAppExit FatalAppExitA
                   2897: #endif // !UNICODE
                   2898: 
                   2899: VOID
1.1.1.2 ! root     2900: WINAPI
1.1       root     2901: GetStartupInfoA(
                   2902:     LPSTARTUPINFOA lpStartupInfo
                   2903:     );
                   2904: VOID
1.1.1.2 ! root     2905: WINAPI
1.1       root     2906: GetStartupInfoW(
                   2907:     LPSTARTUPINFOW lpStartupInfo
                   2908:     );
                   2909: #ifdef UNICODE
                   2910: #define GetStartupInfo GetStartupInfoW
                   2911: #else
                   2912: #define GetStartupInfo GetStartupInfoA
                   2913: #endif // !UNICODE
                   2914: 
                   2915: LPSTR
1.1.1.2 ! root     2916: WINAPI
1.1       root     2917: GetCommandLineA(
                   2918:     VOID
                   2919:     );
                   2920: LPWSTR
1.1.1.2 ! root     2921: WINAPI
1.1       root     2922: GetCommandLineW(
                   2923:     VOID
                   2924:     );
                   2925: #ifdef UNICODE
                   2926: #define GetCommandLine GetCommandLineW
                   2927: #else
                   2928: #define GetCommandLine GetCommandLineA
                   2929: #endif // !UNICODE
                   2930: 
                   2931: DWORD
1.1.1.2 ! root     2932: WINAPI
1.1       root     2933: GetEnvironmentVariableA(
                   2934:     LPSTR lpName,
                   2935:     LPSTR lpBuffer,
                   2936:     DWORD nSize
                   2937:     );
                   2938: DWORD
1.1.1.2 ! root     2939: WINAPI
1.1       root     2940: GetEnvironmentVariableW(
                   2941:     LPWSTR lpName,
                   2942:     LPWSTR lpBuffer,
                   2943:     DWORD nSize
                   2944:     );
                   2945: #ifdef UNICODE
                   2946: #define GetEnvironmentVariable GetEnvironmentVariableW
                   2947: #else
                   2948: #define GetEnvironmentVariable GetEnvironmentVariableA
                   2949: #endif // !UNICODE
                   2950: 
                   2951: BOOL
1.1.1.2 ! root     2952: WINAPI
1.1       root     2953: SetEnvironmentVariableA(
                   2954:     LPSTR lpName,
                   2955:     LPSTR lpValue
                   2956:     );
                   2957: BOOL
1.1.1.2 ! root     2958: WINAPI
1.1       root     2959: SetEnvironmentVariableW(
                   2960:     LPWSTR lpName,
                   2961:     LPWSTR lpValue
                   2962:     );
                   2963: #ifdef UNICODE
                   2964: #define SetEnvironmentVariable SetEnvironmentVariableW
                   2965: #else
                   2966: #define SetEnvironmentVariable SetEnvironmentVariableA
                   2967: #endif // !UNICODE
                   2968: 
1.1.1.2 ! root     2969: DWORD
        !          2970: WINAPI
        !          2971: ExpandEnvironmentStringsA(
        !          2972:     LPCSTR lpSrc,
        !          2973:     LPSTR lpDst,
        !          2974:     DWORD nSize
        !          2975:     );
        !          2976: DWORD
        !          2977: WINAPI
        !          2978: ExpandEnvironmentStringsW(
        !          2979:     LPCWSTR lpSrc,
        !          2980:     LPWSTR lpDst,
        !          2981:     DWORD nSize
        !          2982:     );
        !          2983: #ifdef UNICODE
        !          2984: #define ExpandEnvironmentStrings ExpandEnvironmentStringsW
        !          2985: #else
        !          2986: #define ExpandEnvironmentStrings ExpandEnvironmentStringsA
        !          2987: #endif // !UNICODE
        !          2988: 
1.1       root     2989: VOID
1.1.1.2 ! root     2990: WINAPI
1.1       root     2991: OutputDebugStringA(
1.1.1.2 ! root     2992:     LPCSTR lpOutputString
1.1       root     2993:     );
                   2994: VOID
1.1.1.2 ! root     2995: WINAPI
1.1       root     2996: OutputDebugStringW(
1.1.1.2 ! root     2997:     LPCWSTR lpOutputString
1.1       root     2998:     );
                   2999: #ifdef UNICODE
                   3000: #define OutputDebugString OutputDebugStringW
                   3001: #else
                   3002: #define OutputDebugString OutputDebugStringA
                   3003: #endif // !UNICODE
                   3004: 
1.1.1.2 ! root     3005: HRSRC
        !          3006: WINAPI
1.1       root     3007: FindResourceA(
                   3008:     HANDLE hModule,
1.1.1.2 ! root     3009:     LPCSTR lpName,
        !          3010:     LPCSTR lpType
1.1       root     3011:     );
1.1.1.2 ! root     3012: HRSRC
        !          3013: WINAPI
1.1       root     3014: FindResourceW(
                   3015:     HANDLE hModule,
1.1.1.2 ! root     3016:     LPCWSTR lpName,
        !          3017:     LPCWSTR lpType
1.1       root     3018:     );
                   3019: #ifdef UNICODE
                   3020: #define FindResource FindResourceW
                   3021: #else
                   3022: #define FindResource FindResourceA
                   3023: #endif // !UNICODE
                   3024: 
1.1.1.2 ! root     3025: HRSRC
        !          3026: WINAPI
        !          3027: FindResourceExA(
        !          3028:     HANDLE hModule,
        !          3029:     LPCSTR lpType,
        !          3030:     LPCSTR lpName,
        !          3031:     WORD    wLanguage
        !          3032:     );
        !          3033: HRSRC
        !          3034: WINAPI
        !          3035: FindResourceExW(
        !          3036:     HANDLE hModule,
        !          3037:     LPCWSTR lpType,
        !          3038:     LPCWSTR lpName,
        !          3039:     WORD    wLanguage
        !          3040:     );
        !          3041: #ifdef UNICODE
        !          3042: #define FindResourceEx FindResourceExW
        !          3043: #else
        !          3044: #define FindResourceEx FindResourceExA
        !          3045: #endif // !UNICODE
        !          3046: 
        !          3047: #ifdef STRICT
        !          3048: typedef BOOL (CALLBACK* ENUMRESTYPEPROC)(HANDLE hModule, LPTSTR lpType,
        !          3049:         LONG lParam);
        !          3050: typedef BOOL (CALLBACK* ENUMRESNAMEPROC)(HANDLE hModule, LPCTSTR lpType,
        !          3051:         LPTSTR lpName, LONG lParam);
        !          3052: typedef BOOL (CALLBACK* ENUMRESLANGPROC)(HANDLE hModule, LPCTSTR lpType,
        !          3053:         LPCTSTR lpName, WORD  wLanguage, LONG lParam);
        !          3054: #else
        !          3055: typedef FARPROC ENUMRESTYPEPROC;
        !          3056: typedef FARPROC ENUMRESNAMEPROC;
        !          3057: typedef FARPROC ENUMRESLANGPROC;
        !          3058: #endif
        !          3059: 
1.1       root     3060: BOOL
1.1.1.2 ! root     3061: WINAPI
1.1       root     3062: EnumResourceTypesA(
                   3063:     HANDLE hModule,
1.1.1.2 ! root     3064:     ENUMRESTYPEPROC lpEnumFunc,
1.1       root     3065:     LONG lParam
                   3066:     );
                   3067: BOOL
1.1.1.2 ! root     3068: WINAPI
1.1       root     3069: EnumResourceTypesW(
                   3070:     HANDLE hModule,
1.1.1.2 ! root     3071:     ENUMRESTYPEPROC lpEnumFunc,
1.1       root     3072:     LONG lParam
                   3073:     );
                   3074: #ifdef UNICODE
                   3075: #define EnumResourceTypes EnumResourceTypesW
                   3076: #else
                   3077: #define EnumResourceTypes EnumResourceTypesA
                   3078: #endif // !UNICODE
                   3079: 
                   3080: 
                   3081: BOOL
1.1.1.2 ! root     3082: WINAPI
1.1       root     3083: EnumResourceNamesA(
                   3084:     HANDLE hModule,
1.1.1.2 ! root     3085:     LPCSTR lpType,
        !          3086:     ENUMRESNAMEPROC lpEnumFunc,
1.1       root     3087:     LONG lParam
                   3088:     );
                   3089: BOOL
1.1.1.2 ! root     3090: WINAPI
1.1       root     3091: EnumResourceNamesW(
                   3092:     HANDLE hModule,
1.1.1.2 ! root     3093:     LPCWSTR lpType,
        !          3094:     ENUMRESNAMEPROC lpEnumFunc,
1.1       root     3095:     LONG lParam
                   3096:     );
                   3097: #ifdef UNICODE
                   3098: #define EnumResourceNames EnumResourceNamesW
                   3099: #else
                   3100: #define EnumResourceNames EnumResourceNamesA
                   3101: #endif // !UNICODE
                   3102: 
1.1.1.2 ! root     3103: BOOL
        !          3104: WINAPI
        !          3105: EnumResourceLanguagesA(
        !          3106:     HANDLE hModule,
        !          3107:     LPCSTR lpType,
        !          3108:     LPCSTR lpName,
        !          3109:     ENUMRESLANGPROC lpEnumFunc,
        !          3110:     LONG lParam
        !          3111:     );
        !          3112: BOOL
        !          3113: WINAPI
        !          3114: EnumResourceLanguagesW(
        !          3115:     HANDLE hModule,
        !          3116:     LPCWSTR lpType,
        !          3117:     LPCWSTR lpName,
        !          3118:     ENUMRESLANGPROC lpEnumFunc,
        !          3119:     LONG lParam
        !          3120:     );
        !          3121: #ifdef UNICODE
        !          3122: #define EnumResourceLanguages EnumResourceLanguagesW
        !          3123: #else
        !          3124: #define EnumResourceLanguages EnumResourceLanguagesA
        !          3125: #endif // !UNICODE
        !          3126: 
        !          3127: HANDLE
        !          3128: WINAPI
        !          3129: BeginUpdateResourceA(
        !          3130:     LPSTR pFileName
        !          3131:     );
        !          3132: HANDLE
        !          3133: WINAPI
        !          3134: BeginUpdateResourceW(
        !          3135:     LPWSTR pFileName
        !          3136:     );
        !          3137: #ifdef UNICODE
        !          3138: #define BeginUpdateResource BeginUpdateResourceW
        !          3139: #else
        !          3140: #define BeginUpdateResource BeginUpdateResourceA
        !          3141: #endif // !UNICODE
        !          3142: 
        !          3143: BOOL
        !          3144: WINAPI
        !          3145: UpdateResourceA(
        !          3146:     HANDLE      hUpdate,
        !          3147:     LPSTR     lpType,
        !          3148:     LPSTR     lpName,
        !          3149:     WORD        wLanguage,
        !          3150:     LPVOID      lpData,
        !          3151:     DWORD       cbData
        !          3152:     );
        !          3153: BOOL
        !          3154: WINAPI
        !          3155: UpdateResourceW(
        !          3156:     HANDLE      hUpdate,
        !          3157:     LPWSTR     lpType,
        !          3158:     LPWSTR     lpName,
        !          3159:     WORD        wLanguage,
        !          3160:     LPVOID      lpData,
        !          3161:     DWORD       cbData
        !          3162:     );
        !          3163: #ifdef UNICODE
        !          3164: #define UpdateResource UpdateResourceW
        !          3165: #else
        !          3166: #define UpdateResource UpdateResourceA
        !          3167: #endif // !UNICODE
        !          3168: 
        !          3169: BOOL
        !          3170: WINAPI
        !          3171: EndUpdateResourceA(
        !          3172:     HANDLE      hUpdate,
        !          3173:     BOOL        fDiscard
        !          3174:     );
        !          3175: BOOL
        !          3176: WINAPI
        !          3177: EndUpdateResourceW(
        !          3178:     HANDLE      hUpdate,
        !          3179:     BOOL        fDiscard
        !          3180:     );
        !          3181: #ifdef UNICODE
        !          3182: #define EndUpdateResource EndUpdateResourceW
        !          3183: #else
        !          3184: #define EndUpdateResource EndUpdateResourceA
        !          3185: #endif // !UNICODE
        !          3186: 
1.1       root     3187: ATOM
1.1.1.2 ! root     3188: WINAPI
1.1       root     3189: GlobalAddAtomA(
1.1.1.2 ! root     3190:     LPCSTR lpString
1.1       root     3191:     );
                   3192: ATOM
1.1.1.2 ! root     3193: WINAPI
1.1       root     3194: GlobalAddAtomW(
1.1.1.2 ! root     3195:     LPCWSTR lpString
1.1       root     3196:     );
                   3197: #ifdef UNICODE
                   3198: #define GlobalAddAtom GlobalAddAtomW
                   3199: #else
                   3200: #define GlobalAddAtom GlobalAddAtomA
                   3201: #endif // !UNICODE
                   3202: 
                   3203: ATOM
1.1.1.2 ! root     3204: WINAPI
1.1       root     3205: GlobalFindAtomA(
1.1.1.2 ! root     3206:     LPCSTR lpString
1.1       root     3207:     );
                   3208: ATOM
1.1.1.2 ! root     3209: WINAPI
1.1       root     3210: GlobalFindAtomW(
1.1.1.2 ! root     3211:     LPCWSTR lpString
1.1       root     3212:     );
                   3213: #ifdef UNICODE
                   3214: #define GlobalFindAtom GlobalFindAtomW
                   3215: #else
                   3216: #define GlobalFindAtom GlobalFindAtomA
                   3217: #endif // !UNICODE
                   3218: 
1.1.1.2 ! root     3219: UINT
        !          3220: WINAPI
1.1       root     3221: GlobalGetAtomNameA(
                   3222:     ATOM nAtom,
                   3223:     LPSTR lpBuffer,
1.1.1.2 ! root     3224:     int nSize
1.1       root     3225:     );
1.1.1.2 ! root     3226: UINT
        !          3227: WINAPI
1.1       root     3228: GlobalGetAtomNameW(
                   3229:     ATOM nAtom,
                   3230:     LPWSTR lpBuffer,
1.1.1.2 ! root     3231:     int nSize
1.1       root     3232:     );
                   3233: #ifdef UNICODE
                   3234: #define GlobalGetAtomName GlobalGetAtomNameW
                   3235: #else
                   3236: #define GlobalGetAtomName GlobalGetAtomNameA
                   3237: #endif // !UNICODE
                   3238: 
                   3239: ATOM
1.1.1.2 ! root     3240: WINAPI
1.1       root     3241: AddAtomA(
1.1.1.2 ! root     3242:     LPCSTR lpString
1.1       root     3243:     );
                   3244: ATOM
1.1.1.2 ! root     3245: WINAPI
1.1       root     3246: AddAtomW(
1.1.1.2 ! root     3247:     LPCWSTR lpString
1.1       root     3248:     );
                   3249: #ifdef UNICODE
                   3250: #define AddAtom AddAtomW
                   3251: #else
                   3252: #define AddAtom AddAtomA
                   3253: #endif // !UNICODE
                   3254: 
                   3255: ATOM
1.1.1.2 ! root     3256: WINAPI
1.1       root     3257: FindAtomA(
1.1.1.2 ! root     3258:     LPCSTR lpString
1.1       root     3259:     );
                   3260: ATOM
1.1.1.2 ! root     3261: WINAPI
1.1       root     3262: FindAtomW(
1.1.1.2 ! root     3263:     LPCWSTR lpString
1.1       root     3264:     );
                   3265: #ifdef UNICODE
                   3266: #define FindAtom FindAtomW
                   3267: #else
                   3268: #define FindAtom FindAtomA
                   3269: #endif // !UNICODE
                   3270: 
1.1.1.2 ! root     3271: UINT
        !          3272: WINAPI
1.1       root     3273: GetAtomNameA(
                   3274:     ATOM nAtom,
                   3275:     LPSTR lpBuffer,
1.1.1.2 ! root     3276:     int nSize
1.1       root     3277:     );
1.1.1.2 ! root     3278: UINT
        !          3279: WINAPI
1.1       root     3280: GetAtomNameW(
                   3281:     ATOM nAtom,
                   3282:     LPWSTR lpBuffer,
1.1.1.2 ! root     3283:     int nSize
1.1       root     3284:     );
                   3285: #ifdef UNICODE
                   3286: #define GetAtomName GetAtomNameW
                   3287: #else
                   3288: #define GetAtomName GetAtomNameA
                   3289: #endif // !UNICODE
                   3290: 
1.1.1.2 ! root     3291: UINT
        !          3292: WINAPI
1.1       root     3293: GetProfileIntA(
1.1.1.2 ! root     3294:     LPCSTR lpAppName,
        !          3295:     LPCSTR lpKeyName,
1.1       root     3296:     DWORD nDefault
                   3297:     );
1.1.1.2 ! root     3298: UINT
        !          3299: WINAPI
1.1       root     3300: GetProfileIntW(
1.1.1.2 ! root     3301:     LPCWSTR lpAppName,
        !          3302:     LPCWSTR lpKeyName,
1.1       root     3303:     DWORD nDefault
                   3304:     );
                   3305: #ifdef UNICODE
                   3306: #define GetProfileInt GetProfileIntW
                   3307: #else
                   3308: #define GetProfileInt GetProfileIntA
                   3309: #endif // !UNICODE
                   3310: 
                   3311: DWORD
1.1.1.2 ! root     3312: WINAPI
1.1       root     3313: GetProfileStringA(
1.1.1.2 ! root     3314:     LPCSTR lpAppName,
        !          3315:     LPCSTR lpKeyName,
        !          3316:     LPCSTR lpDefault,
1.1       root     3317:     LPSTR lpReturnedString,
                   3318:     DWORD nSize
                   3319:     );
                   3320: DWORD
1.1.1.2 ! root     3321: WINAPI
1.1       root     3322: GetProfileStringW(
1.1.1.2 ! root     3323:     LPCWSTR lpAppName,
        !          3324:     LPCWSTR lpKeyName,
        !          3325:     LPCWSTR lpDefault,
1.1       root     3326:     LPWSTR lpReturnedString,
                   3327:     DWORD nSize
                   3328:     );
                   3329: #ifdef UNICODE
                   3330: #define GetProfileString GetProfileStringW
                   3331: #else
                   3332: #define GetProfileString GetProfileStringA
                   3333: #endif // !UNICODE
                   3334: 
                   3335: BOOL
1.1.1.2 ! root     3336: WINAPI
1.1       root     3337: WriteProfileStringA(
1.1.1.2 ! root     3338:     LPCSTR lpAppName,
        !          3339:     LPCSTR lpKeyName,
        !          3340:     LPCSTR lpString
1.1       root     3341:     );
                   3342: BOOL
1.1.1.2 ! root     3343: WINAPI
1.1       root     3344: WriteProfileStringW(
1.1.1.2 ! root     3345:     LPCWSTR lpAppName,
        !          3346:     LPCWSTR lpKeyName,
        !          3347:     LPCWSTR lpString
1.1       root     3348:     );
                   3349: #ifdef UNICODE
                   3350: #define WriteProfileString WriteProfileStringW
                   3351: #else
                   3352: #define WriteProfileString WriteProfileStringA
                   3353: #endif // !UNICODE
                   3354: 
                   3355: DWORD
1.1.1.2 ! root     3356: WINAPI
1.1       root     3357: GetProfileSectionA(
1.1.1.2 ! root     3358:     LPCSTR lpAppName,
1.1       root     3359:     LPSTR lpReturnedString,
                   3360:     DWORD nSize
                   3361:     );
                   3362: DWORD
1.1.1.2 ! root     3363: WINAPI
1.1       root     3364: GetProfileSectionW(
1.1.1.2 ! root     3365:     LPCWSTR lpAppName,
1.1       root     3366:     LPWSTR lpReturnedString,
                   3367:     DWORD nSize
                   3368:     );
                   3369: #ifdef UNICODE
                   3370: #define GetProfileSection GetProfileSectionW
                   3371: #else
                   3372: #define GetProfileSection GetProfileSectionA
                   3373: #endif // !UNICODE
                   3374: 
1.1.1.2 ! root     3375: BOOL
        !          3376: WINAPI
1.1       root     3377: WriteProfileSectionA(
1.1.1.2 ! root     3378:     LPCSTR lpAppName,
        !          3379:     LPCSTR lpString
1.1       root     3380:     );
1.1.1.2 ! root     3381: BOOL
        !          3382: WINAPI
1.1       root     3383: WriteProfileSectionW(
1.1.1.2 ! root     3384:     LPCWSTR lpAppName,
        !          3385:     LPCWSTR lpString
1.1       root     3386:     );
                   3387: #ifdef UNICODE
                   3388: #define WriteProfileSection WriteProfileSectionW
                   3389: #else
                   3390: #define WriteProfileSection WriteProfileSectionA
                   3391: #endif // !UNICODE
                   3392: 
1.1.1.2 ! root     3393: UINT
        !          3394: WINAPI
1.1       root     3395: GetPrivateProfileIntA(
1.1.1.2 ! root     3396:     LPCSTR lpAppName,
        !          3397:     LPCSTR lpKeyName,
1.1       root     3398:     DWORD nDefault,
1.1.1.2 ! root     3399:     LPCSTR lpFileName
1.1       root     3400:     );
1.1.1.2 ! root     3401: UINT
        !          3402: WINAPI
1.1       root     3403: GetPrivateProfileIntW(
1.1.1.2 ! root     3404:     LPCWSTR lpAppName,
        !          3405:     LPCWSTR lpKeyName,
1.1       root     3406:     DWORD nDefault,
1.1.1.2 ! root     3407:     LPCWSTR lpFileName
1.1       root     3408:     );
                   3409: #ifdef UNICODE
                   3410: #define GetPrivateProfileInt GetPrivateProfileIntW
                   3411: #else
                   3412: #define GetPrivateProfileInt GetPrivateProfileIntA
                   3413: #endif // !UNICODE
                   3414: 
                   3415: DWORD
1.1.1.2 ! root     3416: WINAPI
1.1       root     3417: GetPrivateProfileStringA(
1.1.1.2 ! root     3418:     LPCSTR lpAppName,
        !          3419:     LPCSTR lpKeyName,
        !          3420:     LPCSTR lpDefault,
1.1       root     3421:     LPSTR lpReturnedString,
                   3422:     DWORD nSize,
1.1.1.2 ! root     3423:     LPCSTR lpFileName
1.1       root     3424:     );
                   3425: DWORD
1.1.1.2 ! root     3426: WINAPI
1.1       root     3427: GetPrivateProfileStringW(
1.1.1.2 ! root     3428:     LPCWSTR lpAppName,
        !          3429:     LPCWSTR lpKeyName,
        !          3430:     LPCWSTR lpDefault,
1.1       root     3431:     LPWSTR lpReturnedString,
                   3432:     DWORD nSize,
1.1.1.2 ! root     3433:     LPCWSTR lpFileName
1.1       root     3434:     );
                   3435: #ifdef UNICODE
                   3436: #define GetPrivateProfileString GetPrivateProfileStringW
                   3437: #else
                   3438: #define GetPrivateProfileString GetPrivateProfileStringA
                   3439: #endif // !UNICODE
                   3440: 
                   3441: BOOL
1.1.1.2 ! root     3442: WINAPI
1.1       root     3443: WritePrivateProfileStringA(
1.1.1.2 ! root     3444:     LPCSTR lpAppName,
        !          3445:     LPCSTR lpKeyName,
        !          3446:     LPCSTR lpString,
        !          3447:     LPCSTR lpFileName
1.1       root     3448:     );
                   3449: BOOL
1.1.1.2 ! root     3450: WINAPI
1.1       root     3451: WritePrivateProfileStringW(
1.1.1.2 ! root     3452:     LPCWSTR lpAppName,
        !          3453:     LPCWSTR lpKeyName,
        !          3454:     LPCWSTR lpString,
        !          3455:     LPCWSTR lpFileName
1.1       root     3456:     );
                   3457: #ifdef UNICODE
                   3458: #define WritePrivateProfileString WritePrivateProfileStringW
                   3459: #else
                   3460: #define WritePrivateProfileString WritePrivateProfileStringA
                   3461: #endif // !UNICODE
                   3462: 
                   3463: DWORD
1.1.1.2 ! root     3464: WINAPI
1.1       root     3465: GetPrivateProfileSectionA(
1.1.1.2 ! root     3466:     LPCSTR lpAppName,
1.1       root     3467:     LPSTR lpReturnedString,
                   3468:     DWORD nSize,
1.1.1.2 ! root     3469:     LPCSTR lpFileName
1.1       root     3470:     );
                   3471: DWORD
1.1.1.2 ! root     3472: WINAPI
1.1       root     3473: GetPrivateProfileSectionW(
1.1.1.2 ! root     3474:     LPCWSTR lpAppName,
1.1       root     3475:     LPWSTR lpReturnedString,
                   3476:     DWORD nSize,
1.1.1.2 ! root     3477:     LPCWSTR lpFileName
1.1       root     3478:     );
                   3479: #ifdef UNICODE
                   3480: #define GetPrivateProfileSection GetPrivateProfileSectionW
                   3481: #else
                   3482: #define GetPrivateProfileSection GetPrivateProfileSectionA
                   3483: #endif // !UNICODE
                   3484: 
1.1.1.2 ! root     3485: BOOL
        !          3486: WINAPI
1.1       root     3487: WritePrivateProfileSectionA(
1.1.1.2 ! root     3488:     LPCSTR lpAppName,
        !          3489:     LPCSTR lpString,
        !          3490:     LPCSTR lpFileName
1.1       root     3491:     );
1.1.1.2 ! root     3492: BOOL
        !          3493: WINAPI
1.1       root     3494: WritePrivateProfileSectionW(
1.1.1.2 ! root     3495:     LPCWSTR lpAppName,
        !          3496:     LPCWSTR lpString,
        !          3497:     LPCWSTR lpFileName
1.1       root     3498:     );
                   3499: #ifdef UNICODE
                   3500: #define WritePrivateProfileSection WritePrivateProfileSectionW
                   3501: #else
                   3502: #define WritePrivateProfileSection WritePrivateProfileSectionA
                   3503: #endif // !UNICODE
                   3504: 
1.1.1.2 ! root     3505: UINT
        !          3506: WINAPI
1.1       root     3507: GetDriveTypeA(
                   3508:     LPSTR lpRootPathName
                   3509:     );
1.1.1.2 ! root     3510: UINT
        !          3511: WINAPI
1.1       root     3512: GetDriveTypeW(
                   3513:     LPWSTR lpRootPathName
                   3514:     );
                   3515: #ifdef UNICODE
                   3516: #define GetDriveType GetDriveTypeW
                   3517: #else
                   3518: #define GetDriveType GetDriveTypeA
                   3519: #endif // !UNICODE
                   3520: 
1.1.1.2 ! root     3521: UINT
        !          3522: WINAPI
1.1       root     3523: GetSystemDirectoryA(
                   3524:     LPSTR lpBuffer,
1.1.1.2 ! root     3525:     UINT uSize
1.1       root     3526:     );
1.1.1.2 ! root     3527: UINT
        !          3528: WINAPI
1.1       root     3529: GetSystemDirectoryW(
                   3530:     LPWSTR lpBuffer,
1.1.1.2 ! root     3531:     UINT uSize
1.1       root     3532:     );
                   3533: #ifdef UNICODE
                   3534: #define GetSystemDirectory GetSystemDirectoryW
                   3535: #else
                   3536: #define GetSystemDirectory GetSystemDirectoryA
                   3537: #endif // !UNICODE
                   3538: 
                   3539: DWORD
1.1.1.2 ! root     3540: WINAPI
1.1       root     3541: GetTempPathA(
                   3542:     DWORD nBufferLength,
                   3543:     LPSTR lpBuffer
                   3544:     );
                   3545: DWORD
1.1.1.2 ! root     3546: WINAPI
1.1       root     3547: GetTempPathW(
                   3548:     DWORD nBufferLength,
                   3549:     LPWSTR lpBuffer
                   3550:     );
                   3551: #ifdef UNICODE
                   3552: #define GetTempPath GetTempPathW
                   3553: #else
                   3554: #define GetTempPath GetTempPathA
                   3555: #endif // !UNICODE
                   3556: 
1.1.1.2 ! root     3557: UINT
        !          3558: WINAPI
1.1       root     3559: GetTempFileNameA(
1.1.1.2 ! root     3560:     LPCSTR lpPathName,
        !          3561:     LPCSTR lpPrefixString,
        !          3562:     UINT uUnique,
1.1       root     3563:     LPSTR lpTempFileName
                   3564:     );
1.1.1.2 ! root     3565: UINT
        !          3566: WINAPI
1.1       root     3567: GetTempFileNameW(
1.1.1.2 ! root     3568:     LPCWSTR lpPathName,
        !          3569:     LPCWSTR lpPrefixString,
        !          3570:     UINT uUnique,
1.1       root     3571:     LPWSTR lpTempFileName
                   3572:     );
                   3573: #ifdef UNICODE
                   3574: #define GetTempFileName GetTempFileNameW
                   3575: #else
                   3576: #define GetTempFileName GetTempFileNameA
                   3577: #endif // !UNICODE
                   3578: 
1.1.1.2 ! root     3579: UINT
        !          3580: WINAPI
1.1       root     3581: GetWindowsDirectoryA(
                   3582:     LPSTR lpBuffer,
1.1.1.2 ! root     3583:     UINT uSize
1.1       root     3584:     );
1.1.1.2 ! root     3585: UINT
        !          3586: WINAPI
1.1       root     3587: GetWindowsDirectoryW(
                   3588:     LPWSTR lpBuffer,
1.1.1.2 ! root     3589:     UINT uSize
1.1       root     3590:     );
                   3591: #ifdef UNICODE
                   3592: #define GetWindowsDirectory GetWindowsDirectoryW
                   3593: #else
                   3594: #define GetWindowsDirectory GetWindowsDirectoryA
                   3595: #endif // !UNICODE
                   3596: 
                   3597: BOOL
1.1.1.2 ! root     3598: WINAPI
1.1       root     3599: SetCurrentDirectoryA(
                   3600:     LPSTR lpPathName
                   3601:     );
                   3602: BOOL
1.1.1.2 ! root     3603: WINAPI
1.1       root     3604: SetCurrentDirectoryW(
                   3605:     LPWSTR lpPathName
                   3606:     );
                   3607: #ifdef UNICODE
                   3608: #define SetCurrentDirectory SetCurrentDirectoryW
                   3609: #else
                   3610: #define SetCurrentDirectory SetCurrentDirectoryA
                   3611: #endif // !UNICODE
                   3612: 
                   3613: DWORD
1.1.1.2 ! root     3614: WINAPI
1.1       root     3615: GetCurrentDirectoryA(
                   3616:     DWORD nBufferLength,
                   3617:     LPSTR lpBuffer
                   3618:     );
                   3619: DWORD
1.1.1.2 ! root     3620: WINAPI
1.1       root     3621: GetCurrentDirectoryW(
                   3622:     DWORD nBufferLength,
                   3623:     LPWSTR lpBuffer
                   3624:     );
                   3625: #ifdef UNICODE
                   3626: #define GetCurrentDirectory GetCurrentDirectoryW
                   3627: #else
                   3628: #define GetCurrentDirectory GetCurrentDirectoryA
                   3629: #endif // !UNICODE
                   3630: 
                   3631: BOOL
1.1.1.2 ! root     3632: WINAPI
1.1       root     3633: GetDiskFreeSpaceA(
                   3634:     LPSTR lpRootPathName,
                   3635:     LPDWORD lpSectorsPerCluster,
                   3636:     LPDWORD lpBytesPerSector,
                   3637:     LPDWORD lpNumberOfFreeClusters,
                   3638:     LPDWORD lpTotalNumberOfClusters
                   3639:     );
                   3640: BOOL
1.1.1.2 ! root     3641: WINAPI
1.1       root     3642: GetDiskFreeSpaceW(
                   3643:     LPWSTR lpRootPathName,
                   3644:     LPDWORD lpSectorsPerCluster,
                   3645:     LPDWORD lpBytesPerSector,
                   3646:     LPDWORD lpNumberOfFreeClusters,
                   3647:     LPDWORD lpTotalNumberOfClusters
                   3648:     );
                   3649: #ifdef UNICODE
                   3650: #define GetDiskFreeSpace GetDiskFreeSpaceW
                   3651: #else
                   3652: #define GetDiskFreeSpace GetDiskFreeSpaceA
                   3653: #endif // !UNICODE
                   3654: 
                   3655: BOOL
1.1.1.2 ! root     3656: WINAPI
1.1       root     3657: CreateDirectoryA(
                   3658:     LPSTR lpPathName,
                   3659:     LPSECURITY_ATTRIBUTES lpSecurityAttributes
                   3660:     );
                   3661: BOOL
1.1.1.2 ! root     3662: WINAPI
1.1       root     3663: CreateDirectoryW(
                   3664:     LPWSTR lpPathName,
                   3665:     LPSECURITY_ATTRIBUTES lpSecurityAttributes
                   3666:     );
                   3667: #ifdef UNICODE
                   3668: #define CreateDirectory CreateDirectoryW
                   3669: #else
                   3670: #define CreateDirectory CreateDirectoryA
                   3671: #endif // !UNICODE
                   3672: 
                   3673: BOOL
1.1.1.2 ! root     3674: WINAPI
1.1       root     3675: RemoveDirectoryA(
                   3676:     LPSTR lpPathName
                   3677:     );
                   3678: BOOL
1.1.1.2 ! root     3679: WINAPI
1.1       root     3680: RemoveDirectoryW(
                   3681:     LPWSTR lpPathName
                   3682:     );
                   3683: #ifdef UNICODE
                   3684: #define RemoveDirectory RemoveDirectoryW
                   3685: #else
                   3686: #define RemoveDirectory RemoveDirectoryA
                   3687: #endif // !UNICODE
                   3688: 
                   3689: DWORD
1.1.1.2 ! root     3690: WINAPI
1.1       root     3691: GetFullPathNameA(
1.1.1.2 ! root     3692:     LPCSTR lpFileName,
1.1       root     3693:     DWORD nBufferLength,
                   3694:     LPSTR lpBuffer,
                   3695:     LPSTR *lpFilePart
                   3696:     );
                   3697: DWORD
1.1.1.2 ! root     3698: WINAPI
1.1       root     3699: GetFullPathNameW(
1.1.1.2 ! root     3700:     LPCWSTR lpFileName,
1.1       root     3701:     DWORD nBufferLength,
                   3702:     LPWSTR lpBuffer,
                   3703:     LPWSTR *lpFilePart
                   3704:     );
                   3705: #ifdef UNICODE
                   3706: #define GetFullPathName GetFullPathNameW
                   3707: #else
                   3708: #define GetFullPathName GetFullPathNameA
                   3709: #endif // !UNICODE
                   3710: 
                   3711: #define EXPAND_LOCAL_DRIVES
                   3712: 
                   3713: 
                   3714: HANDLE
1.1.1.2 ! root     3715: WINAPI
1.1       root     3716: CreateFileA(
1.1.1.2 ! root     3717:     LPCSTR lpFileName,
1.1       root     3718:     DWORD dwDesiredAccess,
                   3719:     DWORD dwShareMode,
                   3720:     LPSECURITY_ATTRIBUTES lpSecurityAttributes,
                   3721:     DWORD dwCreationDisposition,
                   3722:     DWORD dwFlagsAndAttributes,
                   3723:     HANDLE hTemplateFile
                   3724:     );
                   3725: HANDLE
1.1.1.2 ! root     3726: WINAPI
1.1       root     3727: CreateFileW(
1.1.1.2 ! root     3728:     LPCWSTR lpFileName,
1.1       root     3729:     DWORD dwDesiredAccess,
                   3730:     DWORD dwShareMode,
                   3731:     LPSECURITY_ATTRIBUTES lpSecurityAttributes,
                   3732:     DWORD dwCreationDisposition,
                   3733:     DWORD dwFlagsAndAttributes,
                   3734:     HANDLE hTemplateFile
                   3735:     );
                   3736: #ifdef UNICODE
                   3737: #define CreateFile CreateFileW
                   3738: #else
                   3739: #define CreateFile CreateFileA
                   3740: #endif // !UNICODE
                   3741: 
                   3742: BOOL
1.1.1.2 ! root     3743: WINAPI
1.1       root     3744: SetFileAttributesA(
                   3745:     LPSTR lpFileName,
                   3746:     DWORD dwFileAttributes
                   3747:     );
                   3748: BOOL
1.1.1.2 ! root     3749: WINAPI
1.1       root     3750: SetFileAttributesW(
                   3751:     LPWSTR lpFileName,
                   3752:     DWORD dwFileAttributes
                   3753:     );
                   3754: #ifdef UNICODE
                   3755: #define SetFileAttributes SetFileAttributesW
                   3756: #else
                   3757: #define SetFileAttributes SetFileAttributesA
                   3758: #endif // !UNICODE
                   3759: 
                   3760: DWORD
1.1.1.2 ! root     3761: WINAPI
1.1       root     3762: GetFileAttributesA(
                   3763:     LPSTR lpFileName
                   3764:     );
                   3765: DWORD
1.1.1.2 ! root     3766: WINAPI
1.1       root     3767: GetFileAttributesW(
                   3768:     LPWSTR lpFileName
                   3769:     );
                   3770: #ifdef UNICODE
                   3771: #define GetFileAttributes GetFileAttributesW
                   3772: #else
                   3773: #define GetFileAttributes GetFileAttributesA
                   3774: #endif // !UNICODE
                   3775: 
                   3776: BOOL
1.1.1.2 ! root     3777: WINAPI
1.1       root     3778: DeleteFileA(
                   3779:     LPSTR lpFileName
                   3780:     );
                   3781: BOOL
1.1.1.2 ! root     3782: WINAPI
1.1       root     3783: DeleteFileW(
                   3784:     LPWSTR lpFileName
                   3785:     );
                   3786: #ifdef UNICODE
                   3787: #define DeleteFile DeleteFileW
                   3788: #else
                   3789: #define DeleteFile DeleteFileA
                   3790: #endif // !UNICODE
                   3791: 
                   3792: HANDLE
1.1.1.2 ! root     3793: WINAPI
1.1       root     3794: FindFirstFileA(
                   3795:     LPSTR lpFileName,
                   3796:     LPWIN32_FIND_DATAA lpFindFileData
                   3797:     );
                   3798: HANDLE
1.1.1.2 ! root     3799: WINAPI
1.1       root     3800: FindFirstFileW(
                   3801:     LPWSTR lpFileName,
                   3802:     LPWIN32_FIND_DATAW lpFindFileData
                   3803:     );
                   3804: #ifdef UNICODE
                   3805: #define FindFirstFile FindFirstFileW
                   3806: #else
                   3807: #define FindFirstFile FindFirstFileA
                   3808: #endif // !UNICODE
                   3809: 
                   3810: BOOL
1.1.1.2 ! root     3811: WINAPI
1.1       root     3812: FindNextFileA(
                   3813:     HANDLE hFindFile,
                   3814:     LPWIN32_FIND_DATAA lpFindFileData
                   3815:     );
                   3816: BOOL
1.1.1.2 ! root     3817: WINAPI
1.1       root     3818: FindNextFileW(
                   3819:     HANDLE hFindFile,
                   3820:     LPWIN32_FIND_DATAW lpFindFileData
                   3821:     );
                   3822: #ifdef UNICODE
                   3823: #define FindNextFile FindNextFileW
                   3824: #else
                   3825: #define FindNextFile FindNextFileA
                   3826: #endif // !UNICODE
                   3827: 
                   3828: DWORD
1.1.1.2 ! root     3829: WINAPI
1.1       root     3830: SearchPathA(
1.1.1.2 ! root     3831:     LPCSTR lpPath,
        !          3832:     LPCSTR lpFileName,
        !          3833:     LPCSTR lpExtension,
1.1       root     3834:     DWORD nBufferLength,
                   3835:     LPSTR lpBuffer,
                   3836:     LPSTR *lpFilePart
                   3837:     );
                   3838: DWORD
1.1.1.2 ! root     3839: WINAPI
1.1       root     3840: SearchPathW(
1.1.1.2 ! root     3841:     LPCWSTR lpPath,
        !          3842:     LPCWSTR lpFileName,
        !          3843:     LPCWSTR lpExtension,
1.1       root     3844:     DWORD nBufferLength,
                   3845:     LPWSTR lpBuffer,
                   3846:     LPWSTR *lpFilePart
                   3847:     );
                   3848: #ifdef UNICODE
                   3849: #define SearchPath SearchPathW
                   3850: #else
                   3851: #define SearchPath SearchPathA
                   3852: #endif // !UNICODE
                   3853: 
                   3854: BOOL
1.1.1.2 ! root     3855: WINAPI
1.1       root     3856: CopyFileA(
                   3857:     LPSTR lpExistingFileName,
                   3858:     LPSTR lpNewFileName,
                   3859:     BOOL bFailIfExists
                   3860:     );
                   3861: BOOL
1.1.1.2 ! root     3862: WINAPI
1.1       root     3863: CopyFileW(
                   3864:     LPWSTR lpExistingFileName,
                   3865:     LPWSTR lpNewFileName,
                   3866:     BOOL bFailIfExists
                   3867:     );
                   3868: #ifdef UNICODE
                   3869: #define CopyFile CopyFileW
                   3870: #else
                   3871: #define CopyFile CopyFileA
                   3872: #endif // !UNICODE
                   3873: 
                   3874: BOOL
1.1.1.2 ! root     3875: WINAPI
1.1       root     3876: MoveFileA(
                   3877:     LPSTR lpExistingFileName,
                   3878:     LPSTR lpNewFileName
                   3879:     );
                   3880: BOOL
1.1.1.2 ! root     3881: WINAPI
1.1       root     3882: MoveFileW(
                   3883:     LPWSTR lpExistingFileName,
                   3884:     LPWSTR lpNewFileName
                   3885:     );
                   3886: #ifdef UNICODE
                   3887: #define MoveFile MoveFileW
                   3888: #else
                   3889: #define MoveFile MoveFileA
                   3890: #endif // !UNICODE
                   3891: 
                   3892: HANDLE
1.1.1.2 ! root     3893: WINAPI
1.1       root     3894: CreateNamedPipeA(
                   3895:     LPSTR lpName,
                   3896:     DWORD dwOpenMode,
                   3897:     DWORD dwPipeMode,
                   3898:     DWORD nMaxInstances,
                   3899:     DWORD nOutBufferSize,
                   3900:     DWORD nInBufferSize,
                   3901:     DWORD nDefaultTimeOut,
                   3902:     LPSECURITY_ATTRIBUTES lpSecurityAttributes
                   3903:     );
                   3904: HANDLE
1.1.1.2 ! root     3905: WINAPI
1.1       root     3906: CreateNamedPipeW(
                   3907:     LPWSTR lpName,
                   3908:     DWORD dwOpenMode,
                   3909:     DWORD dwPipeMode,
                   3910:     DWORD nMaxInstances,
                   3911:     DWORD nOutBufferSize,
                   3912:     DWORD nInBufferSize,
                   3913:     DWORD nDefaultTimeOut,
                   3914:     LPSECURITY_ATTRIBUTES lpSecurityAttributes
                   3915:     );
                   3916: #ifdef UNICODE
                   3917: #define CreateNamedPipe CreateNamedPipeW
                   3918: #else
                   3919: #define CreateNamedPipe CreateNamedPipeA
                   3920: #endif // !UNICODE
                   3921: 
                   3922: BOOL
1.1.1.2 ! root     3923: WINAPI
1.1       root     3924: GetNamedPipeHandleStateA(
                   3925:     HANDLE hNamedPipe,
                   3926:     LPDWORD lpState,
                   3927:     LPDWORD lpCurInstances,
                   3928:     LPDWORD lpMaxCollectionCount,
                   3929:     LPDWORD lpCollectDataTimeout,
                   3930:     LPSTR lpUserName,
                   3931:     DWORD nMaxUserNameSize
                   3932:     );
                   3933: BOOL
1.1.1.2 ! root     3934: WINAPI
1.1       root     3935: GetNamedPipeHandleStateW(
                   3936:     HANDLE hNamedPipe,
                   3937:     LPDWORD lpState,
                   3938:     LPDWORD lpCurInstances,
                   3939:     LPDWORD lpMaxCollectionCount,
                   3940:     LPDWORD lpCollectDataTimeout,
                   3941:     LPWSTR lpUserName,
                   3942:     DWORD nMaxUserNameSize
                   3943:     );
                   3944: #ifdef UNICODE
                   3945: #define GetNamedPipeHandleState GetNamedPipeHandleStateW
                   3946: #else
                   3947: #define GetNamedPipeHandleState GetNamedPipeHandleStateA
                   3948: #endif // !UNICODE
                   3949: 
                   3950: BOOL
1.1.1.2 ! root     3951: WINAPI
1.1       root     3952: CallNamedPipeA(
                   3953:     LPSTR lpNamedPipeName,
                   3954:     LPVOID lpInBuffer,
                   3955:     DWORD nInBufferSize,
                   3956:     LPVOID lpOutBuffer,
                   3957:     DWORD nOutBufferSize,
                   3958:     LPDWORD lpBytesRead,
                   3959:     DWORD nTimeOut
                   3960:     );
                   3961: BOOL
1.1.1.2 ! root     3962: WINAPI
1.1       root     3963: CallNamedPipeW(
                   3964:     LPWSTR lpNamedPipeName,
                   3965:     LPVOID lpInBuffer,
                   3966:     DWORD nInBufferSize,
                   3967:     LPVOID lpOutBuffer,
                   3968:     DWORD nOutBufferSize,
                   3969:     LPDWORD lpBytesRead,
                   3970:     DWORD nTimeOut
                   3971:     );
                   3972: #ifdef UNICODE
                   3973: #define CallNamedPipe CallNamedPipeW
                   3974: #else
                   3975: #define CallNamedPipe CallNamedPipeA
                   3976: #endif // !UNICODE
                   3977: 
                   3978: BOOL
1.1.1.2 ! root     3979: WINAPI
1.1       root     3980: WaitNamedPipeA(
                   3981:     LPSTR lpNamedPipeName,
                   3982:     DWORD nTimeOut
                   3983:     );
                   3984: BOOL
1.1.1.2 ! root     3985: WINAPI
1.1       root     3986: WaitNamedPipeW(
                   3987:     LPWSTR lpNamedPipeName,
                   3988:     DWORD nTimeOut
                   3989:     );
                   3990: #ifdef UNICODE
                   3991: #define WaitNamedPipe WaitNamedPipeW
                   3992: #else
                   3993: #define WaitNamedPipe WaitNamedPipeA
                   3994: #endif // !UNICODE
                   3995: 
                   3996: BOOL
1.1.1.2 ! root     3997: WINAPI
1.1       root     3998: GetVolumeInformationA(
                   3999:     LPSTR lpRootPathName,
                   4000:     LPSTR lpVolumeNameBuffer,
                   4001:     DWORD nVolumeNameSize,
                   4002:     LPDWORD lpVolumeSerialNumber,
                   4003:     LPDWORD lpMaximumComponentLength,
                   4004:     LPDWORD lpFileSystemFlags,
                   4005:     LPSTR lpFileSystemNameBuffer,
                   4006:     DWORD nFileSystemNameSize
                   4007:     );
                   4008: BOOL
1.1.1.2 ! root     4009: WINAPI
1.1       root     4010: GetVolumeInformationW(
                   4011:     LPWSTR lpRootPathName,
                   4012:     LPWSTR lpVolumeNameBuffer,
                   4013:     DWORD nVolumeNameSize,
                   4014:     LPDWORD lpVolumeSerialNumber,
                   4015:     LPDWORD lpMaximumComponentLength,
                   4016:     LPDWORD lpFileSystemFlags,
                   4017:     LPWSTR lpFileSystemNameBuffer,
                   4018:     DWORD nFileSystemNameSize
                   4019:     );
                   4020: #ifdef UNICODE
                   4021: #define GetVolumeInformation GetVolumeInformationW
                   4022: #else
                   4023: #define GetVolumeInformation GetVolumeInformationA
                   4024: #endif // !UNICODE
                   4025: 
                   4026: //
                   4027: // Event logging APIs
                   4028: //
1.1.1.2 ! root     4029: 
1.1       root     4030: BOOL
1.1.1.2 ! root     4031: WINAPI
1.1       root     4032: ClearEventLogA (
1.1.1.2 ! root     4033:     HANDLE hEventLog,
        !          4034:     LPSTR lpBackupFileName
1.1       root     4035:     );
                   4036: BOOL
1.1.1.2 ! root     4037: WINAPI
1.1       root     4038: ClearEventLogW (
1.1.1.2 ! root     4039:     HANDLE hEventLog,
        !          4040:     LPWSTR lpBackupFileName
1.1       root     4041:     );
                   4042: #ifdef UNICODE
                   4043: #define ClearEventLog ClearEventLogW
                   4044: #else
                   4045: #define ClearEventLog ClearEventLogA
                   4046: #endif // !UNICODE
                   4047: 
                   4048: BOOL
1.1.1.2 ! root     4049: WINAPI
        !          4050: BackupEventLogA (
        !          4051:     HANDLE hEventLog,
        !          4052:     LPSTR lpBackupFileName
        !          4053:     );
        !          4054: BOOL
        !          4055: WINAPI
        !          4056: BackupEventLogW (
        !          4057:     HANDLE hEventLog,
        !          4058:     LPWSTR lpBackupFileName
        !          4059:     );
        !          4060: #ifdef UNICODE
        !          4061: #define BackupEventLog BackupEventLogW
        !          4062: #else
        !          4063: #define BackupEventLog BackupEventLogA
        !          4064: #endif // !UNICODE
        !          4065: 
        !          4066: BOOL
        !          4067: WINAPI
1.1       root     4068: CloseEventLog (
1.1.1.2 ! root     4069:     HANDLE hEventLog
        !          4070:     );
        !          4071: 
        !          4072: BOOL
        !          4073: WINAPI
        !          4074: DeregisterEventSource (
        !          4075:     HANDLE hEventLog
        !          4076:     );
        !          4077: 
        !          4078: 
        !          4079: BOOL
        !          4080: WINAPI
        !          4081: GetNumberOfEventLogRecords (
        !          4082:     HANDLE hEventLog,
        !          4083:     PDWORD NumberOfRecords
        !          4084:     );
        !          4085: 
        !          4086: BOOL
        !          4087: WINAPI
        !          4088: GetOldestEventLogRecord (
        !          4089:     HANDLE hEventLog,
        !          4090:     PDWORD OldestRecord
1.1       root     4091:     );
                   4092: 
                   4093: HANDLE
1.1.1.2 ! root     4094: WINAPI
1.1       root     4095: OpenEventLogA (
1.1.1.2 ! root     4096:     LPSTR lpUNCServerName,
        !          4097:     LPSTR lpSourceName
1.1       root     4098:     );
                   4099: HANDLE
1.1.1.2 ! root     4100: WINAPI
1.1       root     4101: OpenEventLogW (
1.1.1.2 ! root     4102:     LPWSTR lpUNCServerName,
        !          4103:     LPWSTR lpSourceName
1.1       root     4104:     );
                   4105: #ifdef UNICODE
                   4106: #define OpenEventLog OpenEventLogW
                   4107: #else
                   4108: #define OpenEventLog OpenEventLogA
                   4109: #endif // !UNICODE
                   4110: 
1.1.1.2 ! root     4111: HANDLE
        !          4112: WINAPI
        !          4113: RegisterEventSourceA (
        !          4114:     LPSTR lpUNCServerName,
        !          4115:     LPSTR lpSourceName
        !          4116:     );
        !          4117: HANDLE
        !          4118: WINAPI
        !          4119: RegisterEventSourceW (
        !          4120:     LPWSTR lpUNCServerName,
        !          4121:     LPWSTR lpSourceName
        !          4122:     );
        !          4123: #ifdef UNICODE
        !          4124: #define RegisterEventSource RegisterEventSourceW
        !          4125: #else
        !          4126: #define RegisterEventSource RegisterEventSourceA
        !          4127: #endif // !UNICODE
        !          4128: 
        !          4129: HANDLE
        !          4130: WINAPI
        !          4131: OpenBackupEventLogA (
        !          4132:     LPSTR lpUNCServerName,
        !          4133:     LPSTR lpFileName
        !          4134:     );
        !          4135: HANDLE
        !          4136: WINAPI
        !          4137: OpenBackupEventLogW (
        !          4138:     LPWSTR lpUNCServerName,
        !          4139:     LPWSTR lpFileName
        !          4140:     );
        !          4141: #ifdef UNICODE
        !          4142: #define OpenBackupEventLog OpenBackupEventLogW
        !          4143: #else
        !          4144: #define OpenBackupEventLog OpenBackupEventLogA
        !          4145: #endif // !UNICODE
        !          4146: 
1.1       root     4147: BOOL
1.1.1.2 ! root     4148: WINAPI
1.1       root     4149: ReadEventLogA (
1.1.1.2 ! root     4150:      HANDLE     hEventLog,
        !          4151:      DWORD      dwReadFlags,
        !          4152:      DWORD      dwRecordOffset,
        !          4153:      LPVOID     lpBuffer,
        !          4154:      DWORD      nNumberOfBytesToRead,
        !          4155:      DWORD      *pnBytesRead,
        !          4156:      DWORD      *pnMinNumberOfBytesNeeded
1.1       root     4157:     );
                   4158: BOOL
1.1.1.2 ! root     4159: WINAPI
1.1       root     4160: ReadEventLogW (
1.1.1.2 ! root     4161:      HANDLE     hEventLog,
        !          4162:      DWORD      dwReadFlags,
        !          4163:      DWORD      dwRecordOffset,
        !          4164:      LPVOID     lpBuffer,
        !          4165:      DWORD      nNumberOfBytesToRead,
        !          4166:      DWORD      *pnBytesRead,
        !          4167:      DWORD      *pnMinNumberOfBytesNeeded
1.1       root     4168:     );
                   4169: #ifdef UNICODE
                   4170: #define ReadEventLog ReadEventLogW
                   4171: #else
                   4172: #define ReadEventLog ReadEventLogA
                   4173: #endif // !UNICODE
                   4174: 
                   4175: BOOL
1.1.1.2 ! root     4176: WINAPI
        !          4177: ReportEventA (
        !          4178:      HANDLE     hEventLog,
        !          4179:      WORD       wType,
        !          4180:      WORD       wCategory,
        !          4181:      DWORD      dwEventID,
        !          4182:      PSID       lpUserSid,
        !          4183:      WORD       wNumStrings,
        !          4184:      DWORD      dwDataSize,
        !          4185:      LPSTR    *lpStrings,
        !          4186:      LPVOID     lpRawData
        !          4187:     );
        !          4188: BOOL
        !          4189: WINAPI
        !          4190: ReportEventW (
        !          4191:      HANDLE     hEventLog,
        !          4192:      WORD       wType,
        !          4193:      WORD       wCategory,
        !          4194:      DWORD      dwEventID,
        !          4195:      PSID       lpUserSid,
        !          4196:      WORD       wNumStrings,
        !          4197:      DWORD      dwDataSize,
        !          4198:      LPWSTR    *lpStrings,
        !          4199:      LPVOID     lpRawData
1.1       root     4200:     );
                   4201: #ifdef UNICODE
1.1.1.2 ! root     4202: #define ReportEvent ReportEventW
1.1       root     4203: #else
1.1.1.2 ! root     4204: #define ReportEvent ReportEventA
1.1       root     4205: #endif // !UNICODE
1.1.1.2 ! root     4206: 
1.1       root     4207: //
1.1.1.2 ! root     4208: //
        !          4209: // Security APIs
        !          4210: //
        !          4211: 
        !          4212: 
        !          4213: BOOL
        !          4214: WINAPI
        !          4215: DuplicateToken(
        !          4216:     HANDLE ExistingTokenHandle,
        !          4217:     SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
        !          4218:     PHANDLE DuplicateTokenHandle
        !          4219:     );
        !          4220: 
        !          4221: BOOL
        !          4222: WINAPI
        !          4223: GetKernelObjectSecurity (
        !          4224:     HANDLE Handle,
        !          4225:     SECURITY_INFORMATION RequestedInformation,
        !          4226:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4227:     DWORD nLength,
        !          4228:     LPDWORD lpnLengthNeeded
        !          4229:     );
        !          4230: 
        !          4231: BOOL
        !          4232: WINAPI
        !          4233: ImpersonateNamedPipeClient(
        !          4234:     HANDLE hNamedPipe
        !          4235:     );
        !          4236: 
        !          4237: BOOL
        !          4238: WINAPI
        !          4239: ImpersonateSelf(
        !          4240:     SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
        !          4241:     );
        !          4242: 
        !          4243: 
        !          4244: BOOL
        !          4245: WINAPI
        !          4246: RevertToSelf (
        !          4247:     VOID
        !          4248:     );
        !          4249: 
        !          4250: 
        !          4251: BOOL
        !          4252: WINAPI
        !          4253: AccessCheck (
        !          4254:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4255:     HANDLE ClientToken,
        !          4256:     DWORD DesiredAccess,
        !          4257:     PGENERIC_MAPPING GenericMapping,
        !          4258:     PPRIVILEGE_SET PrivilegeSet,
        !          4259:     LPDWORD PrivilegeSetLength,
        !          4260:     LPDWORD GrantedAccess,
        !          4261:     LPBOOL AccessStatus
        !          4262:     );
        !          4263: 
        !          4264: 
        !          4265: BOOL
        !          4266: WINAPI
        !          4267: OpenProcessToken (
        !          4268:     HANDLE ProcessHandle,
        !          4269:     DWORD DesiredAccess,
        !          4270:     PHANDLE TokenHandle
        !          4271:     );
        !          4272: 
        !          4273: 
        !          4274: BOOL
        !          4275: WINAPI
        !          4276: OpenThreadToken (
        !          4277:     HANDLE ThreadHandle,
        !          4278:     DWORD DesiredAccess,
        !          4279:     BOOL OpenAsSelf,
        !          4280:     PHANDLE TokenHandle
        !          4281:     );
        !          4282: 
        !          4283: 
        !          4284: BOOL
        !          4285: WINAPI
        !          4286: GetTokenInformation (
        !          4287:     HANDLE TokenHandle,
        !          4288:     TOKEN_INFORMATION_CLASS TokenInformationClass,
        !          4289:     LPVOID TokenInformation,
        !          4290:     DWORD TokenInformationLength,
        !          4291:     PDWORD ReturnLength
        !          4292:     );
        !          4293: 
        !          4294: 
        !          4295: BOOL
        !          4296: WINAPI
        !          4297: SetTokenInformation (
        !          4298:     HANDLE TokenHandle,
        !          4299:     TOKEN_INFORMATION_CLASS TokenInformationClass,
        !          4300:     LPVOID TokenInformation,
        !          4301:     DWORD TokenInformationLength
        !          4302:     );
        !          4303: 
        !          4304: 
        !          4305: BOOL
        !          4306: WINAPI
        !          4307: AdjustTokenPrivileges (
        !          4308:     HANDLE TokenHandle,
        !          4309:     BOOL DisableAllPrivileges,
        !          4310:     PTOKEN_PRIVILEGES NewState,
        !          4311:     DWORD BufferLength,
        !          4312:     PTOKEN_PRIVILEGES PreviousState,
        !          4313:     PDWORD ReturnLength
        !          4314:     );
        !          4315: 
        !          4316: 
        !          4317: BOOL
        !          4318: WINAPI
        !          4319: AdjustTokenGroups (
        !          4320:     HANDLE TokenHandle,
        !          4321:     BOOL ResetToDefault,
        !          4322:     PTOKEN_GROUPS NewState,
        !          4323:     DWORD BufferLength,
        !          4324:     PTOKEN_GROUPS PreviousState,
        !          4325:     PDWORD ReturnLength
        !          4326:     );
        !          4327: 
        !          4328: 
        !          4329: BOOL
        !          4330: WINAPI
        !          4331: PrivilegeCheck (
        !          4332:     HANDLE ClientToken,
        !          4333:     PPRIVILEGE_SET RequiredPrivileges,
        !          4334:     LPBOOL pfResult
        !          4335:     );
        !          4336: 
        !          4337: 
        !          4338: BOOL
        !          4339: WINAPI
        !          4340: AccessCheckAndAuditAlarmA (
        !          4341:     LPSTR SubsystemName,
        !          4342:     LPVOID HandleId,
        !          4343:     LPSTR ObjectTypeName,
        !          4344:     LPSTR ObjectName,
        !          4345:     PSECURITY_DESCRIPTOR SecurityDescriptor,
        !          4346:     DWORD DesiredAccess,
        !          4347:     PGENERIC_MAPPING GenericMapping,
        !          4348:     BOOL ObjectCreation,
        !          4349:     LPDWORD GrantedAccess,
        !          4350:     LPBOOL AccessStatus,
        !          4351:     LPBOOL pfGenerateOnClose
        !          4352:     );
        !          4353: BOOL
        !          4354: WINAPI
        !          4355: AccessCheckAndAuditAlarmW (
        !          4356:     LPWSTR SubsystemName,
        !          4357:     LPVOID HandleId,
        !          4358:     LPWSTR ObjectTypeName,
        !          4359:     LPWSTR ObjectName,
        !          4360:     PSECURITY_DESCRIPTOR SecurityDescriptor,
        !          4361:     DWORD DesiredAccess,
        !          4362:     PGENERIC_MAPPING GenericMapping,
        !          4363:     BOOL ObjectCreation,
        !          4364:     LPDWORD GrantedAccess,
        !          4365:     LPBOOL AccessStatus,
        !          4366:     LPBOOL pfGenerateOnClose
        !          4367:     );
        !          4368: #ifdef UNICODE
        !          4369: #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW
        !          4370: #else
        !          4371: #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA
        !          4372: #endif // !UNICODE
        !          4373: 
        !          4374: 
        !          4375: BOOL
        !          4376: WINAPI
        !          4377: ObjectOpenAuditAlarmA (
        !          4378:     LPSTR SubsystemName,
        !          4379:     LPVOID HandleId,
        !          4380:     LPSTR ObjectTypeName,
        !          4381:     LPSTR ObjectName,
        !          4382:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4383:     HANDLE ClientToken,
        !          4384:     DWORD DesiredAccess,
        !          4385:     DWORD GrantedAccess,
        !          4386:     PPRIVILEGE_SET Privileges,
        !          4387:     BOOL ObjectCreation,
        !          4388:     BOOL AccessGranted,
        !          4389:     LPBOOL GenerateOnClose
        !          4390:     );
        !          4391: BOOL
        !          4392: WINAPI
        !          4393: ObjectOpenAuditAlarmW (
        !          4394:     LPWSTR SubsystemName,
        !          4395:     LPVOID HandleId,
        !          4396:     LPWSTR ObjectTypeName,
        !          4397:     LPWSTR ObjectName,
        !          4398:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4399:     HANDLE ClientToken,
        !          4400:     DWORD DesiredAccess,
        !          4401:     DWORD GrantedAccess,
        !          4402:     PPRIVILEGE_SET Privileges,
        !          4403:     BOOL ObjectCreation,
        !          4404:     BOOL AccessGranted,
        !          4405:     LPBOOL GenerateOnClose
        !          4406:     );
        !          4407: #ifdef UNICODE
        !          4408: #define ObjectOpenAuditAlarm ObjectOpenAuditAlarmW
        !          4409: #else
        !          4410: #define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA
        !          4411: #endif // !UNICODE
        !          4412: 
        !          4413: 
        !          4414: BOOL
        !          4415: WINAPI
        !          4416: ObjectPrivilegeAuditAlarmA (
        !          4417:     LPSTR SubsystemName,
        !          4418:     LPVOID HandleId,
        !          4419:     HANDLE ClientToken,
        !          4420:     DWORD DesiredAccess,
        !          4421:     PPRIVILEGE_SET Privileges,
        !          4422:     BOOL AccessGranted
        !          4423:     );
        !          4424: BOOL
        !          4425: WINAPI
        !          4426: ObjectPrivilegeAuditAlarmW (
        !          4427:     LPWSTR SubsystemName,
        !          4428:     LPVOID HandleId,
        !          4429:     HANDLE ClientToken,
        !          4430:     DWORD DesiredAccess,
        !          4431:     PPRIVILEGE_SET Privileges,
        !          4432:     BOOL AccessGranted
        !          4433:     );
        !          4434: #ifdef UNICODE
        !          4435: #define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmW
        !          4436: #else
        !          4437: #define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA
        !          4438: #endif // !UNICODE
        !          4439: 
        !          4440: 
        !          4441: BOOL
        !          4442: WINAPI
        !          4443: ObjectCloseAuditAlarmA (
        !          4444:     LPSTR SubsystemName,
        !          4445:     LPVOID HandleId,
        !          4446:     BOOL GenerateOnClose
        !          4447:     );
        !          4448: BOOL
        !          4449: WINAPI
        !          4450: ObjectCloseAuditAlarmW (
        !          4451:     LPWSTR SubsystemName,
        !          4452:     LPVOID HandleId,
        !          4453:     BOOL GenerateOnClose
        !          4454:     );
        !          4455: #ifdef UNICODE
        !          4456: #define ObjectCloseAuditAlarm ObjectCloseAuditAlarmW
        !          4457: #else
        !          4458: #define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA
        !          4459: #endif // !UNICODE
        !          4460: 
        !          4461: 
        !          4462: BOOL
        !          4463: WINAPI
        !          4464: PrivilegedServiceAuditAlarmA (
        !          4465:     LPSTR SubsystemName,
        !          4466:     LPSTR ServiceName,
        !          4467:     HANDLE ClientToken,
        !          4468:     PPRIVILEGE_SET Privileges,
        !          4469:     BOOL AccessGranted
        !          4470:     );
        !          4471: BOOL
        !          4472: WINAPI
        !          4473: PrivilegedServiceAuditAlarmW (
        !          4474:     LPWSTR SubsystemName,
        !          4475:     LPWSTR ServiceName,
        !          4476:     HANDLE ClientToken,
        !          4477:     PPRIVILEGE_SET Privileges,
        !          4478:     BOOL AccessGranted
        !          4479:     );
        !          4480: #ifdef UNICODE
        !          4481: #define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmW
        !          4482: #else
        !          4483: #define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA
        !          4484: #endif // !UNICODE
        !          4485: 
        !          4486: 
        !          4487: BOOL
        !          4488: WINAPI
        !          4489: IsValidSid (
        !          4490:     PSID pSid
        !          4491:     );
        !          4492: 
        !          4493: 
        !          4494: BOOL
        !          4495: WINAPI
        !          4496: EqualSid (
        !          4497:     PSID pSid1,
        !          4498:     PSID pSid2
        !          4499:     );
        !          4500: 
        !          4501: 
        !          4502: BOOL
        !          4503: WINAPI
        !          4504: EqualPrefixSid (
        !          4505:     PSID pSid1,
        !          4506:     PSID pSid2
        !          4507:     );
        !          4508: 
        !          4509: 
        !          4510: DWORD
        !          4511: WINAPI
        !          4512: GetSidLengthRequired (
        !          4513:     UCHAR nSubAuthorityCount
        !          4514:     );
        !          4515: 
        !          4516: 
        !          4517: BOOL
        !          4518: WINAPI
        !          4519: AllocateAndInitializeSid (
        !          4520:     PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
        !          4521:     BYTE nSubAuthorityCount,
        !          4522:     DWORD nSubAuthority0,
        !          4523:     DWORD nSubAuthority1,
        !          4524:     DWORD nSubAuthority2,
        !          4525:     DWORD nSubAuthority3,
        !          4526:     DWORD nSubAuthority4,
        !          4527:     DWORD nSubAuthority5,
        !          4528:     DWORD nSubAuthority6,
        !          4529:     DWORD nSubAuthority7,
        !          4530:     PSID *pSid
        !          4531:     );
        !          4532: 
        !          4533: PVOID
        !          4534: WINAPI
        !          4535: FreeSid(
        !          4536:     PSID pSid
        !          4537:     );
        !          4538: 
        !          4539: BOOL
        !          4540: WINAPI
        !          4541: InitializeSid (
        !          4542:     PSID Sid,
        !          4543:     PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
        !          4544:     BYTE nSubAuthorityCount
        !          4545:     );
        !          4546: 
        !          4547: 
        !          4548: PSID_IDENTIFIER_AUTHORITY
        !          4549: WINAPI
        !          4550: GetSidIdentifierAuthority (
        !          4551:     PSID pSid
        !          4552:     );
        !          4553: 
        !          4554: 
        !          4555: PDWORD
        !          4556: WINAPI
        !          4557: GetSidSubAuthority (
        !          4558:     PSID pSid,
        !          4559:     DWORD nSubAuthority
        !          4560:     );
        !          4561: 
        !          4562: 
        !          4563: PUCHAR
        !          4564: WINAPI
        !          4565: GetSidSubAuthorityCount (
        !          4566:     PSID pSid
        !          4567:     );
        !          4568: 
        !          4569: 
        !          4570: DWORD
        !          4571: WINAPI
        !          4572: GetLengthSid (
        !          4573:     PSID pSid
        !          4574:     );
        !          4575: 
        !          4576: 
        !          4577: BOOL
        !          4578: WINAPI
        !          4579: CopySid (
        !          4580:     DWORD nDestinationSidLength,
        !          4581:     PSID pDestinationSid,
        !          4582:     PSID pSourceSid
        !          4583:     );
        !          4584: 
        !          4585: 
        !          4586: BOOL
        !          4587: WINAPI
        !          4588: AreAllAccessesGranted (
        !          4589:     DWORD GrantedAccess,
        !          4590:     DWORD DesiredAccess
        !          4591:     );
        !          4592: 
        !          4593: 
        !          4594: BOOL
        !          4595: WINAPI
        !          4596: AreAnyAccessesGranted (
        !          4597:     DWORD GrantedAccess,
        !          4598:     DWORD DesiredAccess
        !          4599:     );
        !          4600: 
        !          4601: 
        !          4602: VOID
        !          4603: WINAPI
        !          4604: MapGenericMask (
        !          4605:     PDWORD AccessMask,
        !          4606:     PGENERIC_MAPPING GenericMapping
        !          4607:     );
        !          4608: 
        !          4609: 
        !          4610: BOOL
        !          4611: WINAPI
        !          4612: IsValidAcl (
        !          4613:     PACL pAcl
        !          4614:     );
        !          4615: 
        !          4616: 
        !          4617: BOOL
        !          4618: WINAPI
        !          4619: InitializeAcl (
        !          4620:     PACL pAcl,
        !          4621:     DWORD nAclLength,
        !          4622:     DWORD dwAclRevision
        !          4623:     );
        !          4624: 
        !          4625: 
        !          4626: BOOL
        !          4627: WINAPI
        !          4628: GetAclInformation (
        !          4629:     PACL pAcl,
        !          4630:     LPVOID pAclInformation,
        !          4631:     DWORD nAclInformationLength,
        !          4632:     ACL_INFORMATION_CLASS dwAclInformationClass
        !          4633:     );
        !          4634: 
        !          4635: 
        !          4636: BOOL
        !          4637: WINAPI
        !          4638: SetAclInformation (
        !          4639:     PACL pAcl,
        !          4640:     LPVOID pAclInformation,
        !          4641:     DWORD nAclInformationLength,
        !          4642:     ACL_INFORMATION_CLASS dwAclInformationClass
        !          4643:     );
        !          4644: 
        !          4645: 
        !          4646: BOOL
        !          4647: WINAPI
        !          4648: AddAce (
        !          4649:     PACL pAcl,
        !          4650:     DWORD dwAceRevision,
        !          4651:     DWORD dwStartingAceIndex,
        !          4652:     LPVOID pAceList,
        !          4653:     DWORD nAceListLength
        !          4654:     );
        !          4655: 
        !          4656: 
        !          4657: BOOL
        !          4658: WINAPI
        !          4659: DeleteAce (
        !          4660:     PACL pAcl,
        !          4661:     DWORD dwAceIndex
        !          4662:     );
        !          4663: 
        !          4664: 
        !          4665: BOOL
        !          4666: WINAPI
        !          4667: GetAce (
        !          4668:     PACL pAcl,
        !          4669:     DWORD dwAceIndex,
        !          4670:     LPVOID *pAce
        !          4671:     );
        !          4672: 
        !          4673: 
        !          4674: BOOL
        !          4675: WINAPI
        !          4676: AddAccessAllowedAce (
        !          4677:     PACL pAcl,
        !          4678:     DWORD dwAceRevision,
        !          4679:     DWORD AccessMask,
        !          4680:     PSID pSid
        !          4681:     );
        !          4682: 
        !          4683: 
        !          4684: BOOL
        !          4685: WINAPI
        !          4686: AddAccessDeniedAce (
        !          4687:     PACL pAcl,
        !          4688:     DWORD dwAceRevision,
        !          4689:     DWORD AccessMask,
        !          4690:     PSID pSid
        !          4691:     );
        !          4692: 
        !          4693: 
        !          4694: BOOL
        !          4695: WINAPI
        !          4696: AddAuditAccessAce(
        !          4697:     PACL pAcl,
        !          4698:     DWORD dwAceRevision,
        !          4699:     DWORD dwAccessMask,
        !          4700:     PSID pSid,
        !          4701:     BOOL bAuditSuccess,
        !          4702:     BOOL bAuditFailure
        !          4703:     );
        !          4704: 
        !          4705: 
        !          4706: BOOL
        !          4707: WINAPI
        !          4708: FindFirstFreeAce (
        !          4709:     PACL pAcl,
        !          4710:     LPVOID *pAce
        !          4711:     );
        !          4712: 
        !          4713: 
        !          4714: BOOL
        !          4715: WINAPI
        !          4716: InitializeSecurityDescriptor (
        !          4717:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4718:     DWORD dwRevision
        !          4719:     );
        !          4720: 
        !          4721: 
        !          4722: BOOL
        !          4723: WINAPI
        !          4724: IsValidSecurityDescriptor (
        !          4725:     PSECURITY_DESCRIPTOR pSecurityDescriptor
        !          4726:     );
        !          4727: 
        !          4728: 
        !          4729: DWORD
        !          4730: WINAPI
        !          4731: GetSecurityDescriptorLength (
        !          4732:     PSECURITY_DESCRIPTOR pSecurityDescriptor
        !          4733:     );
        !          4734: 
        !          4735: 
        !          4736: BOOL
        !          4737: WINAPI
        !          4738: GetSecurityDescriptorControl (
        !          4739:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4740:     PSECURITY_DESCRIPTOR_CONTROL pControl,
        !          4741:     LPDWORD lpdwRevision
        !          4742:     );
        !          4743: 
        !          4744: 
        !          4745: BOOL
        !          4746: WINAPI
        !          4747: SetSecurityDescriptorDacl (
        !          4748:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4749:     BOOL bDaclPresent,
        !          4750:     PACL pDacl,
        !          4751:     BOOL bDaclDefaulted
        !          4752:     );
        !          4753: 
        !          4754: 
        !          4755: BOOL
        !          4756: WINAPI
        !          4757: GetSecurityDescriptorDacl (
        !          4758:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4759:     LPBOOL lpbDaclPresent,
        !          4760:     PACL *pDacl,
        !          4761:     LPBOOL lpbDaclDefaulted
        !          4762:     );
        !          4763: 
        !          4764: 
        !          4765: BOOL
        !          4766: WINAPI
        !          4767: SetSecurityDescriptorSacl (
        !          4768:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4769:     BOOL bSaclPresent,
        !          4770:     PACL pSacl,
        !          4771:     BOOL bSaclDefaulted
        !          4772:     );
        !          4773: 
        !          4774: 
        !          4775: BOOL
        !          4776: WINAPI
        !          4777: GetSecurityDescriptorSacl (
        !          4778:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4779:     LPBOOL lpbSaclPresent,
        !          4780:     PACL *pSacl,
        !          4781:     LPBOOL lpbSaclDefaulted
        !          4782:     );
        !          4783: 
        !          4784: 
        !          4785: BOOL
        !          4786: WINAPI
        !          4787: SetSecurityDescriptorOwner (
        !          4788:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4789:     PSID pOwner,
        !          4790:     BOOL bOwnerDefaulted
        !          4791:     );
        !          4792: 
        !          4793: 
        !          4794: BOOL
        !          4795: WINAPI
        !          4796: GetSecurityDescriptorOwner (
        !          4797:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4798:     PSID *pOwner,
        !          4799:     LPBOOL lpbOwnerDefaulted
        !          4800:     );
        !          4801: 
        !          4802: 
        !          4803: BOOL
        !          4804: WINAPI
        !          4805: SetSecurityDescriptorGroup (
        !          4806:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4807:     PSID pGroup,
        !          4808:     BOOL bGroupDefaulted
        !          4809:     );
        !          4810: 
        !          4811: 
        !          4812: BOOL
        !          4813: WINAPI
        !          4814: GetSecurityDescriptorGroup (
        !          4815:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4816:     PSID *pGroup,
        !          4817:     LPBOOL lpbGroupDefaulted
        !          4818:     );
        !          4819: 
        !          4820: 
        !          4821: BOOL
        !          4822: WINAPI
        !          4823: CreatePrivateObjectSecurity (
        !          4824:     PSECURITY_DESCRIPTOR ParentDescriptor,
        !          4825:     PSECURITY_DESCRIPTOR CreatorDescriptor,
        !          4826:     PSECURITY_DESCRIPTOR * NewDescriptor,
        !          4827:     BOOL IsDirectoryObject,
        !          4828:     HANDLE Token,
        !          4829:     PGENERIC_MAPPING GenericMapping
        !          4830:     );
        !          4831: 
        !          4832: 
        !          4833: BOOL
        !          4834: WINAPI
        !          4835: SetPrivateObjectSecurity (
        !          4836:     SECURITY_INFORMATION SecurityInformation,
        !          4837:     PSECURITY_DESCRIPTOR ModificationDescriptor,
        !          4838:     PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
        !          4839:     PGENERIC_MAPPING GenericMapping,
        !          4840:     HANDLE Token
        !          4841:     );
        !          4842: 
        !          4843: 
        !          4844: BOOL
        !          4845: WINAPI
        !          4846: GetPrivateObjectSecurity (
        !          4847:     PSECURITY_DESCRIPTOR ObjectDescriptor,
        !          4848:     SECURITY_INFORMATION SecurityInformation,
        !          4849:     PSECURITY_DESCRIPTOR ResultantDescriptor,
        !          4850:     DWORD DescriptorLength,
        !          4851:     PDWORD ReturnLength
        !          4852:     );
        !          4853: 
        !          4854: 
        !          4855: BOOL
        !          4856: WINAPI
        !          4857: DestroyPrivateObjectSecurity (
        !          4858:     PSECURITY_DESCRIPTOR * ObjectDescriptor
        !          4859:     );
        !          4860: 
        !          4861: 
        !          4862: BOOL
        !          4863: WINAPI
        !          4864: MakeSelfRelativeSD (
        !          4865:     PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
        !          4866:     PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
        !          4867:     LPDWORD lpdwBufferLength
        !          4868:     );
        !          4869: 
        !          4870: 
        !          4871: BOOL
        !          4872: WINAPI
        !          4873: MakeAbsoluteSD (
        !          4874:     PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
        !          4875:     PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
        !          4876:     LPDWORD lpdwAbsoluteSecurityDescriptorSize,
        !          4877:     PACL pDacl,
        !          4878:     LPDWORD lpdwDaclSize,
        !          4879:     PACL pSacl,
        !          4880:     LPDWORD lpdwSaclSize,
        !          4881:     PSID pOwner,
        !          4882:     LPDWORD lpdwOwnerSize,
        !          4883:     PSID pPrimaryGroup,
        !          4884:     LPDWORD lpdwPrimaryGroupSize
        !          4885:     );
        !          4886: 
        !          4887: 
        !          4888: BOOL
        !          4889: WINAPI
        !          4890: SetFileSecurityA (
        !          4891:     LPSTR lpFileName,
        !          4892:     SECURITY_INFORMATION SecurityInformation,
        !          4893:     PSECURITY_DESCRIPTOR pSecurityDescriptor
        !          4894:     );
        !          4895: BOOL
        !          4896: WINAPI
        !          4897: SetFileSecurityW (
        !          4898:     LPWSTR lpFileName,
        !          4899:     SECURITY_INFORMATION SecurityInformation,
        !          4900:     PSECURITY_DESCRIPTOR pSecurityDescriptor
        !          4901:     );
        !          4902: #ifdef UNICODE
        !          4903: #define SetFileSecurity SetFileSecurityW
        !          4904: #else
        !          4905: #define SetFileSecurity SetFileSecurityA
        !          4906: #endif // !UNICODE
        !          4907: 
        !          4908: 
        !          4909: BOOL
        !          4910: WINAPI
        !          4911: GetFileSecurityA (
        !          4912:     LPSTR lpFileName,
        !          4913:     SECURITY_INFORMATION RequestedInformation,
        !          4914:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4915:     DWORD nLength,
        !          4916:     LPDWORD lpnLengthNeeded
        !          4917:     );
        !          4918: BOOL
        !          4919: WINAPI
        !          4920: GetFileSecurityW (
        !          4921:     LPWSTR lpFileName,
        !          4922:     SECURITY_INFORMATION RequestedInformation,
        !          4923:     PSECURITY_DESCRIPTOR pSecurityDescriptor,
        !          4924:     DWORD nLength,
        !          4925:     LPDWORD lpnLengthNeeded
        !          4926:     );
        !          4927: #ifdef UNICODE
        !          4928: #define GetFileSecurity GetFileSecurityW
        !          4929: #else
        !          4930: #define GetFileSecurity GetFileSecurityA
        !          4931: #endif // !UNICODE
        !          4932: 
        !          4933: 
        !          4934: BOOL
        !          4935: WINAPI
        !          4936: SetKernelObjectSecurity (
        !          4937:     HANDLE Handle,
        !          4938:     SECURITY_INFORMATION SecurityInformation,
        !          4939:     PSECURITY_DESCRIPTOR SecurityDescriptor
        !          4940:     );
        !          4941: 
        !          4942: 
        !          4943: 
        !          4944: HANDLE
        !          4945: WINAPI
        !          4946: FindFirstChangeNotificationA(
        !          4947:     LPSTR lpPathName,
        !          4948:     BOOL bWatchSubtree,
        !          4949:     DWORD dwNotifyFilter
        !          4950:     );
        !          4951: HANDLE
        !          4952: WINAPI
        !          4953: FindFirstChangeNotificationW(
        !          4954:     LPWSTR lpPathName,
        !          4955:     BOOL bWatchSubtree,
        !          4956:     DWORD dwNotifyFilter
        !          4957:     );
        !          4958: #ifdef UNICODE
        !          4959: #define FindFirstChangeNotification FindFirstChangeNotificationW
        !          4960: #else
        !          4961: #define FindFirstChangeNotification FindFirstChangeNotificationA
        !          4962: #endif // !UNICODE
        !          4963: BOOL
        !          4964: WINAPI
        !          4965: FindNextChangeNotification(
        !          4966:     HANDLE hChangeHandle
        !          4967:     );
        !          4968: 
        !          4969: BOOL
        !          4970: WINAPI
        !          4971: FindCloseChangeNotification(
        !          4972:     HANDLE hChangeHandle
        !          4973:     );
        !          4974: 
        !          4975: BOOL
        !          4976: WINAPI
        !          4977: VirtualLock(
        !          4978:     LPVOID lpAddress,
        !          4979:     DWORD dwSize
        !          4980:     );
        !          4981: 
        !          4982: BOOL
        !          4983: WINAPI
        !          4984: VirtualUnlock(
        !          4985:     LPVOID lpAddress,
        !          4986:     DWORD dwSize
        !          4987:     );
        !          4988: 
        !          4989: LPVOID
        !          4990: WINAPI
        !          4991: MapViewOfFileEx(
        !          4992:     HANDLE hFileMappingObject,
        !          4993:     DWORD dwDesiredAccess,
        !          4994:     DWORD dwFileOffsetHigh,
        !          4995:     DWORD dwFileOffsetLow,
        !          4996:     DWORD dwNumberOfBytesToMap,
        !          4997:     LPVOID lpBaseAddress
        !          4998:     );
        !          4999: 
        !          5000: BOOL
        !          5001: WINAPI
        !          5002: SetPriorityClass(
        !          5003:     HANDLE hProcess,
        !          5004:     DWORD dwPriorityClass
        !          5005:     );
        !          5006: 
        !          5007: DWORD
        !          5008: WINAPI
        !          5009: GetPriorityClass(
        !          5010:     HANDLE hProcess
        !          5011:     );
        !          5012: 
        !          5013: BOOL
        !          5014: WINAPI
        !          5015: IsBadReadPtr(
        !          5016:     CONST VOID *lp,
        !          5017:     UINT ucb
        !          5018:     );
        !          5019: 
        !          5020: BOOL
        !          5021: WINAPI
        !          5022: IsBadWritePtr(
        !          5023:     LPVOID lp,
        !          5024:     UINT ucb
        !          5025:     );
        !          5026: 
        !          5027: BOOL
        !          5028: WINAPI
        !          5029: IsBadHugeReadPtr(
        !          5030:     CONST VOID *lp,
        !          5031:     UINT ucb
        !          5032:     );
        !          5033: 
        !          5034: BOOL
        !          5035: WINAPI
        !          5036: IsBadHugeWritePtr(
        !          5037:     LPVOID lp,
        !          5038:     UINT ucb
        !          5039:     );
        !          5040: 
        !          5041: BOOL
        !          5042: WINAPI
        !          5043: IsBadCodePtr(
        !          5044:     FARPROC lpfn
        !          5045:     );
        !          5046: 
        !          5047: BOOL
        !          5048: WINAPI
        !          5049: IsBadStringPtrA(
        !          5050:     LPCSTR lpsz,
        !          5051:     UINT ucchMax
        !          5052:     );
        !          5053: BOOL
        !          5054: WINAPI
        !          5055: IsBadStringPtrW(
        !          5056:     LPCWSTR lpsz,
        !          5057:     UINT ucchMax
        !          5058:     );
        !          5059: #ifdef UNICODE
        !          5060: #define IsBadStringPtr IsBadStringPtrW
        !          5061: #else
        !          5062: #define IsBadStringPtr IsBadStringPtrA
        !          5063: #endif // !UNICODE
        !          5064: 
        !          5065: BOOL
        !          5066: WINAPI
        !          5067: LookupAccountSidA(
        !          5068:     LPSTR lpSystemName,
        !          5069:     PSID Sid,
        !          5070:     LPSTR Name,
        !          5071:     LPDWORD cbName,
        !          5072:     LPSTR ReferencedDomainName,
        !          5073:     LPDWORD cbReferencedDomainName,
        !          5074:     PSID_NAME_USE peUse
        !          5075:     );
        !          5076: BOOL
        !          5077: WINAPI
        !          5078: LookupAccountSidW(
        !          5079:     LPWSTR lpSystemName,
        !          5080:     PSID Sid,
        !          5081:     LPWSTR Name,
        !          5082:     LPDWORD cbName,
        !          5083:     LPWSTR ReferencedDomainName,
        !          5084:     LPDWORD cbReferencedDomainName,
        !          5085:     PSID_NAME_USE peUse
        !          5086:     );
        !          5087: #ifdef UNICODE
        !          5088: #define LookupAccountSid LookupAccountSidW
        !          5089: #else
        !          5090: #define LookupAccountSid LookupAccountSidA
        !          5091: #endif // !UNICODE
        !          5092: 
        !          5093: BOOL
        !          5094: WINAPI
        !          5095: LookupAccountNameA(
        !          5096:     LPSTR lpSystemName,
        !          5097:     LPSTR lpAccountName,
        !          5098:     PSID Sid,
        !          5099:     LPDWORD cbSid,
        !          5100:     LPSTR ReferencedDomainName,
        !          5101:     LPDWORD cbReferencedDomainName,
        !          5102:     PSID_NAME_USE peUse
        !          5103:     );
        !          5104: BOOL
        !          5105: WINAPI
        !          5106: LookupAccountNameW(
        !          5107:     LPWSTR lpSystemName,
        !          5108:     LPWSTR lpAccountName,
        !          5109:     PSID Sid,
        !          5110:     LPDWORD cbSid,
        !          5111:     LPWSTR ReferencedDomainName,
        !          5112:     LPDWORD cbReferencedDomainName,
        !          5113:     PSID_NAME_USE peUse
        !          5114:     );
        !          5115: #ifdef UNICODE
        !          5116: #define LookupAccountName LookupAccountNameW
        !          5117: #else
        !          5118: #define LookupAccountName LookupAccountNameA
        !          5119: #endif // !UNICODE
        !          5120: 
        !          5121: BOOL
        !          5122: WINAPI
        !          5123: LookupPrivilegeValueA(
        !          5124:     LPSTR lpSystemName,
        !          5125:     LPSTR lpName,
        !          5126:     PLUID   lpLuid
        !          5127:     );
        !          5128: BOOL
        !          5129: WINAPI
        !          5130: LookupPrivilegeValueW(
        !          5131:     LPWSTR lpSystemName,
        !          5132:     LPWSTR lpName,
        !          5133:     PLUID   lpLuid
        !          5134:     );
        !          5135: #ifdef UNICODE
        !          5136: #define LookupPrivilegeValue LookupPrivilegeValueW
        !          5137: #else
        !          5138: #define LookupPrivilegeValue LookupPrivilegeValueA
        !          5139: #endif // !UNICODE
        !          5140: 
        !          5141: BOOL
        !          5142: WINAPI
        !          5143: LookupPrivilegeNameA(
        !          5144:     LPSTR lpSystemName,
        !          5145:     PLUID   lpLuid,
        !          5146:     LPSTR lpName,
        !          5147:     LPDWORD cbName
        !          5148:     );
        !          5149: BOOL
        !          5150: WINAPI
        !          5151: LookupPrivilegeNameW(
        !          5152:     LPWSTR lpSystemName,
        !          5153:     PLUID   lpLuid,
        !          5154:     LPWSTR lpName,
        !          5155:     LPDWORD cbName
        !          5156:     );
        !          5157: #ifdef UNICODE
        !          5158: #define LookupPrivilegeName LookupPrivilegeNameW
        !          5159: #else
        !          5160: #define LookupPrivilegeName LookupPrivilegeNameA
        !          5161: #endif // !UNICODE
        !          5162: 
        !          5163: BOOL
        !          5164: WINAPI
        !          5165: LookupPrivilegeDisplayNameA(
        !          5166:     LPSTR lpSystemName,
        !          5167:     LPSTR lpName,
        !          5168:     LPSTR lpDisplayName,
        !          5169:     LPDWORD cbDisplayName,
        !          5170:     LPDWORD lpLanguageId
        !          5171:     );
        !          5172: BOOL
        !          5173: WINAPI
        !          5174: LookupPrivilegeDisplayNameW(
        !          5175:     LPWSTR lpSystemName,
        !          5176:     LPWSTR lpName,
        !          5177:     LPWSTR lpDisplayName,
        !          5178:     LPDWORD cbDisplayName,
        !          5179:     LPDWORD lpLanguageId
        !          5180:     );
        !          5181: #ifdef UNICODE
        !          5182: #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW
        !          5183: #else
        !          5184: #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA
        !          5185: #endif // !UNICODE
        !          5186: 
        !          5187: BOOL
        !          5188: WINAPI
        !          5189: AllocateLocallyUniqueId(
        !          5190:     PLUID Luid
        !          5191:     );
        !          5192: 
        !          5193: BOOL
        !          5194: WINAPI
        !          5195: BuildCommDCBA(
        !          5196:     LPSTR lpDef,
        !          5197:     LPDCB lpDCB
        !          5198:     );
        !          5199: BOOL
        !          5200: WINAPI
        !          5201: BuildCommDCBW(
        !          5202:     LPWSTR lpDef,
        !          5203:     LPDCB lpDCB
        !          5204:     );
        !          5205: #ifdef UNICODE
        !          5206: #define BuildCommDCB BuildCommDCBW
        !          5207: #else
        !          5208: #define BuildCommDCB BuildCommDCBA
        !          5209: #endif // !UNICODE
        !          5210: 
        !          5211: #define MAX_COMPUTERNAME_LENGTH 80
        !          5212: 
        !          5213: BOOL
        !          5214: WINAPI
        !          5215: GetComputerNameA (
        !          5216:     LPSTR lpBuffer,
        !          5217:     LPDWORD nSize
        !          5218:     );
        !          5219: BOOL
        !          5220: WINAPI
        !          5221: GetComputerNameW (
        !          5222:     LPWSTR lpBuffer,
        !          5223:     LPDWORD nSize
        !          5224:     );
        !          5225: #ifdef UNICODE
        !          5226: #define GetComputerName GetComputerNameW
        !          5227: #else
        !          5228: #define GetComputerName GetComputerNameA
        !          5229: #endif // !UNICODE
        !          5230: 
        !          5231: BOOL
        !          5232: WINAPI
        !          5233: SetComputerNameA (
        !          5234:     LPSTR lpComputerName
        !          5235:     );
        !          5236: BOOL
        !          5237: WINAPI
        !          5238: SetComputerNameW (
        !          5239:     LPWSTR lpComputerName
        !          5240:     );
        !          5241: #ifdef UNICODE
        !          5242: #define SetComputerName SetComputerNameW
        !          5243: #else
        !          5244: #define SetComputerName SetComputerNameA
        !          5245: #endif // !UNICODE
        !          5246: 
        !          5247: BOOL
        !          5248: WINAPI
        !          5249: GetUserNameA (
        !          5250:     LPSTR lpBuffer,
        !          5251:     LPDWORD nSize
        !          5252:     );
        !          5253: BOOL
        !          5254: WINAPI
        !          5255: GetUserNameW (
        !          5256:     LPWSTR lpBuffer,
        !          5257:     LPDWORD nSize
        !          5258:     );
        !          5259: #ifdef UNICODE
        !          5260: #define GetUserName GetUserNameW
        !          5261: #else
        !          5262: #define GetUserName GetUserNameA
        !          5263: #endif // !UNICODE
        !          5264: 
        !          5265: //
        !          5266: // Performance counter API's
        !          5267: //
        !          5268: 
        !          5269: BOOL
        !          5270: WINAPI
        !          5271: QueryPerformanceCounter(
        !          5272:     LARGE_INTEGER *lpPerformanceCount
        !          5273:     );
        !          5274: 
        !          5275: BOOL
        !          5276: WINAPI
        !          5277: QueryPerformanceFrequency(
        !          5278:     LARGE_INTEGER *lpFrequency
        !          5279:     );
        !          5280: 
        !          5281: 
        !          5282: 
1.1       root     5283: // DOS and OS/2 Compatible Error Code definitions returned by the Win32 Base
                   5284: // API functions.
                   5285: //
                   5286: 
                   5287: #include <winerror.h>
                   5288: 
                   5289: /* Abnormal termination codes */
                   5290: 
                   5291: #define TC_NORMAL       0
                   5292: #define TC_HARDERR      1
                   5293: #define TC_GP_TRAP      2
                   5294: #define TC_SIGNAL       3
                   5295: 
                   5296: #endif // _WINBASE_

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.