Windows 10: GetSystemMetricsSM_CMOUSEBUTTONS returning wrong value on Windows10 on RDP

Discus and support GetSystemMetricsSM_CMOUSEBUTTONS returning wrong value on Windows10 on RDP in Windows 10 Drivers and Hardware to solve the problem; If we call the Windows GetSystemMetrics function to find the number of buttons of the installed mouse, it alwaysreturns 2 if the function is called... Discussion in 'Windows 10 Drivers and Hardware' started by V Sidnal, Feb 7, 2020.

  1. V Sidnal Win User

    GetSystemMetricsSM_CMOUSEBUTTONS returning wrong value on Windows10 on RDP


    If we call the Windows GetSystemMetrics function to find the number of buttons of the installed mouse, it alwaysreturns 2 if the function is called from a Remote Desktop session.


    Our application needs 3 buttons to perform 3 different actions on graphic clients ILOG IlView based.However, the application only receives events for two buttons if executed on a Terminal Server/RDP session. But it works fine on a console session. The software detects only two buttons and the graphic library ignores events coming from the third one.


    The detection is internally made by invoking GetSystemMetrics passing SM_CMOUSEBUTTONS as a parameter. The result varies between console and RDP sessions.


    The problem happens only if the RDP session is executed on Windows 10, but not on Windows 7. No matter what Windows version is used on the client side.


    int main int argc, char **argv


    {


    BOOL fResult = GetSystemMetricsSM_MOUSEPRESENT;

    if fResult == 0
    printf"No mouse installed.\n";
    else
    {
    printf"Mouse installed.\n";

    int nb = GetSystemMetricsSM_CMOUSEBUTTONS;
    printf"The number of mouse buttons - %d\n", nb;
    }
    getche;
    return 0;




    }


    The expected result on Windows 10 on a RDP session is greater than 2 if a 3-button mouse is being used. However it coming as is2, which is incorrect.

    :)
     
    V Sidnal, Feb 7, 2020
    #1
  2. dalchina Win User

    Native Resolution wrong in Windows10 laptop


    Hi, I assume you bought it 2nd hand. Did it come with Win 10?

    As you're unsure about what you've got, I suggest you download and run
    Hwinfo64
    E.g.

    GetSystemMetricsSM_CMOUSEBUTTONS  returning wrong value on Windows10 on RDP [​IMG]

    GetSystemMetricsSM_CMOUSEBUTTONS  returning wrong value on Windows10 on RDP [​IMG]
     
    dalchina, Feb 7, 2020
    #2
  3. RDP

    Hi Nikki,

    We can see here that you are having issues using (RDP) Remote Desktop Protocol on your computer. There are several reasons why you are experiencing this concern. To set your expectation, we will be doing some troubleshooting steps to isolate
    this problem. Before we proceed, may we know the following:

    • Any changes made on the computer prior to this concern?
    • What troubleshooting steps have you tried so far?
    • Is this the first time that you encountered this problem?
    • When did you notice about this issue?
    • Can you send us a screenshot with the error message that you are getting? Note: Please do not include any personal information.
     
    Desiree Yau, Feb 7, 2020
    #3
  4. GetSystemMetricsSM_CMOUSEBUTTONS returning wrong value on Windows10 on RDP

    RDP

    • Any changes made on the computer prior to this concern?

      Initially when we received the problem there wasn't any changes made on the computer since we couldn't figure out the problem, we upgraded the pc to windows 10. It fixed the problem momentarily and then it starts again. Then we re initiated the upgrade the
      same day I wrote this post and it was fixed again and then on today the issue is back
    • What troubleshooting steps have you tried so far?

      In the past we would delete the MS Licensing Protocol folder as suggested by so many other posts and restart the RDP connection ad administrator to rebuild it. This time around it didn't fix anything. Like I said previously we've tried to upgrade the PC and
      the fix is temporal
    • Is this the first time that you encountered this problem? No
    • When did you notice about this issue? I'm not sure when it started because I haven't been on this project that long but I would say within the last month based on me. Based on other conversations this has happened in the past.
    • Can you send us a screenshot with the error message that you are getting? Note: Please do not include any personal information.

      Sure
      GetSystemMetricsSM_CMOUSEBUTTONS  returning wrong value on Windows10 on RDP d7470294-b2af-4c9c-aa56-a971016a58bf.jpg
     
    NikkiGarcia02, Feb 7, 2020
    #4
