public IntPtr MarshalManagedToNative(object managedObj) { #if RECURSIVE_WRAPPING managedObj = NativeToManagedWrapper.GetInterface(ManagedToNativeWrapper.GetInterface((IStream)managedObj), true); #endif return(ManagedToNativeWrapper.GetInterface((IStream)managedObj)); }
public object MarshalNativeToManaged(IntPtr pNativeData) { #if RECURSIVE_WRAPPING pNativeData = ManagedToNativeWrapper.GetInterface(NativeToManagedWrapper.GetInterface(pNativeData, true)); #endif return(NativeToManagedWrapper.GetInterface(pNativeData, false)); }
private static int Clone(IntPtr @this, out IntPtr ppstm) { ppstm = IntPtr.Zero; #if MAP_EX_TO_HR try { #endif IStream newInterface; GetObject(@this).managedInterface.Clone(out newInterface); ppstm = ManagedToNativeWrapper.GetInterface(newInterface); return(S_OK); #if MAP_EX_TO_HR } catch (Exception e) { return(GetHRForException(e)); } #endif }