# I am getting C++ compilation issues while compiling my project

**URL:** <https://devforum.zoom.us/t/i-am-getting-c-compilation-issues-while-compiling-my-project/62038>\
**Category:** Meeting SDK\
**Created:** [December 30, 2021, 7:50am UTC](https://devforum.zoom.us/t/i-am-getting-c-compilation-issues-while-compiling-my-project/62038 "2021-12-30T07:50:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![umarakmal56j](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/umarakmal56j/32/33694_2.png) [@umarakmal56j](https://devforum.zoom.us/u/umarakmal56j)\
**Post date:** [December 30, 2021, 7:50am UTC](https://devforum.zoom.us/t/i-am-getting-c-compilation-issues-while-compiling-my-project/62038/1 "2021-12-30T07:50:31Z")

</div>

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](https://www.jbbatteryspain.com/) 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:

```auto
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: [Imgur: The magic of the Internet](https://imgur.com/FoUo51T)

---

<div class="post-metadata">

**Author:** ![imptonyid](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/imptonyid/32/22278_2.png) [@imptonyid](https://devforum.zoom.us/u/imptonyid)\
**Post date:** [December 30, 2021, 10:38am UTC](https://devforum.zoom.us/t/i-am-getting-c-compilation-issues-while-compiling-my-project/62038/2 "2021-12-30T10:38:55Z")

</div>

You may get compiler error if you use a C++ Compiler to build a C# program. They are two distinct languages. Please update your language tags with the one language you are using

---

<div class="post-metadata">

**Author:** ![thelmae.redman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/thelmae.redman/32/20522_2.png) [@thelmae.redman](https://devforum.zoom.us/u/thelmae.redman)\
**Post date:** [December 30, 2021, 2:05pm UTC](https://devforum.zoom.us/t/i-am-getting-c-compilation-issues-while-compiling-my-project/62038/3 "2021-12-30T14:05:37Z")

</div>

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**?  
[Source](https://www.jbbatteryportugal.com/): [c# - I am getting C++ compilation issues while compiling my project - Stack Overflow](https://stackoverflow.com/questions/70523731/i-am-getting-c-compilation-issues-while-compiling-my-project)

---

<div class="post-metadata">

**Author:** ![w.aseemgondal932](https://avatars.discourse-cdn.com/v4/letter/w/a8b319/32.png) [@w.aseemgondal932](https://devforum.zoom.us/u/w.aseemgondal932)\
**Post date:** [January 1, 2022, 4:41pm UTC](https://devforum.zoom.us/t/i-am-getting-c-compilation-issues-while-compiling-my-project/62038/4 "2022-01-01T16:41:05Z")

</div>

can you please let me know about to add as I am not a C++ expert?

---

<div class="post-metadata">

**Author:** ![shainali](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shainali/32/33778_2.png) [@shainali](https://devforum.zoom.us/u/shainali)\
**Post date:** [January 4, 2022, 8:27am UTC](https://devforum.zoom.us/t/i-am-getting-c-compilation-issues-while-compiling-my-project/62038/5 "2022-01-04T08:27:24Z")

</div>

did you try user32.lib directory in the project or not?

---

<div class="post-metadata">

**Author:** ![saniltr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saniltr/32/12526_2.png) [@saniltr](https://devforum.zoom.us/u/saniltr)\
**Post date:** [January 4, 2022, 12:02pm UTC](https://devforum.zoom.us/t/i-am-getting-c-compilation-issues-while-compiling-my-project/62038/6 "2022-01-04T12:02:55Z")

</div>

Hi @umarakmal56j,

Check my answer in another post, link provided below.

> [@How to disable Screenshot/capturing while meeting in C#, Zoom Windows SDK](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/9):
>
> Hi @searchbarzoom, I have found a solution for the issues you are facing… Please follow the below steps to overcome the issue and you will no longer get the error unresolved token (0A00092F) extern C int \_\_stdcall SetWindowDisplayAffinity as mentioned. Right click on the project zoom\_sdk\_dotnet\_wrap Select Properties. Check the screenshot below for your reference. On the Project property page, expand Linker Select Input and on the right side first dropdown Additinal Dependencies select inheri…

This will help to clear the C++ compilation issues…

Hope this helps…

Thanks,  
SANIL T R

---

<div class="post-metadata">

**Author:** ![SaniaMirza12](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saniamirza12/32/33848_2.png) [@SaniaMirza12](https://devforum.zoom.us/u/SaniaMirza12)\
**Post date:** [January 6, 2022, 8:17am UTC](https://devforum.zoom.us/t/i-am-getting-c-compilation-issues-while-compiling-my-project/62038/7 "2022-01-06T08:17:17Z")

</div>

thanks Appreciated your efforts, one member asked the question and lot of people has solved their queries.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 10, 2022, 10:17pm UTC](https://devforum.zoom.us/t/i-am-getting-c-compilation-issues-while-compiling-my-project/62038/8 "2022-01-10T22:17:21Z")

</div>

It’s always great to see collaboration on the dev forum!

Unfortunately since this topic is not directly related to SDK usage, I am going to close it out. If anyone has additional questions regarding the Meeting SDK, please create a new topic. For any general programming questions, we recommend checking out the language documentation or a more generally-oriented site, such as StackOverflow. 🙂

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 10, 2022, 10:17pm UTC](https://devforum.zoom.us/t/i-am-getting-c-compilation-issues-while-compiling-my-project/62038/9 "2022-01-10T22:17:24Z")

</div>

Closed on January 10, 2022, 10:17pm UTC


