⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kernel.odl

📁 The code for this article was written for version 1.0 of the Active Template Library (ATL). The cu
💻 ODL
📖 第 1 页 / 共 4 页
字号:
    entry("GetPrivateProfileStringA"),
    #else
    entry("GetPrivateProfileString"),
    #endif
    helpstring("Gets a string value from given entry within given section of INI file (or default if not found)"),
    ]
    int     WINAPI GetPrivateProfileString([in] LPCSTR lpszSection,
                                           [in] LPCSTR lpszEntry,
                                           [in] LPCSTR lpszDefault,
                                           [in, out] LPSTR lpszReturnBuffer,
                                           [in] int cbReturnBuffer,
                                           [in] LPCSTR lpszFilename);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("WritePrivateProfileStringA"),
    #else
    entry("WritePrivateProfileString"),
    #endif
    helpstring("Writes given string value to given entry within given section of INI file"),
    ]
    BOOL    WINAPI WritePrivateProfileString([in] LPCSTR lpszSection,
                                             [in] LPCSTR lpszEntry,
                                             [in] LPCSTR lpszString,
                                             [in] LPCSTR lpszFilename);

    // ******* International & Char Translation Support *******

    /* Omitted
    void    WINAPI AnsiToOem(const char _huge*, char _huge*);
    void    WINAPI OemToAnsi(const char _huge*, char _huge*);
    void    WINAPI AnsiToOemBuff(LPCSTR, LPSTR, UINT);
    void    WINAPI OemToAnsiBuff(LPCSTR, LPSTR, UINT);
    LPSTR   WINAPI AnsiNext(LPCSTR);
    LPSTR   WINAPI AnsiPrev(LPCSTR, LPCSTR);
    LPSTR   WINAPI AnsiUpper(LPSTR);
    LPSTR   WINAPI AnsiLower(LPSTR);
    UINT    WINAPI AnsiUpperBuff(LPSTR, UINT);
    UINT    WINAPI AnsiLowerBuff(LPSTR, UINT);
    BOOL    WINAPI IsCharAlpha(char);
    BOOL    WINAPI IsCharAlphaNumeric(char);
    BOOL    WINAPI IsCharUpper(char);
    BOOL    WINAPI IsCharLower(char);
    BOOL    WINAPI IsDBCSLeadByte(BYTE);
    */

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("lstrcmpA"),
    #else
    entry("lstrcmp"),
    #endif
    helpstring("Compares two strings (case sensitive) and returns less than zero if first string is less, zero if strings are equal, or greater than zero if first string is greater"),
    ]
    int     WINAPI lstrcmp([in] LPSTR lpszString1,
                           [in] LPSTR lpszString2);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("lstrcmpiA"),
    #else
    entry("lstrcmpi"),
    #endif
    helpstring("Compares two strings (case insensitive) and returns less than zero if first string is less, zero if strings are equal, or greater than zero if first string is greater"),
    ]
    int     WINAPI lstrcmpi([in] LPSTR lpszString1,
                            [in] LPSTR lpszString2);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("lstrcpyA"),
    #else
    entry("lstrcpy"),
    #endif
    helpstring("Copies source string to destination and returns pointer to result"),
    ]
    LONG    WINAPI lstrcpy([in] LPSTR lpszDst, [in] LPSTR lpszSrc);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("lstrcpyA"),
    #else
    entry("lstrcpy"),
    #endif
    helpstring("Copies source string to destination and returns pointer to result"),
    ]
    LONG    WINAPI lstrcpyFromLp([in] LPSTR lpszDst, [in] LONG lpszSrc);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("lstrcpyA"),
    #else
    entry("lstrcpy"),
    #endif
    helpstring("Copies source string to destination and returns pointer to result"),
    ]
    LONG    WINAPI lstrcpyToLp([in] LONG lpszDst, [in] LPSTR lpszSrc);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("lstrcatA"),
    #else
    entry("lstrcat"),
    #endif
    helpstring("Concatenates source string onto destination and returns pointer to result"),
    ]
    LONG    WINAPI lstrcat([in] LPSTR lpszDst, [in] LPSTR lpszSrc);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("lstrlenA"),
    #else
    entry("lstrlen"),
    #endif
    helpstring("Returns length of string"),
    ]
    int     WINAPI lstrlen([in] LPSTR lpsz);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("lstrcpynA"),
    #else
    entry("lstrcpyn"),
    #endif
    helpstring("Copies given count of characters from source string to destination and returns pointer to result"),
    ]
    LONG    WINAPI lstrcpyn([in] LPSTR lpszDst, [in] LPSTR lpszSrc,
                            [in] int cChars);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("RtlMoveMemory"),
    #else
    entry("hmemcpy"),
    #endif
    helpstring("Copies memory from pointer to byte array"),
    ]
    void WINAPI CopyMemoryLpToByte([in, out] BYTE FAR * pvDest,
                                   [in] DWORD pvSrc, [in] DWORD cbCopy);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("RtlMoveMemory"),
    #else
    entry("hmemcpy"),
    #endif
    helpstring("Copies memory from pointer to byte array"),
    ]
    void WINAPI CopyMemoryLpForByte([in] DWORD pvDest,
                                    [in, out] BYTE FAR * pvSrc,
                                    [in] DWORD cbCopy);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("RtlMoveMemory"),
    #else
    entry("hmemcpy"),
    #endif
    helpstring("Copies memory from pointer to string"),
    ]
    void WINAPI CopyMemoryLpToStr([in] LPSTR lpszDest,
                                  [in] DWORD pvSrc, [in] DWORD cbCopy);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("RtlMoveMemory"),
    #else
    entry("hmemcpy"),
    #endif
    helpstring("Copies memory from pointer to pointer"),
    ]
    void WINAPI CopyMemoryLpToLp([in] DWORD pvDest,
                                 [in] DWORD pvSrc, [in] DWORD cbCopy);

    /* Keyboard Driver Functions omitted
    */

}


