struct VS_VERSIONINFO {
WORD wLength;
WORD wValueLength;
WORD wType;
WCHAR szKey[1];
WORD Padding1[1];
VS_FIXEDFILEINFO Value;
WORD Padding2[1];
WORD Children[1];
};
按msdn上说
szKey
Contains the Unicode string "VS_VERSION_INFO".
Padding1
Contains as many zero words as necessary to align the Value member on a 32-bit boundary.
但是有一程序它这么定义的,使用的时候
VS_VERSIONINFO* pVS = (VS_VERSIONINFO*)pVer;
这个结构体里的数组能变长?
原始程序地址
http://www.codeproject.com/KB/DLL/showver.aspx
...全文
19810打赏收藏
结构体 VS_VERSIONINFO
struct VS_VERSIONINFO { WORD wLength; WORD wValueLength; WORD wType; WCHAR szKey[1]; WORD Padding1[1]; VS_FIXEDFILEINFO Value; WORD Padding2[1]; WORD Children[1]; }; 按msdn上说 szKey Contains the Unicode string "VS_VERSION_INFO". Padding1 Contains as m
[Quote=引用 9 楼 lhcwjy 的回复:]
struct VS_VERSIONINFO {
WORD wLength;
WORD wValueLength;
WORD wType;
WCHAR szKey[];
WORD Padding1[];
VS_FIXEDFILEINFO Value;
WORD Padding2[];
WORD Children[];
};
The VS_VERSIONINFO structure……
[/Quote]
嗯,最先给的结构就是iyige别人程序里的结构,非常像
struct VS_VERSIONINFO {
WORD wLength;
WORD wValueLength;
WORD wType;
WCHAR szKey[];
WORD Padding1[];
VS_FIXEDFILEINFO Value;
WORD Padding2[];
WORD Children[];
};
The VS_VERSIONINFO structure depicts the organization of data in a file-version resource. It is the root structure that contains all other file-version information structures.
This structure is not a true C-language structure because it contains variable-length members. This structure was created solely to depict the organization of data in a version resource and does not appear in any of the header files shipped with the Microsoft Windows Software Development Kit (SDK).
以上是从MSDN中摘出来的,按它的说法:VS_VERSIONINFO是一个用来“描述版“本信息的结构,它并不是一个实际的结构定义。当然,实际的结构会和它很像。