Beispiel #1
0
        static User32()
        {
            var library = DynamicImport.ImportLibrary(nameof(User32));

            GetAsyncKeyState = DynamicImport.Import <GetAsyncKeyStateDelegate>(library, nameof(GetAsyncKeyState));
            GetKeyboardState = DynamicImport.Import <GetKeyboardStateDelegate>(library, nameof(GetKeyboardState));
            GetKeyState      = DynamicImport.Import <GetKeyStateDelegate>(library, nameof(GetKeyState));
        }
        static User32()
        {
            var library = DynamicImport.ImportLibrary(nameof(User32));

            GetAsyncKeyState = DynamicImport.Import <GetAsyncKeyStateDelegate>(library, nameof(GetAsyncKeyState));
            GetKeyboardState = DynamicImport.Import <GetKeyboardStateDelegate>(library, nameof(GetKeyboardState));
            GetKeyState      = DynamicImport.Import <GetKeyStateDelegate>(library, nameof(GetKeyState));
            SendInput        = DynamicImport.Import <SendInputDelegate>(library, nameof(SendInput));
            KeybdEvent       = DynamicImport.Import <KeybdEventDelegate>(library, "keybd_event");
            MouseEvent       = DynamicImport.Import <MouseEventDelegate>(library, "mouse_event");
            PostMessageW     = DynamicImport.Import <PostMessageDelegate>(library, nameof(PostMessageW));
            SendMessageW     = DynamicImport.Import <SendMessageDelegate>(library, nameof(SendMessageW));
        }