Ejemplo n.º 1
0
        public ApplicationFixture()
        {
            MI_Instance    extendedError = null;
            MI_Application newApplication;
            MI_Result      res = MI_Application.Initialize(ApplicationName, out extendedError, out newApplication);

            MIAssert.Succeeded(res, "Expect basic application initialization to succeed");
            this.Application = newApplication;
        }
Ejemplo n.º 2
0
        static private MI_Application GetApplicationHandle()
        {
            MI_Application applicationHandle;
            MI_Instance    errorDetailsHandle;
            MI_Result      result = MI_Application.Initialize(ApplicationID,
                                                              out errorDetailsHandle,
                                                              out applicationHandle);

            CimException.ThrowIfMiResultFailure(result, errorDetailsHandle);

            return(applicationHandle);
        }
Ejemplo n.º 3
0
 public void IndirectApplicationTableAccessesThrowWhenNotInitialized()
 {
     Assert.Throws <InvalidOperationException>(() => MI_Application.NewIndirectPtr().Close());
 }