Thema:

GetSystemMetricsSM_CMOUSEBUTTONS returning wrong value on Windows10 on RDP

Loading...
  1. GetSystemMetricsSM_CMOUSEBUTTONS returning wrong value on Windows10 on RDP - Similar Threads - GetSystemMetricsSM_CMOUSEBUTTONS returning wrong

  2. ToolTipService.GetShowDuration return value

    in Windows 10 Gaming
    ToolTipService.GetShowDuration return value: Hi all,with .NET Framework 4.8.1 the ToolTipService.GetShowDuration return value is int.MaxValue while with .NET Framework 4.8 the return value is 5000.What is this difference due to?...
  3. ToolTipService.GetShowDuration return value

    in Windows 10 Software and Apps
    ToolTipService.GetShowDuration return value: Hi all,with .NET Framework 4.8.1 the ToolTipService.GetShowDuration return value is int.MaxValue while with .NET Framework 4.8 the return value is 5000.What is this difference due to?...
  4. ToolTipService.GetShowDuration return value

    in Windows 10 BSOD Crashes and Debugging
    ToolTipService.GetShowDuration return value: Hi all,with .NET Framework 4.8.1 the ToolTipService.GetShowDuration return value is int.MaxValue while with .NET Framework 4.8 the return value is 5000.What is this difference due to?...
  5. nvidia-smi is returning wrong values.

    in Windows 10 Drivers and Hardware
    nvidia-smi is returning wrong values.: Hi Experts,So, I am working with nvidia-smi command to get Nvidia GPU power-cap value. It’s working fine for some of the laptops but, When I tried on some other set of laptops like Lenovo legion it is returning very weird values like below.Command: nvidia-smi...
  6. nvidia-smi is returning wrong values.

    in Windows 10 Gaming
    nvidia-smi is returning wrong values.: Hi Experts,So, I am working with nvidia-smi command to get Nvidia GPU power-cap value. It’s working fine for some of the laptops but, When I tried on some other set of laptops like Lenovo legion it is returning very weird values like below.Command: nvidia-smi...
  7. nvidia-smi is returning wrong values.

    in Windows 10 Software and Apps
    nvidia-smi is returning wrong values.: Hi Experts,So, I am working with nvidia-smi command to get Nvidia GPU power-cap value. It’s working fine for some of the laptops but, When I tried on some other set of laptops like Lenovo legion it is returning very weird values like below.Command: nvidia-smi...
  8. Returning Minecraft Windows10

    in Microsoft Windows 10 Store
    Returning Minecraft Windows10: I ordered Minecraft a little bit ago but realized I need the Java version to be able to use mods. Is there a way I can return it and get my money back? https://answers.microsoft.com/en-us/windows/forum/all/returning-minecraft-windows10/cc91cf14-5cc3-40b6-bed8-d320ed27bc48
  9. Pasting Wrong Values

    in Windows 10 Ask Insider
    Pasting Wrong Values: Yeah, you heard right, my PC is pasting the wrong value. What i talk about? Copy : VoziloInfo[veh_ID][vProveraVlasnika] = 0; Paste : via1qwwkc2ssfu0sy7c6qhr8e4curh64j8vglc0pz0ma] = 0; So when i copy text above, everywhere i paste it ( sublime, browser, cortana.. )...
  10. registry return value

    in Windows 10 Customization
    registry return value: hello Champs, I use one app to return a value in the browser in the following form: the registry entry is now: "C:\Program Files\Internet Explorer\IEXPLORE.EXE" %1 the result in the IE browser is: http://SR:123456789/ is it possible to change the registry entry so that it...