Exemplo n.º 1
0
        /// <summary>
        /// Disallow the User Interface Privilege Isolation message filters
        /// </summary>
        public void DisallowFileDraggingFromProgramsWithLowerPrivileges()
        {
            WinApi.CHANGEFILTERSTRUCT changeFilterStruct = new WinApi.CHANGEFILTERSTRUCT(WinApi.MSGFLTINFO_NONE);

            bool result;

            result = WinApi.ChangeWindowMessageFilterEx(hWnd, WinApi.WM_DROPFILES, WinApi.MSGFLT_DISALLOW, out changeFilterStruct);
            result = WinApi.ChangeWindowMessageFilterEx(hWnd, WinApi.WM_COPYDATA, WinApi.MSGFLT_DISALLOW, out changeFilterStruct);
            result = WinApi.ChangeWindowMessageFilterEx(hWnd, WinApi.WM_COPYGLOBALDATA, WinApi.MSGFLT_DISALLOW, out changeFilterStruct);
        }