Handmade Network»Forums
Mārtiņš Možeiko
2575 posts / 2 projects
wcap
Edited by Mārtiņš Možeiko on
Replying to Bits Please (#30087)

Turns out you don't need that RequestAccessAsync. Everything is works without it, you just need correct interface to call the method.

Adding these things will make border to go away:

typedef struct IGraphicsCaptureSession3 IGraphicsCaptureSession3;

struct IGraphicsCaptureSession3Vtbl {
	IInspectable_Parent(IGraphicsCaptureSession3);
	HRESULT(STDMETHODCALLTYPE* get_IsBorderRequired)(IGraphicsCaptureSession3* this, char* value);
	HRESULT(STDMETHODCALLTYPE* put_IsBorderRequired)(IGraphicsCaptureSession3* this, char value);
};

VTBL(IGraphicsCaptureSession3);

DEFINE_GUID(IID_IGraphicsCaptureSession3, 0xf2cdd966, 0x22ae, 0x5ea1, 0x95, 0x96, 0x3a, 0x28, 0x93, 0x44, 0xc3, 0xbe);

...

IGraphicsCaptureSession3* Session3;
if (SUCCEEDED(Session->vtbl->QueryInterface(Session, &IID_IGraphicsCaptureSession3, (LPVOID*)&Session3)))
{
	HR(Session3->vtbl->put_IsBorderRequired(Session3, (char)WithBorder));
	Session3->vtbl->Release(Session3);
}
26 posts
wcap
Replying to mmozeiko (#30088)

Martins, you're the man.

Thank you very much for your assistance. It works perfectly now!