Giter Club home page Giter Club logo

Comments (10)

robmikh avatar robmikh commented on May 18, 2024

It seems that you're failing the QI to get the IGraphicsCaptureItemInterop interface. Which version of Windows are you running? This feature was added in the 1903 update.

from windows.ui.composition-win32-samples.

gileli121 avatar gileli121 commented on May 18, 2024

I have OS Build 10.0.17763.557
I will try it again after updating and will let you know if the issue resolved

from windows.ui.composition-win32-samples.

gileli121 avatar gileli121 commented on May 18, 2024

Hello, after I updated the example works. Good. is there an otption to not capture the mouse pointer?

And now I have another issue with the API function DwmRegisterThumbnail from here:
https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmregisterthumbnail

My program makes some big use with this function and after this update the function is not working as expected. Please see the issue I reported to Microsoft:

https://answers.microsoft.com/en-us/windows/forum/windows_10-update/dwmregisterthumbnail-is-not-working-as-expected-in/72dcf82e-7e8e-46f6-b7f3-d80f6f34fefa?tm=1562540172919

I know that the issue is not related to this. I just don't know where to get the support.
Please let me know where to get support about this issue. I am not sure that I reported it in the right place.

The issue is big and it broke something in my program...
Please help me to get support about this.

Thanks

from windows.ui.composition-win32-samples.

robmikh avatar robmikh commented on May 18, 2024

Glad to hear the sample is working. The current Insider builds have an API we plan to add that makes the cursor rendering configurable. Look for a new property on GraphicsCaptureSession named IsCursorCaptureEnabled.

As for your issue with DwmRegisterThumbnail, what exactly are you having a problem with? Multiple thumbnails that are assigned to a single window, or the same thumbnail (or at least thumbnails targeting the same window) across multiple windows? I tried both just now and couldn't reproduce any issues. What would I do to reproduce this?

from windows.ui.composition-win32-samples.

gileli121 avatar gileli121 commented on May 18, 2024

Hello, I think that the problem is when you use the API via DLL file.. I could reproduce the bug only by using the API from a script that written in Autoit.

Please try to run this code:
https://pastebin.com/MNABim8w

Note that you will need to update the target window to display a preview for in line:
$targetGUI = HWnd(0x000000000002004C)

The problem is that you will see only one window getting the live preview. it did not happned before the update.

This is how it looks:
image

The preview 2 window don't get a live preview. Only the first one.
If I will remove this line that create the first preview:
$handle1 = RegisterWindowLivePreview($targetGUI,$hGUI1)

The second preview will work.

I think that the problem is because the API returns the same HTHUMBNAIL twice.
The this line:
$aRet = DllCall("dwmapi.dll", "int", "DwmRegisterThumbnail", "hwnd", $hwnd, "hwnd", $hWndOw, "ptr*", DllStructGetPtr($tID))
Will call to this function. the function returns the ID 1 even the second time. I think that this is the bug..
But in C++ version I did not saw this. The ID was 2 on the second call and not 1.

from windows.ui.composition-win32-samples.

gileli121 avatar gileli121 commented on May 18, 2024

It seems that you did some change in dwmapi.dll in this update.
It seems that this dll now stores some global memory for the HTHUMBNAIL ID.

I know this because I found the solution.
The solution is open the dll file using:
$dwmDll = DllOpen('dwmapi.dll')

And then in any line that calls the dll, I need to use the dll handle $dwmDll
So instead of
DllCall('dwmapi.dll', ...
I write
DllCall($dwmDll, ...

This was solved the issue and now the script print different HTHUMBNAIL on the second call as expected.

from windows.ui.composition-win32-samples.

robmikh avatar robmikh commented on May 18, 2024

That seems like there was a behavior change in Autoit, I can't get this to happen in C++. Glad everything was sorted out for you.

from windows.ui.composition-win32-samples.

krenner avatar krenner commented on May 18, 2024

Hi gileli121 - I wanted to comment on your question re: mouse cursors. Insider preview builds 18894 or greater have a new property on GraphicsCaptureSession named IsCursorCaptureEnabled. Release notes are here.

from windows.ui.composition-win32-samples.

gileli121 avatar gileli121 commented on May 18, 2024

Thanks.
Will be also an option to remove the yellow frame of the window that under capture mode?

from windows.ui.composition-win32-samples.

robotogre avatar robotogre commented on May 18, 2024

@robmikh I am seeing this error in the latest version of Windows 10 LTSC 1809 (17763.1728).

Am I out of luck?

from windows.ui.composition-win32-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.