ImagePropertyDescriptionArray FileFormatInstance::Properties() { ImagePropertyDescriptionArray properties; IsoString id; size_type len = 0; (*API->FileFormat->EnumerateImageProperties)( handle, 0, 0, &len, 0 ); // 1st call to get max identifier length if ( len > 0 ) { id.Reserve( len ); if ( (*API->FileFormat->EnumerateImageProperties)( handle, APIPropertyEnumerationCallback, id.Begin(), &len, &properties ) == api_false ) throw APIFunctionError( "EnumerateImageProperties" ); } return properties; }
IsoStringList ProcessInstance::IconsByProcessId( const IsoString& processId ) { size_type len = 0; (*API->Process->EnumerateProcessIcons)( 0, 0, &len, 0 ); ProcessIconsByProcessIdEnumerationData data( processId ); if ( len != 0 ) { IsoString iconId; iconId.Reserve( len ); if ( (*API->Process->EnumerateProcessIcons)( InternalIconEnumerator::ProcessCallback, iconId.c_str(), &len, &data ) == api_false ) throw APIFunctionError( "EnumerateProcessIcons" ); } return data.icons; }
IsoStringList ProcessInstance::Icons() { size_type len = 0; (*API->Process->EnumerateProcessIcons)( 0, 0, &len, 0 ); IsoStringList icons; if ( len != 0 ) { IsoString iconId; iconId.Reserve( len ); if ( (*API->Process->EnumerateProcessIcons)( InternalIconEnumerator::IconCallback, iconId.c_str(), &len, &icons ) == api_false ) throw APIFunctionError( "EnumerateProcessIcons" ); } return icons; }