I am trying to implement the zoom sdk and want to prevent my screen to be captured and by screen shots for this purpose they have given some functions to be placed inside the project. When I place the code inside the function I start getting some errors and when I remove then the errors are gone. The code which need to be placed inside the project is as follows:
BOOL CALLBACK EnumWindowsCB(HWND hwnd, LPARAM lParam)
{
SetWindowDisplayAffinity(hwnd, WDA_MONITOR);
return TRUE;
}
void CZoomSDKeDotNetWrap::DisableScreenRecord() {
DWORD pid = GetCurrentProcessId();
EnumWindows(EnumWindowsCB, pid);
uint8_t* func_data = (uint8_t*)GetProcAddress(GetModuleHandle(L"user32.dll"), "SetWindowDisplayAffinity");
}
Please let me know what these errors mean and how to resolve them. The errors are: enter image description here
CodePudding user response:
You need to add a reference to the respective library(dll) you're using in the function you're trying to put inside the library.
As seen in your code above you're trying to use standard Windows libraries. Have you tried editing your project properties then linker input options to include user32.lib?