Example #1
0
        // IWbemProviderInit

        int IWbemProviderInit.Initialize_(
            [In][MarshalAs(UnmanagedType.LPWStr)]  string wszUser,
            [In] Int32 lFlags,
            [In][MarshalAs(UnmanagedType.LPWStr)]  string wszNamespace,
            [In][MarshalAs(UnmanagedType.LPWStr)]  string wszLocale,
            [In][MarshalAs(UnmanagedType.Interface)]  IWbemServices pNamespace,
            [In][MarshalAs(UnmanagedType.Interface)]  IWbemContext pCtx,
            [In][MarshalAs(UnmanagedType.Interface)]  IWbemProviderInitSink pInitSink)
        {
            this.pNamespaceNA = pNamespace;
            RelocateNamespaceRCWToMTA();

            this.pSinkNA  = null;
            this.pSinkMTA = null;

            lock (mapQueryIdToQuery)
            {
                mapQueryIdToQuery.Clear();
            }

            pInitSink.SetStatus_((int)tag_WBEM_EXTRA_RETURN_CODES.WBEM_S_INITIALIZED, 0);
            Marshal.ReleaseComObject(pInitSink);

            return(0);
        }
Example #2
0
		int System.Management.IWbemProviderInit.Initialize_(string wszUser, int lFlags, string wszNamespace, string wszLocale, IWbemServices pNamespace, IWbemContext pCtx, IWbemProviderInitSink pInitSink)
		{
			this.pNamespaceNA = pNamespace;
			this.RelocateNamespaceRCWToMTA();
			this.pSinkNA = null;
			this.pSinkMTA = null;
			lock (this.mapQueryIdToQuery)
			{
				this.mapQueryIdToQuery.Clear();
			}
			pInitSink.SetStatus_(0, 0);
			Marshal.ReleaseComObject(pInitSink);
			return 0;
		}
Example #3
0
 int System.Management.IWbemProviderInit.Initialize_(string wszUser, int lFlags, string wszNamespace, string wszLocale, IWbemServices pNamespace, IWbemContext pCtx, IWbemProviderInitSink pInitSink)
 {
     this.pNamespaceNA = pNamespace;
     this.RelocateNamespaceRCWToMTA();
     this.pSinkNA  = null;
     this.pSinkMTA = null;
     lock (this.mapQueryIdToQuery)
     {
         this.mapQueryIdToQuery.Clear();
     }
     pInitSink.SetStatus_(0, 0);
     Marshal.ReleaseComObject(pInitSink);
     return(0);
 }
Example #4
0
 int IWbemProviderInit.Initialize_([In, MarshalAs(UnmanagedType.LPWStr)] string wszUser, [In] int lFlags, [In, MarshalAs(UnmanagedType.LPWStr)] string wszNamespace, [In, MarshalAs(UnmanagedType.LPWStr)] string wszLocale, [In, MarshalAs(UnmanagedType.Interface)] IWbemServices pNamespace, [In, MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In, MarshalAs(UnmanagedType.Interface)] IWbemProviderInitSink pInitSink)
 {
     this.pNamespaceNA = pNamespace;
     this.RelocateNamespaceRCWToMTA();
     this.pSinkNA  = null;
     this.pSinkMTA = null;
     lock (this.mapQueryIdToQuery)
     {
         this.mapQueryIdToQuery.Clear();
     }
     pInitSink.SetStatus_(0, 0);
     Marshal.ReleaseComObject(pInitSink);
     return(0);
 }