管理员权限dropfiles和copydata小时失败问题

	//处理低权限向高权限进程发消息的失败的问题

	if(windows::version::instance()->IsVistaOrLater())

	{

		typedef BOOL (WINAPI *PChangeWindowMessageFilter)(UINT, DWORD);

		if(HINSTANCE h = LoadLibrary(L"User32.dll"))

		{

			PChangeWindowMessageFilter ChangeWindowMessageFilter = (PChangeWindowMessageFilter)GetProcAddress(h, "ChangeWindowMessageFilter");

			if( ChangeWindowMessageFilter)

			{

				ChangeWindowMessageFilter(WM_COPYDATA, /*MSGFLT_ADD*/1);

				ChangeWindowMessageFilter(WM_DROPFILES, /*MSGFLT_ADD*/1);

				ChangeWindowMessageFilter(0x0049/*WM_COPYGLOBALDATA*/, /*MSGFLT_ADD*/1);

			}

		}

	}

你可能感兴趣的:(pfile)