主题:[讨论]今天看到一行新代码,不知道什么意思,请帮一下忙
zhoujun
[专家分:0] 发布于 2008-07-25 19:47:00
请问以下代码是什么意思啊,从没见过
VARIANT m_bitdata;
m_bitdata.vt=VT_ARRAY|VT_UI1;
回复列表 (共2个回复)
沙发
orilab [专家分:70] 发布于 2008-07-26 00:59:00
这个是WINCE之类的系统的一个结构体类型..想知道更多的话,去查MSDN,有详细的说明.
struct tagVARIANT
{
union
{
struct __tagVARIANT
{
VARTYPE vt;
WORD wReserved1;
WORD wReserved2;
WORD wReserved3;
union
{
LONG lVal;
BYTE bVal;
SHORT iVal;
FLOAT fltVal;
DOUBLE dblVal;
VARIANT_BOOL boolVal;
_VARIANT_BOOL bool;
SCODE scode;
CY cyVal;
DATE date;
BSTR bstrVal;
IUnknown __RPC_FAR *punkVal;
IDispatch __RPC_FAR *pdispVal;
SAFEARRAY __RPC_FAR *parray;
BYTE __RPC_FAR *pbVal;
SHORT __RPC_FAR *piVal;
LONG __RPC_FAR *plVal;
FLOAT __RPC_FAR *pfltVal;
DOUBLE __RPC_FAR *pdblVal;
VARIANT_BOOL __RPC_FAR *pboolVal;
_VARIANT_BOOL __RPC_FAR *pbool;
SCODE __RPC_FAR *pscode;
CY __RPC_FAR *pcyVal;
DATE __RPC_FAR *pdate;
BSTR __RPC_FAR *pbstrVal;
IUnknown __RPC_FAR *__RPC_FAR *ppunkVal;
IDispatch __RPC_FAR *__RPC_FAR *ppdispVal;
SAFEARRAY __RPC_FAR *__RPC_FAR *pparray;
VARIANT __RPC_FAR *pvarVal;
PVOID byref;
CHAR cVal;
USHORT uiVal;
ULONG ulVal;
INT intVal;
UINT uintVal;
DECIMAL __RPC_FAR *pdecVal;
CHAR __RPC_FAR *pcVal;
USHORT __RPC_FAR *puiVal;
ULONG __RPC_FAR *pulVal;
INT __RPC_FAR *pintVal;
UINT __RPC_FAR *puintVal;
struct __tagBRECORD
{
PVOID pvRecord;
IRecordInfo __RPC_FAR *pRecInfo;
} __VARIANT_NAME_4;
} __VARIANT_NAME_3;
} __VARIANT_NAME_2;
DECIMAL decVal;
} __VARIANT_NAME_1;
};
typedef /* [wire_marshal] */ struct tagVARIANT VARIANT;
typedef VARIANT __RPC_FAR *LPVARIANT;
typedef VARIANT VARIANTARG;
typedef VARIANT __RPC_FAR *LPVARIANTARG;
Members
vt
Contains the type code for the variant, which governs how the variant is interpreted. For more information, see Remarks.
VT_ARRAY | <anything> An array of data type <anything> was passed. VT_EMPTY and VT_NULL are invalid types to combine with VT_ARRAY. The pointer in pbyrefVal points to an array descriptor, which describes the dimensions, size, and in-memory location of the array.
VT_UI1 An unsigned 1-byte character is stored in bVal.
板凳
zhoujun [专家分:0] 发布于 2008-07-26 14:45:00
好的,我去详细的看一下
我来回复