private Boolean EnablePlugin([MarshalAs(UnmanagedType.Struct)] ref TExportedFunctions ExportedFunctions, UInt32 pluginid) { this.pluginid = pluginid; pluginexports = ExportedFunctions; //setup the delegates currentPlugin.sdk = this; return(currentPlugin.EnablePlugin()); }
private Boolean EnablePlugin([MarshalAs(UnmanagedType.Struct)] ref TExportedFunctions ExportedFunctions, UInt32 pluginid) { this.pluginid = pluginid; pluginexports = ExportedFunctions; //setup the delegates if (delProcessMessages == null) { delProcessMessages = Marshal.GetDelegateForFunctionPointer <delegateProcessMessages>(pluginexports.ProcessMessages); } if (delCheckSynchronize == null) { delCheckSynchronize = Marshal.GetDelegateForFunctionPointer <delegateCheckSynchronize>(pluginexports.CheckSynchronize); } if (lua == null) { lua = new CESDKLua(this); } currentPlugin.sdk = this; return(currentPlugin.EnablePlugin()); }