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

📄 bhtypes.h

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

        LPVOID                  lpVoidTable;                    // set of anything.
        LPBYTE                  lpByteTable;                    // set of bytes
        LPWORD                  lpWordTable;                    // set of words
        LPDWORD                 lpDwordTable;                   // set of dwords
        LPLARGEINT              lpLargeIntTable;                // set of LARGEINT structures
        LPSYSTEMTIME            lpSystemTimeTable;              // set of SYSTEMTIME structures

        //... set of labeled values

        LPLABELED_BYTE          lpLabeledByteTable;             // set of labeled_byte structs
        LPLABELED_WORD          lpLabeledWordTable;             // set of labeled_word structs
        LPLABELED_DWORD         lpLabeledDwordTable;            // set of labeled_dword structs
        LPLABELED_LARGEINT      lpLabeledLargeIntTable;         // set of Labeled_LARGEINT structs
        LPLABELED_SYSTEMTIME    lpLabeledSystemTimeTable;       // set of labeled_systemtime structs
        LPLABELED_BIT           lpLabeledBit;                   // set of labeled_bit structs.
    };
} SET;

typedef SET *LPSET;

//=============================================================================
//  String table.
//=============================================================================

typedef struct _STRINGTABLE
{
    DWORD           nStrings;               // number LPSTR in table
    LPSTR           String[0];
} STRINGTABLE;

typedef STRINGTABLE *LPSTRINGTABLE;

#define STRINGTABLE_SIZE    sizeof(STRINGTABLE)

//=============================================================================
//  RECOGNIZEDATA structure.
//
//  This structure to keep track of the start of each recognized protocol.
//=============================================================================

typedef struct _RECOGNIZEDATA
{
    WORD        ProtocolID;         //... Protocol which was recognized
    WORD        nProtocolOffset;    //... Offset from the start of the frame of the start of this protocol.
    LPVOID      InstData;           //... Opaque, for protocol only.
} RECOGNIZEDATA;

typedef RECOGNIZEDATA * LPRECOGNIZEDATA;

//=============================================================================
//  RECOGNIZEDATATABLE structure.
//
//  This structure to keep track of the start of each RECOGNIZEDATA structure
//=============================================================================

typedef struct _RECOGNIZEDATATABLE
{
    WORD            nRecognizeDatas;    //... number of RECOGNIZEDATA structures
    RECOGNIZEDATA   RecognizeData[0];   //... array of RECOGNIZEDATA structures follows
} RECOGNIZEDATATABLE;

typedef RECOGNIZEDATATABLE * LPRECOGNIZEDATATABLE;

//=============================================================================
//  Property information structure.
//=============================================================================

typedef struct _PROPERTYINFO
{
    HPROPERTY       hProperty;      //... Handle to the property.
    DWORD           Version;        //... Version of property.
    LPSTR           Label;          //... name of property
    LPSTR           Comment;        //... description of property
    BYTE            DataType;       //... data type of property
    BYTE            DataQualifier;  //... data qualifier of property

    union
    {
        LPVOID          lpExtendedInfo; //... generic pointer.
        LPRANGE         lpRange;        //... pointer to range
        LPSET           lpSet;          //... pointer to set
        DWORD           Bitmask;        //... bitmask to apply
        DWORD           Value;          //... constant value.
    };

    WORD            FormatStringSize;   //... max size to reserve for text description
    LPVOID          InstanceData;       //... property-specific instance data.
} PROPERTYINFO;

typedef PROPERTYINFO *LPPROPERTYINFO;

#define PROPERTYINFO_SIZE   sizeof(PROPERTYINFO)


//=============================================================================
//  Property instance Extended structure.
//=============================================================================

typedef struct _PROPERTYINSTEX
{
    WORD        Length;         //... length of raw data in frame
    WORD        LengthEx;       //... number of bytes following
    ULPVOID     lpData;         //... pointer to raw data in frame

    union
    {
        BYTE            Byte[];     //... table of bytes follows
        WORD            Word[];     //... table of words follows
        DWORD           Dword[];    //... table of Dwords follows
        LARGE_INTEGER   LargeInt[]; //... table of LARGEINT structures to follow
        SYSTEMTIME      SysTime[];  //... table of SYSTEMTIME structures follows
        TYPED_STRING    TypedString;//... a typed_string that may have extended data
    };
} PROPERTYINSTEX;

