Dump a few more known variant types.
Don't call DateToTM() - it's going away soon.
This commit is contained in:
parent
998cdd650a
commit
bb61fe35a2
|
@ -810,6 +810,11 @@ static void dump_VarType(VARTYPE vt,char *szVarType) {
|
||||||
if (vt & VT_VECTOR)
|
if (vt & VT_VECTOR)
|
||||||
szVarType += strlen(strcpy(szVarType, "vector of "));
|
szVarType += strlen(strcpy(szVarType, "vector of "));
|
||||||
switch(vt & VT_TYPEMASK) {
|
switch(vt & VT_TYPEMASK) {
|
||||||
|
case VT_EMPTY: sprintf(szVarType, "VT_EMPTY"); break;
|
||||||
|
case VT_NULL: sprintf(szVarType, "VT_NULL"); break;
|
||||||
|
case VT_RECORD: sprintf(szVarType, "VT_RECORD"); break;
|
||||||
|
case VT_I8: sprintf(szVarType, "VT_I8"); break;
|
||||||
|
case VT_UI8: sprintf(szVarType, "VT_UI8"); break;
|
||||||
case VT_UI1: sprintf(szVarType, "VT_UI"); break;
|
case VT_UI1: sprintf(szVarType, "VT_UI"); break;
|
||||||
case VT_I2: sprintf(szVarType, "VT_I2"); break;
|
case VT_I2: sprintf(szVarType, "VT_I2"); break;
|
||||||
case VT_I4: sprintf(szVarType, "VT_I4"); break;
|
case VT_I4: sprintf(szVarType, "VT_I4"); break;
|
||||||
|
@ -1106,15 +1111,14 @@ void dump_Variant(VARIANT * pvar)
|
||||||
|
|
||||||
case VT_DATE:
|
case VT_DATE:
|
||||||
{
|
{
|
||||||
struct tm TM;
|
SYSTEMTIME st;
|
||||||
memset( &TM, 0, sizeof(TM) );
|
|
||||||
|
|
||||||
if( DateToTm( *(DATE*)ref, 0, &TM ) == FALSE ) {
|
if(!VariantTimeToSystemTime(*(DATE*)ref, &st)) {
|
||||||
TRACE("invalid date? (?)%ld %f\n", *(long*)ref, *(double *)ref);
|
TRACE("invalid date? (?)%ld %f\n", *(long*)ref, *(double *)ref);
|
||||||
} else {
|
} else {
|
||||||
TRACE("(yyyymmdd) %4.4d-%2.2d-%2.2d (time) %2.2d:%2.2d:%2.2d [%f]\n",
|
TRACE("(yyyymmdd) %4.4d-%2.2d-%2.2d (time) %2.2d:%2.2d:%2.2d [%f]\n",
|
||||||
TM.tm_year, TM.tm_mon+1, TM.tm_mday,
|
st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute,
|
||||||
TM.tm_hour, TM.tm_min, TM.tm_sec, *(double *)ref);
|
st.wSecond, *(double *)ref);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue