Ejemplo n.º 1
0
		internal static MiResult GetElementAt_GetFlags(ClassHandle handle, int index, out MiFlags flags)
		{
			/*
			_MI_Result _MIResult;
			uint num = 0;
			DangerousHandleAccessor dangerousHandleAccessor = null;
			DangerousHandleAccessor dangerousHandleAccessor = new DangerousHandleAccessor(handle);
			try
			{
				dangerousHandleAccessor = dangerousHandleAccessor;
				_MIResult = (_MI_Result)<Module>.?A0x37ea71e9.MI_Class_GetElementAt((void*)dangerousHandleAccessor.DangerousGetHandle(), index, (long)0, (long)0, (long)0, (_MI_Type*)((long)0), (long)0, (long)0, ref num);
				if (_MIResult == 0)
				{
					flags = (MiFlags)num;
				}
			}
			dangerousHandleAccessor.Dispose();
			return (MiResult)_MIResult;
			*/
			flags = MiFlags.CLASS;
			return MiResult.OK;
		}
Ejemplo n.º 2
0
		internal static unsafe MiResult GetMethodParameterGetQualifierElementAt_GetFlags(ClassHandle handle, int methodIndex, int parameterName, int index, out MiFlags flags)
		{
			/*
			_MI_Result _MIResult;
			uint num = 0;
			_MI_Value _MIValue;
			_MI_QualifierSet _MIQualifierSet;
			_MI_Type _MIType = 0;
			UInt16* uInt16Pointer = null;
			_MI_ParameterSet _MIParameterSet;
			UInt16* uInt16Pointer1 = null;
			DangerousHandleAccessor dangerousHandleAccessor = null;
			DangerousHandleAccessor dangerousHandleAccessor = new DangerousHandleAccessor(handle);
			try
			{
				dangerousHandleAccessor = dangerousHandleAccessor;
				_MIResult = (_MI_Result)<Module>.?A0x37ea71e9.MI_Class_GetMethodAt((void*)dangerousHandleAccessor.DangerousGetHandle(), methodIndex, ref uInt16Pointer1, (long)0, ref _MIParameterSet);
				if (_MIResult == 0)
				{
					_MIResult = (_MI_Result)<Module>.?A0x37ea71e9.MI_ParameterSet_GetParameterAt(ref _MIParameterSet, parameterName, ref uInt16Pointer, (_MI_Type*)(&_MIType), (long)0, ref _MIQualifierSet);
					if (_MIResult == 0)
					{
						_MIResult = (_MI_Result)<Module>.?A0x37ea71e9.MI_QualifierSet_GetQualifierAt(ref _MIQualifierSet, index, ref (UInt16*)((long)0), (_MI_Type*)(&_MIType), ref num, ref _MIValue);
						if (_MIResult == 0)
						{
							flags = (MiFlags)num;
						}
					}
				}
			}
			dangerousHandleAccessor.Dispose();
			return (MiResult)_MIResult;
			*/
			flags = MiFlags.ANY;
			return MiResult.OK;
		}
Ejemplo n.º 3
0
		internal static unsafe MiResult GetPropertyQualifierElementAt_GetFlags(ClassHandle handle, int index, string propertyName, out MiFlags flags)
		{
			/*
			_MI_Result _MIResult;
			uint num = 0;
			_MI_Value _MIValue;
			_MI_Type _MIType = 0;
			_MI_QualifierSet _MIQualifierSet;
			DangerousHandleAccessor dangerousHandleAccessor = null;
			DangerousHandleAccessor dangerousHandleAccessor = new DangerousHandleAccessor(handle);
			try
			{
				dangerousHandleAccessor = dangerousHandleAccessor;
				_MI_Class* _MIClassPointer = (_MI_Class*)((void*)dangerousHandleAccessor.DangerousGetHandle());
				IntPtr hGlobalUni = Marshal.StringToHGlobalUni(propertyName);
				IntPtr intPtr = hGlobalUni;
				_MIResult = 0;
				try
				{
					_MIResult = (_MI_Result)<Module>.?A0x37ea71e9.MI_Class_GetElement(_MIClassPointer, (void*)hGlobalUni, (long)0, (long)0, (_MI_Type*)((long)0), (long)0, ref _MIQualifierSet, (long)0, (long)0);
				}
				finally
				{
					if (intPtr != IntPtr.Zero)
					{
						Marshal.FreeHGlobal(intPtr);
					}
				}
				if (_MIResult == 0)
				{
					_MIResult = (_MI_Result)<Module>.?A0x37ea71e9.MI_QualifierSet_GetQualifierAt(ref _MIQualifierSet, index, ref (UInt16*)((long)0), (_MI_Type*)(&_MIType), ref num, ref _MIValue);
					if (_MIResult == 0)
					{
						flags = (MiFlags)num;
					}
				}
			}
			dangerousHandleAccessor.Dispose();
			return (MiResult)_MIResult;
			*/
			flags = MiFlags.ANY;
			return MiResult.OK;
		}
Ejemplo n.º 4
0
		internal static unsafe MiResult GetQualifierElementAt_GetFlags(ClassHandle handle, int index, out MiFlags flags)
		{
			/*
			_MI_Result _MIResult;
			uint num = 0;
			_MI_Value _MIValue;
			_MI_Type _MIType = 0;
			_MI_QualifierSet _MIQualifierSet;
			DangerousHandleAccessor dangerousHandleAccessor = null;
			DangerousHandleAccessor dangerousHandleAccessor = new DangerousHandleAccessor(handle);
			try
			{
				dangerousHandleAccessor = dangerousHandleAccessor;
				_MIResult = (_MI_Result)<Module>.?A0x37ea71e9.MI_Class_GetClassQualifierSet((void*)dangerousHandleAccessor.DangerousGetHandle(), ref _MIQualifierSet);
				if (_MIResult == 0)
				{
					_MIResult = (_MI_Result)<Module>.?A0x37ea71e9.MI_QualifierSet_GetQualifierAt(ref _MIQualifierSet, index, ref (UInt16*)((long)0), (_MI_Type*)(&_MIType), ref num, ref _MIValue);
					if (_MIResult == 0)
					{
						flags = (MiFlags)num;
					}
				}
			}
			dangerousHandleAccessor.Dispose();
			return (MiResult)_MIResult;
			*/
			flags = MiFlags.NULLFLAG;
			return MiResult.OK;
		}
Ejemplo n.º 5
0
 public static MiResult GetElementAt_GetFlags(InstanceHandle handle, int _index, out MiFlags miFlag)
 {
     miFlag = MiFlags.PROPERTY;
     return(MiResult.OK);
 }
Ejemplo n.º 6
0
        public static MiResult AddElement(InstanceHandle handle, string name, object obj, object par, MiFlags miFlags)
        {
            NativeCimInstance   instance   = CimNativeApi.MarshalledObject.FromPointer <NativeCimInstance>(handle.DangerousGetHandle());
            NativeCimProperties properties = NativeCimPropertiesHelper.Deserialize(instance.Properties);

            CimType type = CimConverter.GetCimType(obj.GetType());

            properties.Add(new NativeCimProperty {
                Name = name, Type = type, Origin = "client", IsArray = false, IsLocal = false, Value = obj
            });
            instance.Properties = NativeCimPropertiesHelper.Serialize(properties);
            handle.DangerousSetHandle((IntPtr)CimNativeApi.MarshalledObject.Create <NativeCimInstance>(instance));
            return(MiResult.OK);
        }
Ejemplo n.º 7
0
 public static CimFlags ToCimFlags(this MiFlags miFlags)
 {
     return((CimFlags)((ulong)miFlags));
 }
Ejemplo n.º 8
0
		public static MiResult GetElementAt_GetFlags (InstanceHandle handle, int _index, out MiFlags miFlag)
		{
			miFlag = MiFlags.PROPERTY;
			return MiResult.OK;
		}
Ejemplo n.º 9
0
		public static MiResult AddElement (InstanceHandle handle, string name, object obj, object par, MiFlags miFlags)
		{
			NativeCimInstance instance = CimNativeApi.MarshalledObject.FromPointer<NativeCimInstance>(handle.DangerousGetHandle ());
			NativeCimProperties properties = NativeCimPropertiesHelper.Deserialize (instance.Properties);

			CimType type = CimConverter.GetCimType (obj.GetType ());
			properties.Add (new NativeCimProperty { Name = name, Type = type, Origin = "client", IsArray = false, IsLocal = false, Value = obj });
			instance.Properties = NativeCimPropertiesHelper.Serialize (properties);
			handle.DangerousSetHandle ((IntPtr)CimNativeApi.MarshalledObject.Create<NativeCimInstance>(instance));
			return MiResult.OK;
		}