typedef PROPERTYINSTEX *LPPROPERTYINSTEX;

#define PROPERTYINSTEX_SIZE     sizeof(PROPERTYINSTEX)

typedef PROPERTYINSTEX UNALIGNED *ULPPROPERTYINSTEX;

//=============================================================================
//  Property instance structure.
//=============================================================================

typedef struct _PROPERTYINST
{
    LPPROPERTYINFO          lpPropertyInfo;     // pointer to property info
    LPSTR                   szPropertyText;     // pointer to string description

    union
    {
        LPVOID              lpData;             // pointer to data
        LPBYTE              lpByte;             // bytes
        ULPWORD             lpWord;             // words
        ULPDWORD            lpDword;            // dwords

        ULPLARGEINT         lpLargeInt;         // LargeInt
        ULPSYSTEMTIME       lpSysTime;          // pointer to SYSTEMTIME structures
        LPPROPERTYINSTEX    lpPropertyInstEx;   // pointer to propertyinstex (if DataLength = -1)
    };

    WORD                    DataLength;         // length of data, or flag for propertyinstex struct
    WORD                    Level   : 4  ;      // level information        ............1111
    WORD                    HelpID  : 12 ;      // context ID for helpfile  111111111111....
                     //    ---------------
                     // total of 16 bits == 1 WORD == DWORD ALIGNED structure
                            // Interpretation Flags:  Flags that define attach time information to the
                            // interpretation of the property.  For example, in RPC, the client can be
                            // Intel format and the server can be non-Intel format... thus the property
                            // database cannot describe the property at database creation time.
    DWORD                   IFlags;
} PROPERTYINST;

typedef PROPERTYINST *LPPROPERTYINST;

#define PROPERTYINST_SIZE   sizeof(PROPERTYINST)



// Flags passed at AttachPropertyInstance and AttachPropertyInstanceEx time in the IFlags field:
// flag for error condition ...............1
#define IFLAG_ERROR     0x00000001
// is the WORD or DWORD byte non-Intel format at attach time?
#define IFLAG_SWAPPED   0x00000002
// is the STRING UNICODE at attach time?
#define IFLAG_UNICODE   0x00000004


//=============================================================================
//  Property instance table structure.
//=============================================================================

typedef struct _PROPERTYINSTTABLE
{
    WORD                nPropertyInsts;     //... number of items
    WORD                nPropertyInstIndex; //... index to first item
} PROPERTYINSTTABLE;

typedef PROPERTYINSTTABLE *LPPROPERTYINSTTABLE;

#define PROPERTYINSTTABLE_SIZE  sizeof(PROPERTYINSTTABLE)

//=============================================================================
//  Property table structure.
//=============================================================================

typedef struct _PROPERTYTABLE
{
    LPVOID                  lpFormatBuffer;             //... Opaque.                       (PRIVATE)
    DWORD                   FormatBufferLength;         //... Opaque.                       (PRIVATE)
    DWORD                   nTotalPropertyInsts;        //... total number of propertyinstances in array
    LPPROPERTYINST          lpFirstPropertyInst;        //... array of property instances
    BYTE                    nPropertyInstTables;        //... total PropertyIndexTables following
    PROPERTYINSTTABLE       PropertyInstTable[0];       //... array of propertyinstance index table structures
} PROPERTYTABLE;

typedef PROPERTYTABLE *LPPROPERTYTABLE;

#define PROPERTYTABLE_SIZE  sizeof(PROPERTYTABLE)

//=============================================================================
//  Protocol entry points.
//=============================================================================

typedef VOID    (WINAPI *REGISTER)(HPROTOCOL);

typedef VOID    (WINAPI *DEREGISTER)(HPROTOCOL);

typedef LPBYTE  (WINAPI *RECOGNIZEFRAME)(HFRAME, LPBYTE, LPBYTE, DWORD, DWORD, HPROTOCOL, DWORD, LPDWORD, LPHPROTOCOL, LPDWORD);

