Janine Polster
Janine Polster

Reputation: 101

Clipboard not found in UWP

I'm currently working on a project consisting of one program which tracks faces (which we got from https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BasicFaceTracking), which is a Windows Universal App and our program, which is supposed to get the number of faces recognized and reacting appropriately.

I thought about copying the number of faces detected by the facetracking program to the clipboard and just reading it from the program. The problem I have (which might actually be really simple) is that I can't seem to get to the Clipboard Class from within the UWP app. Using OpenClipboard(NULL) or similar but I always get the error that the IDentifier is not found, no mater which header I include or not...

Can anyone give me a clue what to do? Or maybe a better alternative to transfer that one tiny int from one program to the other?

Thanks in advance.

janine

Upvotes: 1

Views: 219

Answers (1)

user7860670
user7860670

Reputation: 37549

For UWP applications you should use Clipboard class.

OpenClipboard is an old Win32 API that is only available to desktop applications as mentioned at corresponding MSDN page:

Minimum supported client Windows 2000 Professional [desktop apps only]

Upvotes: 2

Related Questions