Example #1
0
        public void TestLoadLibrary()
        {
            if (IntPtr.Size != 4)
            {
                return;
            }

            Assert.IsTrue(WindowsAppExpander.LoadLibrary(app, TargetPath.PathExpandNative));
            WindowsAppExpander.LoadAssemblyFromFile(app, typeof(ExpandMethods).Assembly.Location);

            //ロードしたDLLからMFCのメッセージボックスを呼び出し、それを閉じる
            WindowControl current = WindowControl.FromZTop(app);

            app[typeof(ExpandMethods), "Func", new Async()]("xxx");
            WindowControl next    = current.WaitForNextModal();
            WindowControl button2 = next.IdentifyFromZIndex(2);

            button2.SetFocus();
            button2.SequentialMessage(
                new MessageInfo(0x0201, 0x0001, 0),
                new MessageInfo(0x0202, 0x0000, 0));
        }