[
uuid(54674043-3A82-101B-8181-00AA003743D3),
helpstring("Windows Kernel Constants"),
#ifdef WIN32
dllname("KERNEL32.DLL")
#else
dllname("KRNL386.EXE")
#endif
]
module KernelConst {

    [ helpstring("GetFreeSystemResources: Total Resources") ]
    const int GFSR_SYSTEMRESOURCES = 0;
    [ helpstring("GetFreeSystemResources: GDI Resources") ]
    const int GFSR_GDIRESOURCES = 1;
    [ helpstring("GetFreeSystemResources: USER Resources") ]
    const int GFSR_USERRESOURCES = 2;

    [ helpstring("GetWinFlags: Protected mode") ]
    const UINT WF_PMODE     = 0x0001;
    [ helpstring("GetWinFlags: 80286 CPU") ]
    const UINT WF_CPU286        = 0x0002;
    [ helpstring("GetWinFlags: 80386 CPU") ]
    const UINT WF_CPU386        = 0x0004;
    [ helpstring("GetWinFlags: 80486 CPU or higher") ]
    const UINT WF_CPU486        = 0x0008;
    [ helpstring("GetWinFlags: Standard mode") ]
    const UINT WF_STANDARD  = 0x0010;
    [ helpstring("GetWinFlags: Enhanced mode") ]
    const UINT WF_ENHANCED  = 0x0020;
    [ helpstring("GetWinFlags: Coprocessor") ]
    const UINT WF_80x87     = 0x0400;
    [ helpstring("GetWinFlags: Paging") ]
    const UINT WF_PAGING        = 0x0800;
    [ helpstring("GetWinFlags: Windows NT") ]
    const long WF_WINNT     = 0x4000;
    [ helpstring("GetWinFlags: OS/2 emulation") ]
    const long WF_WLO       = 0x8000;

    // Global Memory Flags

    [ helpstring("Fixed memory flag for GlobalAlloc") ]
    const UINT GMEM_FIXED       = 0x0000;
    [ helpstring("Moveable memory flag for GlobalAlloc") ]
    const UINT GMEM_MOVEABLE        = 0x0002;
    [ helpstring("No compact memory flag for GlobalAlloc") ]
    const UINT GMEM_NOCOMPACT   = 0x0010;
    [ helpstring("No discard memory flag for GlobalAlloc") ]
    const UINT GMEM_NODISCARD   = 0x0020;
    [ helpstring("Zero init memory flag for GlobalAlloc") ]
    const UINT GMEM_ZEROINIT        = 0x0040;
    [ helpstring("Modify memory flag for GlobalAlloc") ]
    const UINT GMEM_MODIFY      = 0x0080;
    [ helpstring("Discardable memory flag for GlobalAlloc and GlobalFlags") ]
    const UINT GMEM_DISCARDABLE = 0x0100;
    [ helpstring("Shared memory flag for GlobalAlloc") ]
    const UINT GMEM_SHARE       = 0x2000;
    [ helpstring("Fixed memory flag for GlobalAlloc") ]
    const UINT GMEM_NOTIFY      = 0x4000;
    [ helpstring("Notification memory flag for GlobalAlloc") ]
    const UINT GMEM_LOWER       = 0x1000;
    [ helpstring("Fixed and zero init memory flag for GlobalAlloc") ]
    const UINT GPTR             = 0x0040;
    [ helpstring("Discarded flag from GlobalFlags") ]
    const UINT GMEM_DISCARDED   = 0x4000;
    [ helpstring("Lock count flag from GlobalFlags") ]
    const UINT GMEM_LOCKCOUNT   = 0x00FF;

    /*
    const UINT GMEM_NOT_BANKED    = 0x1000;
    const UINT GMEM_DDESHARE      = 0x2000;
    const UINT GMEM_VALID_FLAGS   = 0x7F72;
    const UINT GMEM_INVALID_HANDLE = 0x8000;
    */

    // _lopen() flags
    [ helpstring("Read flag for lopen") ]
    const int READ          = 0;
    [ helpstring("Write flag for lopen") ]
    const int WRITE         = 1;
    [ helpstring("Read/write flag for lopen") ]
    const int READ_WRITE    = 2;

