private static int SetSize(IntPtr @this, long libNewSize) { #if MAP_EX_TO_HR try { #endif GetObject(@this).managedInterface.SetSize(libNewSize); return S_OK; #if MAP_EX_TO_HR } catch (Exception e) { return GetHRForException(e); } #endif }