{
struct pidsiStruct {
char *name; long pidsi; } pidsiArr[] = {
{ "Title ", PIDSI_TITLE}, // VT_LPSTR { "Subject ", PIDSI_SUBJECT}, // ... { "Author ", PIDSI_AUTHOR},
{ "Keywords ", PIDSI_KEYWORDS},
{ "Comments ", PIDSI_COMMENTS}, {0, 0} };
int nPidsi = 0;
for(nPidsi=0; pidsiArr[nPidsi].name; nPidsi++);
PROPSPEC
*pPropSpec = new PROPSPEC [nPidsi];
PROPVARIANT
*pPropVar = new PROPVARIANT [nPidsi];
for(int i=0; i <nPidsi; i++) {
ZeroMemory(&pPropSpec, sizeof(PROPSPEC));
pPropSpec.ulKind =
PRSPEC_PROPID;
pPropSpec.propid = pidsiArr.pidsi;
}hr = pPropStg-> ReadMultiple(nPidsi,
pPropSpec, pPropVar); if (SUCCEEDED(hr)) {
for(int i=0; i <nPidsi; i++) {
_TCHAR sValue[1024] = {0};
std::string strTemp = pPropVar-> pszVal;
printf( "\\t%s\\n ",strTemp.c_str());
pPropVar++; } }
} pPropSetStg-> Release();
pPropStg-> Release(); pStorage-> Release(); printf(
"===================================================\\n ");
printf( "End Demo\\n "); return
0; }