本文整理汇总了C++中CMyComPtr::GetArcPropInfo2方法的典型用法代码示例。如果您正苦于以下问题:C++ CMyComPtr::GetArcPropInfo2方法的具体用法?C++ CMyComPtr::GetArcPropInfo2怎么用?C++ CMyComPtr::GetArcPropInfo2使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMyComPtr
的用法示例。
在下文中一共展示了CMyComPtr::GetArcPropInfo2方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Properties
//.........这里部分代码省略.........
message += L"\n";
*/
{
NCOM::CPropVariant prop;
if (_folder->GetFolderProperty(kpidPath, &prop) == S_OK)
{
AddPropertyString(kpidName, L"Path", prop, message);
}
}
CMyComPtr<IFolderProperties> folderProperties;
_folder.QueryInterface(IID_IFolderProperties, &folderProperties);
if (folderProperties)
{
UInt32 numProps;
if (folderProperties->GetNumberOfFolderProperties(&numProps) == S_OK)
{
for (UInt32 i = 0; i < numProps; i++)
{
CMyComBSTR name;
PROPID propID;
VARTYPE vt;
if (folderProperties->GetFolderPropertyInfo(i, &name, &propID, &vt) != S_OK)
continue;
NCOM::CPropVariant prop;
if (_folder->GetFolderProperty(propID, &prop) != S_OK)
continue;
AddPropertyString(propID, name, prop, message);
}
}
}
CMyComPtr<IGetFolderArcProps> getFolderArcProps;
_folder.QueryInterface(IID_IGetFolderArcProps, &getFolderArcProps);
if (getFolderArcProps)
{
CMyComPtr<IFolderArcProps> getProps;
getFolderArcProps->GetFolderArcProps(&getProps);
if (getProps)
{
UInt32 numLevels;
if (getProps->GetArcNumLevels(&numLevels) != S_OK)
numLevels = 0;
for (UInt32 level2 = 0; level2 < numLevels; level2++)
{
{
UInt32 level = numLevels - 1 - level2;
UInt32 numProps;
if (getProps->GetArcNumProps(level, &numProps) == S_OK)
{
message += kSeparator;
for (Int32 i = -3; i < (Int32)numProps; i++)
{
CMyComBSTR name;
PROPID propID;
VARTYPE vt;
switch (i)
{
case -3: propID = kpidPath; break;
case -2: propID = kpidType; break;
case -1: propID = kpidError; break;
default:
if (getProps->GetArcPropInfo(level, i, &name, &propID, &vt) != S_OK)
continue;
}
NCOM::CPropVariant prop;
if (getProps->GetArcProp(level, propID, &prop) != S_OK)
continue;
AddPropertyString(propID, name, prop, message);
}
}
}
if (level2 != numLevels - 1)
{
UInt32 level = numLevels - 1 - level2;
UInt32 numProps;
if (getProps->GetArcNumProps2(level, &numProps) == S_OK)
{
message += kSeparatorSmall;
for (Int32 i = 0; i < (Int32)numProps; i++)
{
CMyComBSTR name;
PROPID propID;
VARTYPE vt;
if (getProps->GetArcPropInfo2(level, i, &name, &propID, &vt) != S_OK)
continue;
NCOM::CPropVariant prop;
if (getProps->GetArcProp2(level, propID, &prop) != S_OK)
continue;
AddPropertyString(propID, name, prop, message);
}
}
}
}
}
}
::MessageBoxW(*(this), message, LangString(IDS_PROPERTIES, 0x03020900), MB_OK);
}
}
示例2: GetOpenPluginInfo
//.........这里部分代码省略.........
for (UInt32 level2 = 0; level2 < numLevels; level2++)
{
{
UInt32 level = numLevels - 1 - level2;
UInt32 numProps;
if (getProps->GetArcNumProps(level, &numProps) == S_OK)
{
InsertSeparator(m_InfoLines, numItems);
for (Int32 i = -3; i < (Int32)numProps && numItems < kNumInfoLinesMax; i++)
{
CMyComBSTR name;
PROPID propID;
VARTYPE vt;
switch (i)
{
case -3: propID = kpidPath; break;
case -2: propID = kpidType; break;
case -1: propID = kpidError; break;
default:
if (getProps->GetArcPropInfo(level, i, &name, &propID, &vt) != S_OK)
continue;
}
NCOM::CPropVariant prop;
if (getProps->GetArcProp(level, propID, &prop) != S_OK)
continue;
AddPropertyString(m_InfoLines, numItems, propID, name, prop);
}
}
}
if (level2 != numLevels - 1)
{
UInt32 level = numLevels - 1 - level2;
UInt32 numProps;
if (getProps->GetArcNumProps2(level, &numProps) == S_OK)
{
InsertSeparator(m_InfoLines, numItems);
for (Int32 i = 0; i < (Int32)numProps && numItems < kNumInfoLinesMax; i++)
{
CMyComBSTR name;
PROPID propID;
VARTYPE vt;
if (getProps->GetArcPropInfo2(level, i, &name, &propID, &vt) != S_OK)
continue;
NCOM::CPropVariant prop;
if (getProps->GetArcProp2(level, propID, &prop) != S_OK)
continue;
AddPropertyString(m_InfoLines, numItems, propID, name, prop);
}
}
}
}
}
}
}
//m_InfoLines[1].Separator = 0;
info->InfoLines = m_InfoLines;
info->InfoLinesNumber = numItems;
info->DescrFiles = NULL;
info->DescrFilesNumber = 0;
PanelModeColumnTypes.Empty();
PanelModeColumnWidths.Empty();
/*
AddColumn(kpidName);
AddColumn(kpidSize);
AddColumn(kpidPackedSize);
AddColumn(kpidMTime);
AddColumn(kpidCTime);
AddColumn(kpidATime);
AddColumn(kpidAttrib);
PanelMode.ColumnTypes = (char *)(const char *)PanelModeColumnTypes;
PanelMode.ColumnWidths = (char *)(const char *)PanelModeColumnWidths;
PanelMode.ColumnTitles = NULL;
PanelMode.FullScreen = TRUE;
PanelMode.DetailedStatus = FALSE;
PanelMode.AlignExtensions = FALSE;
PanelMode.CaseConversion = FALSE;
PanelMode.StatusColumnTypes = "N";
PanelMode.StatusColumnWidths = "0";
PanelMode.Reserved[0] = 0;
PanelMode.Reserved[1] = 0;
info->PanelModesArray = &PanelMode;
info->PanelModesNumber = 1;
*/
info->PanelModesArray = NULL;
info->PanelModesNumber = 0;
info->StartPanelMode = 0;
info->StartSortMode = 0;
info->KeyBar = NULL;
info->ShortcutData = NULL;
}