首页
社区
课程
招聘
请教,这几个C结构用MASM32结构怎么写?
发表于: 2006-3-7 13:33 4946

请教,这几个C结构用MASM32结构怎么写?

2006-3-7 13:33
4946
/*
** XLREF structure
**
** Describes a single rectangular reference
*/

typedef struct xlref
{
    WORD rwFirst;
    WORD rwLast;
    BYTE colFirst;
    BYTE colLast;
} XLREF, FAR *LPXLREF;

/*
** XLMREF structure
**
** Describes multiple rectangular references.
** This is a variable size structure, default
** size is 1 reference.
*/

typedef struct xlmref
{
    WORD count;
    XLREF reftbl[1];                        /* actually reftbl[count] */
} XLMREF, FAR *LPXLMREF;

/*
** XLOPER structure
**
** Excel's fundamental data type: can hold data
** of any type. Use "R" as the argument type in the
** REGISTER function.
**/

typedef struct xloper
{
    union
    {
        double num;                     /* xltypeNum */
        LPSTR str;                      /* xltypeStr */
        WORD bool;                      /* xltypeBool */
        WORD err;                       /* xltypeErr */
        short int w;                    /* xltypeInt */
        struct
        {
            WORD count;                 /* always = 1 */
            XLREF ref;
        } sref;                         /* xltypeSRef */
        struct
        {
            XLMREF far *lpmref;
            DWORD idSheet;
        } mref;                         /* xltypeRef */
        struct
        {
            struct xloper far *lparray;
            WORD rows;
            WORD columns;
        } array;                        /* xltypeMulti */
        struct
        {
            union
            {
                short int level;        /* xlflowRestart */
                short int tbctrl;       /* xlflowPause */
                DWORD idSheet;          /* xlflowGoto */
            } valflow;
            WORD rw;                    /* xlflowGoto */
            BYTE col;                   /* xlflowGoto */
            BYTE xlflow;
        } flow;                         /* xltypeFlow */
        struct
        {
            union
            {
                BYTE far *lpbData;      /* data passed to XL */
                HANDLE hdata;           /* data returned from XL */
            } h;
            long cbData;
        } bigdata;                      /* xltypeBigData */
    } val;
    WORD xltype;
} XLOPER, FAR *LPXLOPER;

谢谢!

[课程]Android-CTF解题方法汇总!

收藏
免费 0
支持
分享
最新回复 (3)
雪    币: 291
活跃值: (213)
能力值: ( LV12,RANK:210 )
在线值:
发帖
回帖
粉丝
2
xlref struct
        fwFirst        WORD        ?
        rwLast        WORD        ?
        colFirst  BYTE        ?
        colLast        BYTE        ?
xlref ends
XLREF typedef xlref
LPXLREF typedef far ptr xlref

依此类推
结构中的struct格式如下
struct 结构名

;结构 定义
ends
2006-3-7 22:43
0
雪    币: 207
活跃值: (40)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
最初由 thebutterfly 发布
xlref struct
fwFirst WORD ?
rwLast WORD ?
colFirst BYTE ?
colLast BYTE ?
........


谢谢!
请问C语言中结构成员如何对齐?
2006-3-8 08:38
0
雪    币: 291
活跃值: (213)
能力值: ( LV12,RANK:210 )
在线值:
发帖
回帖
粉丝
4
#pragma pack(对齐方式)
MASM中:
align 对齐方式
2006-3-9 12:38
0
游客
登录 | 注册 方可回帖
返回
//