Esempio n. 1
0
        public static AccountsSettingsPane GetForWindow(IntPtr hWnd)
        {
            IAccountsSettingsPaneInterop accountsSettingsPaneInterop = (IAccountsSettingsPaneInterop)WindowsRuntimeMarshal.GetActivationFactory(typeof(AccountsSettingsPane));
            Guid guid = typeof(AccountsSettingsPane).GUID;

            return(accountsSettingsPaneInterop.GetForWindow(hWnd, ref guid));
        }
        public static AccountsSettingsPane GetForWindow(IntPtr hWnd)
        {
            Guid iid = InteropHelper.GetIID <AccountsSettingsPane>();
            IAccountsSettingsPaneInterop factory = InteropHelper.GetActivationFactory <IAccountsSettingsPaneInterop>(typeof(AccountsSettingsPane));

            return(factory.GetForWindow(hWnd, ref iid));
        }
Esempio n. 3
0
        public static AccountsSettingsPane GetForWindow(IntPtr hWnd)
        {
            IAccountsSettingsPaneInterop accountsSettingsPaneInterop =
                AccountsSettingsPane.As <IAccountsSettingsPaneInterop>();
            //Guid guid = typeof(AccountsSettingsPane).GUID;
            Guid guid = //WinRT.GuidGenerator.CreateIID(typeof(IAccountsSettingPane));
                        Guid.Parse("81EA942C-4F09-4406-A538-838D9B14B7E6");

            //IAccountsSettingsPaneInterop accountsSettingsPaneInterop =
            //    (IAccountsSettingsPaneInterop)WindowsRuntimeMarshal.GetActivationFactory(typeof(AccountsSettingsPane));
            //Guid guid = typeof(AccountsSettingsPane).GetInterface("IAccountsSettingsPane").GUID;

            accountsSettingsPaneInterop.GetForWindow(hWnd, ref guid, out IntPtr result);
            return(MarshalInterface <AccountsSettingsPane> .FromAbi(result));
        }
Esempio n. 4
0
        public static AccountsSettingsPane GetForWindow(IntPtr appWindow)
        {
            Guid iid = GuidGenerator.CreateIID(typeof(IAccountsSettingsPane));

            return((AccountsSettingsPane)accountsSettingsPaneInterop.GetForWindow(appWindow, iid));
        }