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

📄 scarddat.idl

📁 vc6.0完整版
💻 IDL
📖 第 1 页 / 共 2 页
字号:
/*++

Copyright (c) 1996  Microsoft Corporation

Module Name:

    SCardDat

Abstract:

    IDL source for SCardDat.DLL. This in-process server (DLL)
    encapsulates the services oriented COM interfaces for the
    Smart Card Service Provider (SSP) Data Services.

Author:

    Michael Gallagher (a-mgalla) 11/21/1996

Environment:

    Win32

Revision History:

    Mike Gallagher (a-mgalla) 1/19/1997
    Chris Dudley (cdudley) 2/15/1997

Notes:

    1. This file will be processed by the MIDL tool to produce
        the type library (SCardDat.tlb) and marshalling code. A
        header file named SCardDat.h will be generated by the
        MIDL compiler for the ATL CPP code to use (and any other
        C/C++ code files).

    2. Rather than create separate IDL files for the C/C++, VB
        and Java languages, the decision has been made to create
        one IDL file that can be used by any language environment
        using standardized OLE Automation types.

    3. The #define'd constants in this MIDL file will NOT be
        registered into the type library! You will need to define
        these constants in your Visual Basic, Delphi, etc. code
        as needed unless the constant is not defined as a const
        variable in this IDL file. The constants will be defined
        for Java users. And, of course, the C/C++ coders can use
        the header file generated by the MIDL compiler as described
        above.

--*/


cpp_quote("//+-------------------------------------------------------------------------")
cpp_quote("//")
cpp_quote("//  Microsoft Smart Card Support")
cpp_quote("//  Copyright (C) Microsoft Corporation, 1996.")
cpp_quote("//")
cpp_quote("//")
cpp_quote("// File: SCardDat.h")
cpp_quote("//")
cpp_quote("//--------------------------------------------------------------------------")


cpp_quote("")
cpp_quote("//////////////////////////////////////////////////////////////////")
cpp_quote("//")
cpp_quote("// Imports")
cpp_quote("//")

#ifndef DO_NO_IMPORTS
    import "oaidl.idl";
#endif

interface IByteBuffer;
interface ISCardTypeConv;
interface ISCardCmd;


cpp_quote("")
cpp_quote("//////////////////////////////////////////////////////////////////")
cpp_quote("//")
cpp_quote("// Types and Constants")
cpp_quote("//")

cpp_quote("#ifndef _NULL_DEFINED")
    cpp_quote("#define _NULL_DEFINED")
    #define NULL    0
cpp_quote("#endif // !_NULL_DEFINED")

cpp_quote("#ifndef _LPBYTE_DEFINED")
    cpp_quote("#define _LPBYTE_DEFINED")
    typedef [public] BYTE *LPBYTE;
cpp_quote("#endif // !_LPBYTE_DEFINED")

cpp_quote("#ifndef _LPCBYTE_DEFINED")
    cpp_quote("#define _LPCBYTE_DEFINED")
    typedef [public] const BYTE *LPCBYTE;
cpp_quote("#endif // !_LPCBYTE_DEFINED")

cpp_quote("#ifndef _BYTEARRAY_DEFINED")
    cpp_quote("#define _BYTEARRAY_DEFINED")
    typedef [helpstring("Helpful byte array."),
             //uuid(),
             //helpcontext(),
             version(1.0)]
    struct tagBYTEARRAY {
        HGLOBAL hMem;
        DWORD dwSize;
        [size_is(dwSize)] LPBYTE pbyData;
     } BYTEARRAY;

    cpp_quote("#define _CB_BYTEARRAY_DEFINED")
    cpp_quote("#define CB_BYTEARRAY     (sizeof(BYTEARRAY))")

    cpp_quote("#define _PBYTEARRAY_DEFINED")
    typedef [public] BYTEARRAY *PBYTEARRAY;

    cpp_quote("#define _PCBYTEARRAY_DEFINED")
    typedef [public] const BYTEARRAY *PCBYTEARRAY;

    cpp_quote("#define _LPBYTEARRAY_DEFINED")
    typedef [public] BYTEARRAY *LPBYTEARRAY;

    cpp_quote("#define _LPCBYTEARRAY_DEFINED")
    typedef [public] const BYTEARRAY *LPCBYTEARRAY;
cpp_quote("#endif // _BYTEARRAY_DEFINED")

cpp_quote("#ifndef _STATSTRUCT")
    cpp_quote("#define _STATSTRUCT")
    typedef [helpstring("Stream status structure."),
             //uuid(),
             //helpcontext(),
             version(1.0)]
    struct tagSTATSTRUCT {
        LONG        type;
        LONG        cbSize;
        LONG        grfMode;
        LONG        grfLocksSupported;
        LONG        grfStateBits;
     } STATSTRUCT;

    cpp_quote("#define _CB_STATSTRUCT_DEFINED")
    cpp_quote("#define CB_STATSTRUCT    (sizeof(STATSTRUCT))")

    cpp_quote("#define _LPSTATSTRUCT_DEFINED")
    typedef [public] STATSTRUCT* LPSTATSTRUCT;
cpp_quote("#endif // _STATSTRUCT_DEFINED")

