public virtual int get_CfgType(ref Guid iidCfg, out IntPtr ppCfg)
{
// Delegate to the flavored configuration (to enable a flavor to take control)
// Since we can be asked for Configuration we don't support, avoid throwing and return the HRESULT directly
//int hr = flavoredCfg.get_CfgType(ref iidCfg, out ppCfg);
//return hr;
int result = this.flavoredCfg.get_CfgType(ref iidCfg, out ppCfg);
if (ppCfg != IntPtr.Zero)
{
return result;
}
IntPtr intPtr = IntPtr.Zero;
int result2;
try
{
intPtr = Marshal.GetIUnknownForObject(this);
result2 = Marshal.QueryInterface(intPtr, ref iidCfg, out ppCfg);
}
finally
{
if (intPtr != IntPtr.Zero)
{
Marshal.Release(intPtr);
}
}
return result2;
}