[ComImport, SuppressUnmanagedCodeSecurity, Guid("486F726E-4D43-49B9-8A0C-C22A2B0524E8"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IModuleConfig : IPersistStream { new void GetClassID([Out] out Guid pClassID); [PreserveSig] int SetValue([In, MarshalAs(UnmanagedType.LPStruct)] Guid pParamID, [In]ref Object pValue); [PreserveSig] int GetValue([In, MarshalAs(UnmanagedType.LPStruct)] Guid pParamID, ref Object pValue); [PreserveSig] int GetParamConfig([In, MarshalAs(UnmanagedType.LPStruct)] Guid pParamID, out IParamConfig pValue); [PreserveSig] [return: MarshalAs(UnmanagedType.U1)] bool IsSupported([In, MarshalAs(UnmanagedType.LPStruct)] Guid pParamID); [PreserveSig] int SetDefState(); [PreserveSig] int EnumParamsint(ref long pNumParams, ref Guid pParamIDs); [PreserveSig] int CommitChanges([Out] out Object pReason); [PreserveSig] int DeclineChanges(); [PreserveSig] void SaveToRegistry( [In] Int32 hKeyRoot, [In, MarshalAs(UnmanagedType.BStr)] String pszKeyName, [In, MarshalAs(UnmanagedType.Bool)] bool bPreferReadable); [PreserveSig] void LoadFromRegistry( [In] Int32 hKeyRoot, [In, MarshalAs(UnmanagedType.BStr)] String pszKeyName, [In, MarshalAs(UnmanagedType.Bool)] bool bPreferReadable); [PreserveSig] int RegisterForNotifies([In, MarshalAs(UnmanagedType.Interface)] ref IModuleConfig pModuleCallback); [PreserveSig] int UnregisterFromNotifies([In, MarshalAs(UnmanagedType.Interface)] ref IModuleConfig pModuleCallback); } When calling the ComitChanges method I'm getting AcessViolation exception. object obj2 = new object(); hr = pNetworkSourceModuleConfig.CommitChanges(out obj2);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)