cpp_quote("#ifndef _ISO_APDU_TYPE")
    cpp_quote("#define _ISO_APDU_TYPE")
    typedef [helpstring("ISO 7816-4 APDU Case types."),
             //uuid(),
             //helpcontext(),
             version(1.0)]
    enum tagISO_APDU_TYPE {
        ISO_CASE_1 = 1,
        ISO_CASE_2 = 2,
        ISO_CASE_3 = 3,
        ISO_CASE_4 = 4
    } ISO_APDU_TYPE;
cpp_quote("#endif // _ISO_APDU_TYPE")


cpp_quote("")
cpp_quote("//////////////////////////////////////////////////////////////////")
cpp_quote("//")
cpp_quote("// IByteBuffer Interface")
cpp_quote("//")

cpp_quote("#ifndef _LPBYTEBUFFER_DEFINED")
cpp_quote("#define _LPBYTEBUFFER_DEFINED")
    [
        object,
        uuid(E126F8FE-A7AF-11D0-B88A-00C04FD424B9),
        dual,
        //hidden,
        //oleautomation,
        helpstring("IByteBuffer Interface"),
        pointer_default(unique)
    ]
    interface IByteBuffer : IDispatch
    {
        // Includes -

        // Pointers -
        typedef [unique] IByteBuffer* LPBYTEBUFFER;
        typedef [unique] const IByteBuffer *LPCBYTEBUFFER;

        // Properties -
        [   id(0), propget, hidden,
            helpstring("Returns a pointer to the internal IStream object.")]
            HRESULT Stream( [out, retval] LPSTREAM* ppStream );
        [   id(0), propput, hidden,
            helpstring("Sets the internal IStream pointer.")]
            HRESULT Stream( [in] LPSTREAM pStream );

        // Methods -
        [   id(1),
            helpstring("Creates a new object with its own seek pointer that references the same bytes as the original.")
        ]
        HRESULT Clone([in, out] LPBYTEBUFFER* ppByteBuffer);

        [   id(2),
            helpstring("Ensures that any changes made to an object open in transacted mode are reflected in the parent storage.")
        ]
        HRESULT Commit([in] LONG grfCommitFlags);

        [   id(3),
            helpstring("Copies a specified number of bytes from the current seek pointer in the object to the current seek pointer in another object.")
        ]
        HRESULT CopyTo( [in,out] LPBYTEBUFFER* pByteBuffer,
                        [in] LONG cb,
                        [in,out, defaultvalue(NULL)] LONG* pcbRead,
                        [in,out, defaultvalue(NULL)] LONG* pcbWritten);

        [   id(4),
            helpstring("Initializes the object. This must be called prior to calling any other methods!")]
        HRESULT Initialize( [in, defaultvalue(1)] LONG lSize,
                            [in, defaultvalue(NULL)] BYTE* pData );

        [   id(5),
            helpstring("Restricts access to a specified range of bytes in the buffer object.")
        ]
        HRESULT LockRegion( [in] LONG libOffset,
                            [in] LONG cb,
                            [in] LONG dwLockType);

        [   id(6),
            helpstring("Reads a specified number of bytes from the buffer object into memory starting at the current seek pointer.")
        ]
        HRESULT Read(   [in,out] BYTE* pByte,
                        [in] LONG cb,
                        [in, out, defaultvalue(NULL)] LONG* pcbRead);

        [   id(7),
            helpstring("Discards all changes that have been made to a transacted stream since the last IByteBuffer::Commit call.")
        ]
        HRESULT Revert ( void );

        [   id(8),
            helpstring("Changes the seek pointer to a new location relative to the beginning of the buffer, to the end of the buffer, or to the current seek pointer.")
        ]
        HRESULT Seek(   [in] LONG dLibMove,
                        [in] LONG dwOrigin,
                        [in,out, defaultvalue(NULL)] LONG* pLibnewPosition);

        [   id(9),
            helpstring("Changes the size of the stream object.")
        ]
        HRESULT SetSize([in] LONG libNewSize);

        [   id(10),
            helpstring("Retrieves the STATSTG structure for this object.")
        ]
        HRESULT Stat(   [in,out] LPSTATSTRUCT pstatstg,
                        [in] LONG grfStatFlag);
        [   id(11),
            helpstring("Removes the access restriction on a range of bytes previously restricted with IByteBuffer::LockRegion.")
        ]
        HRESULT UnlockRegion(   [in] LONG libOffset,
                                [in] LONG cb,
                                [in] LONG dwLockType);

        [   id(12),
            helpstring("Writes a specified number from bytes into the stream object starting at the current seek pointer.")
        ]
        HRESULT Write(  [in,out] BYTE* pByte,
                        [in] LONG cb,
                        [in,out] LONG* pcbWritten);
    };
cpp_quote("#endif //_LPBYTEBUFFER_DEFINED")

cpp_quote("")
cpp_quote("//////////////////////////////////////////////////////////////////")
cpp_quote("//")
cpp_quote("// ISCardTypeConv Interface Definition")
cpp_quote("//")

cpp_quote("#ifndef _LPSCARDTYPECONV_DEFINED")
cpp_quote("#define _LPSCARDTYPECONV_DEFINED")
    [
        object,
        uuid(53B6AA63-3F56-11D0-916B-00AA00C18068),
        dual,
        helpstring("ISCardTypeConv Interface"),
        //hidden,
        //restricted,       // prevent macro programming?
        version(1.0),
        pointer_default(unique)
    ]
    interface ISCardTypeConv : IDispatch

⌨️ 快捷键说明

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