typedef LPBYTE  (WINAPI *ATTACHPROPERTIES)(HFRAME, LPBYTE, LPBYTE, DWORD, DWORD, HPROTOCOL, DWORD, DWORD);

typedef DWORD   (WINAPI *FORMATPROPERTIES)(HFRAME, LPBYTE, LPBYTE, DWORD, LPPROPERTYINST);

//=============================================================================
//  Protocol entry point structure.
//=============================================================================

typedef struct _ENTRYPOINTS
{
    REGISTER            Register;               //... Protocol Register() entry point.
    DEREGISTER          Deregister;             //... Protocol Deregister() entry point.
    RECOGNIZEFRAME      RecognizeFrame;         //... Protocol RecognizeFrame() entry point.
    ATTACHPROPERTIES    AttachProperties;       //... Protocol AttachProperties() entry point.
    FORMATPROPERTIES    FormatProperties;       //... Protocol FormatProperties() entry point.
} ENTRYPOINTS;

typedef ENTRYPOINTS *LPENTRYPOINTS;

#define ENTRYPOINTS_SIZE    sizeof(ENTRYPOINTS)

//=============================================================================
//  Property database structure.
//=============================================================================

typedef struct _PROPERTYDATABASE
{
    DWORD           nProperties;                 //... Number of properties in database.
    LPPROPERTYINFO  PropertyInfo[0];             //... Array of property info pointers.
} PROPERTYDATABASE;


#define PROPERTYDATABASE_SIZE   sizeof(PROPERTYDATABASE)

typedef PROPERTYDATABASE *LPPROPERTYDATABASE;

//=============================================================================
//  Protocol info structure (PUBLIC portion of HPROTOCOL).
//=============================================================================

typedef struct _PROTOCOLINFO
{
    DWORD               ProtocolID;             //... Prootocol ID of owning protocol.
    LPPROPERTYDATABASE  PropertyDatabase;       //... Property database.
    BYTE                ProtocolName[16];       //... Protocol name.
    BYTE                HelpFile[16];           //... Optional helpfile name.
    BYTE                Comment[128];           //... Comment describing protocol.
} PROTOCOLINFO;

typedef PROTOCOLINFO *LPPROTOCOLINFO;

#define PROTOCOLINFO_SIZE   sizeof(PROTOCOLINFO)

//=============================================================================
//  Protocol Table.
//=============================================================================

typedef struct _PROTOCOLTABLE
{
    DWORD       nProtocols;
    HPROTOCOL   hProtocol[1];                       //... This must be the last member.
} PROTOCOLTABLE;

typedef PROTOCOLTABLE *LPPROTOCOLTABLE;

#define PROTOCOLTABLE_SIZE  (sizeof(PROTOCOLTABLE) - sizeof(HPROTOCOL))

#define PROTOCOLTABLE_ACTUAL_SIZE(p) GetTableSize(PROTOCOLTABLE_SIZE, (p)->nProtocols, sizeof(HPROTOCOL))

//=============================================================================
//  AddressInfo structure
//=============================================================================
#define SORT_BYADDRESS  0
#define SORT_BYNAME     1

#define PERMANENT_NAME  0x00000100

typedef struct _ADDRESSINFO *LPADDRESSINFO;
typedef struct _ADDRESSINFO
{
    ADDRESS        Address;
    BYTE           Name[MAX_NAME_SIZE];
	DWORD          Flags;
    LPVOID         lpAddressInstData;
} ADDRESSINFO;

#define ADDRESSINFO_SIZE    sizeof(ADDRESSINFO)

//=============================================================================
//  AddressInfoTable
//=============================================================================

typedef struct _ADDRESSINFOTABLE
{
    DWORD         nAddressInfos;
    LPADDRESSINFO lpAddressInfo[0];
} ADDRESSINFOTABLE;

typedef ADDRESSINFOTABLE *LPADDRESSINFOTABLE;

#define ADDRESSINFOTABLE_SIZE   sizeof(ADDRESSINFOTABLE)

//=============================================================================
//  callback procedures.
//=============================================================================

typedef DWORD (WINAPI *FILTERPROC)(HCAPTURE, HFRAME, LPVOID);

#pragma pack()
#endif

⌨️ 快捷键说明

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