public void CreateInstance( [MarshalAs(UnmanagedType.Interface)] object pUnkOuter, ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out object ppvObject) { BasicClassFactory.ValidateInterfaceRequest(_classType, ref riid, pUnkOuter); ppvObject = Activator.CreateInstance(_classType); if (pUnkOuter != null) { ppvObject = BasicClassFactory.CreateAggregatedObject(pUnkOuter, ppvObject); } }
private void CreateInstanceInner( object pUnkOuter, ref Guid riid, string key, bool isDesignTime, out object ppvObject) { BasicClassFactory.ValidateInterfaceRequest(_classType, ref riid, pUnkOuter); ppvObject = _licenseProxy.AllocateAndValidateLicense(_classType, key, isDesignTime); if (pUnkOuter != null) { ppvObject = BasicClassFactory.CreateAggregatedObject(pUnkOuter, ppvObject); } }
public void CreateInstance( [MarshalAs(UnmanagedType.Interface)] object?pUnkOuter, ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out object?ppvObject) { Type interfaceType = BasicClassFactory.GetValidatedInterfaceType(_classType, ref riid, pUnkOuter); ppvObject = Activator.CreateInstance(_classType) !; if (pUnkOuter != null) { ppvObject = BasicClassFactory.CreateAggregatedObject(pUnkOuter, ppvObject); } BasicClassFactory.ValidateObjectIsMarshallableAsInterface(ppvObject, interfaceType); }
private void CreateInstanceInner( object?pUnkOuter, ref Guid riid, string?key, bool isDesignTime, out object ppvObject) { Type interfaceType = BasicClassFactory.GetValidatedInterfaceType(_classType, ref riid, pUnkOuter); ppvObject = _licenseProxy.AllocateAndValidateLicense(_classType, key, isDesignTime); if (pUnkOuter != null) { ppvObject = BasicClassFactory.CreateAggregatedObject(pUnkOuter, ppvObject); } BasicClassFactory.ValidateObjectIsMarshallableAsInterface(ppvObject, interfaceType); }