Thread: Win32.SendMessage() doesn't work for non admin user

  1. #1
    Registered User
    Join Date
    Feb 2014
    Posts
    1

    Question Win32.SendMessage() doesn't work for non admin user

    Hi,
    I am using FFDShowAPI to flip and mirror the video. Video is displayed in IE. When I logged in to machine with Admin user, it works. But if I logged in with non Admin user, it doesn't work.
    I have debugged the FFDShowAPI and found that Win32.SendMessage() returns 1 for Admin user and returns 0 for non admin user. Even I have tried to get error details using GetLastWin32Error() but it returns 0.
    In short Win32.SendMessage() doesn't work for standard user (i.e. non admin user).
    OS: Windows 7 with default UAC settings


    I am stuck at this problem since last 1 week. Please help me how to solve this problem ASAP.
    Thanks,
    Ayaz Shaikh

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    If you look at the documentation for SendMessage() on MSDN you will find this little one-liner.

    Message sending is subject to UIPI. The thread of a process can send messages only to message queues of threads in processes of lesser or equal integrity level.
    The gist is that UIPI (User Interface Privilege Isolation) prevents a program sending messages to a process unless it has sufficient privileges (a process of "higher integrity level" means it is more trusted by the system, hence potentially has more privileges). For example, a normal user will not be able to send messages to windows of programs owned by system accounts (unless specifically granted privileges to do so).

    UIPI was introduced in (IIRC) Windows Vista to counter certain techniques of achieving privilege escalation. A number of patches to earlier versions of windows also countered such techniques.

    As such, it would be a breach of site policy to discuss techniques to bypass it (other than getting an administrator to grant sufficient privileges). Look at this link (point 6 in particular).

    EDIT: and this is a windows question, nothing to do with C++.
    Last edited by grumpy; 02-05-2014 at 04:04 AM.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Moved to Windows programming forum.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 12-07-2010, 06:53 AM
  2. SendMessage() doesnt work
    By anne03 in forum C++ Programming
    Replies: 2
    Last Post: 08-23-2010, 02:30 AM
  3. Win32 Service doesn't work arghhh
    By cppnewbie81 in forum C++ Programming
    Replies: 7
    Last Post: 07-04-2007, 08:53 PM
  4. SendMessage(add txt 2 listbox) won't work in WM_COMMAND
    By scwizard in forum Windows Programming
    Replies: 5
    Last Post: 12-12-2006, 07:25 PM
  5. my function doesn't work! it should work
    By Unregistered in forum C Programming
    Replies: 13
    Last Post: 05-02-2002, 02:53 PM

Tags for this Thread