    // _llseek origin values
    [ helpstring("Move seek position from start of file (llseek)") ]
    const int SEEK_SET  = 0;
    [ helpstring("Move seek position from current position (llseek)") ]
    const int SEEK_CUR  = 1;
    [ helpstring("Move seek position from end of file (llseek)") ]
    const int SEEK_END  = 2;

    // Predefined Resource Types
    [ helpstring("FindResource: Resource type") ]
    const long RT_CURSOR        = 1;
    [ helpstring("FindResource: Resource type") ]
    const long RT_BITMAP        = 2;
    [ helpstring("FindResource: Resource type") ]
    const long RT_ICON          = 3;
    [ helpstring("FindResource: Resource type") ]
    const long RT_MENU          = 4;
    [ helpstring("FindResource: Resource type") ]
    const long RT_DIALOG        = 5;
    [ helpstring("FindResource: Resource type") ]
    const long RT_STRING        = 6;
    [ helpstring("FindResource: Resource type") ]
    const long RT_FONTDIR       = 7;
    [ helpstring("FindResource: Resource type") ]
    const long RT_FONT          = 8;
    [ helpstring("FindResource: Resource type") ]
    const long RT_ACCELERATOR   = 9;
    [ helpstring("FindResource: Resource type") ]
    const long RT_RCDATA        = 10;

    [ helpstring("FindResource: Resource type") ]
    const long RT_GROUP_CURSOR  = 12;
    [ helpstring("FindResource: Resource type") ]
    const long RT_GROUP_ICON    = 14;

    // Errors
    [ helpstring("WNet: Function succeeded") ]
    const UINT WN_SUCCESS           = 0x0000;
    [ helpstring("WNet: Function not supported") ]
    const UINT WN_NOT_SUPPORTED     = 0x0001;
    [ helpstring("WNet: Network error") ]
    const UINT WN_NET_ERROR         = 0x0002;
    [ helpstring("WNet: Buffer too small") ]
    const UINT WN_MORE_DATA         = 0x0003;
    [ helpstring("WNet: A pointer value was invalid") ]
    const UINT WN_BAD_POINTER       = 0x0004;
    [ helpstring("WNet: Local name invalid") ]
    const UINT WN_BAD_VALUE         = 0x0005;
    [ helpstring("WNet: Invalid password") ]
    const UINT WN_BAD_PASSWORD      = 0x0006;
    [ helpstring("WNet: A security violation occurred") ]
    const UINT WN_ACCESS_DENIED     = 0x0007;
    [ helpstring("WNet: The requested resource is in use") ]
    const UINT WN_FUNCTION_BUSY     = 0x0008;
    [ helpstring("WNet: Unexpected error") ]
    const UINT WN_WINDOWS_ERROR     = 0x0009;
    [ helpstring("WNet: Invalid user") ]
    const UINT WN_BAD_USER          = 0x000A;
    [ helpstring("WNet: System out of memory") ]
    const UINT WN_OUT_OF_MEMORY     = 0x000B;
    [ helpstring("WNet: Canceled by user") ]
    const UINT WN_CANCEL                = 0x000C;
    [ helpstring("WNet: Continued by user") ]
    const UINT WN_CONTINUE          = 0x000D;

    // Connection errors
    [ helpstring("WNet: Network connection does not exist") ]
    const UINT WN_NOT_CONNECTED     = 0x0030;
    [ helpstring("WNet: Files are open, but force not specified") ]
    const UINT WN_OPEN_FILES            = 0x0031;
    [ helpstring("WNet: Remote name invalid or already connected") ]
    const UINT WN_BAD_NETNAME       = 0x0032;
    [ helpstring("WNet: Local name invalid") ]
    const UINT WN_BAD_LOCALNAME     = 0x0033;
    [ helpstring("WNet: Local device already in use") ]
    const UINT WN_ALREADY_CONNECTED = 0x0034;
    [ helpstring("WNet: Device not functioning") ]
    const UINT WN_DEVICE_ERROR      = 0x0035;
    [ helpstring("WNet: Device not currently connected, but is a remembered connection") ]
    const UINT WN_CONNECTION_CLOSED = 0x0036;

    [ helpstring("GetBinaryType: Win32 application") ]
    const UINT SCS_32BIT_BINARY  = 0;
    [ helpstring("GetBinaryType: MS-DOS application") ]
    const UINT SCS_DOS_BINARY    = 1;
    [ helpstring("GetBinaryType: 16-bit Windows application") ]
    const UINT SCS_WOW_BINARY    = 2;
    [ helpstring("GetBinaryType: PIF file") ]
    const UINT SCS_PIF_BINARY    = 3;
    [ helpstring("GetBinaryType: Posix application") ]
    const UINT SCS_POSIX_BINARY  = 4;
    [ helpstring("GetBinaryType: 16-bit OS/2 application") ]
    const UINT SCS_OS216_BINARY  = 5;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -