System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr C# (CSharp) Method

GetRuntimeInterfaceAsIntPtr() public static method

public static GetRuntimeInterfaceAsIntPtr ( System.Guid clsid, System.Guid riid ) : IntPtr
clsid System.Guid
riid System.Guid
return System.IntPtr
        public static System.IntPtr GetRuntimeInterfaceAsIntPtr(Guid clsid, Guid riid)
        {
            throw new PlatformNotSupportedException();
        }
        public static object GetRuntimeInterfaceAsObject(Guid clsid, Guid riid)

Usage Example

コード例 #1
0
        public static void RuntimeEnvironmentNegTest()
        {
            Type     clsType = typeof(RuntimeEnvironmentTest);
            Assembly assem   = clsType.Assembly;

            Assert.True(!RuntimeEnvironment.FromGlobalAccessCache(assem));

            Assert.Throws <PlatformNotSupportedException>(() => RuntimeEnvironment.SystemConfigurationFile);

            Guid guid;

            Assert.Throws <PlatformNotSupportedException>(() => RuntimeEnvironment.GetRuntimeInterfaceAsObject(guid, guid));
            Assert.Throws <PlatformNotSupportedException>(() => RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(guid, guid));
        }
All Usage Examples Of System.Runtime.InteropServices.RuntimeEnvironment::GetRuntimeInterfaceAsIntPtr