private void _CreateCtx(NativeActivationContext actctx) { m_hActCtx = NativeMethods.CreateActCtx(actctx); if ((IntPtr.Zero == m_hActCtx) || (INVALID_HANDLE_VALUE == m_hActCtx)) { throw new Win32Exception(); } } // end _CreateCtx()
} // end _CreateCtx() public ActivationContext(string source, int manifestResourceId) { var actctx = new NativeActivationContext(); actctx.Source = source; actctx.ResourceName = new IntPtr(manifestResourceId); actctx.Flags = ActivationContextFlags.RESOURCE_NAME_VALID; _CreateCtx(actctx); } // end constructor
public static extern IntPtr CreateActCtx(NativeActivationContext actCtx);