# DestroyVideoElement always returns SDKERR\_UNINITIALIZE (C# Wrapper)

**URL:** <https://devforum.zoom.us/t/destroyvideoelement-always-returns-sdkerr-uninitialize-c-wrapper/17044>\
**Category:** Windows\
**Created:** [May 11, 2020, 8:37am UTC](https://devforum.zoom.us/t/destroyvideoelement-always-returns-sdkerr-uninitialize-c-wrapper/17044 "2020-05-11T08:37:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bragma](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bragma/32/4213_2.png) [@bragma](https://devforum.zoom.us/u/bragma)\
**Post date:** [May 11, 2020, 8:37am UTC](https://devforum.zoom.us/t/destroyvideoelement-always-returns-sdkerr-uninitialize-c-wrapper/17044/1 "2020-05-11T08:37:01Z")

</div>

Hi,

**Description**  
I am trying to unsderstand how to properly deallocate a video container with video elements in it. I am calling DestroyVideoElement for each element included but I always get SDKERR\_UNINITIALIZE. DestroyAllVideoElement does the same.  
What’s the proper way to deallocate a video element and video container created with CreateVideoContainer/CreateVideoElement?

**Which version?**  
C# Wrapper v4.6.21666.0427

**Device (please complete the following information):**

- Device Spec: PC
- OS: Windows
- Version 10

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 22, 2020, 7:35am UTC](https://devforum.zoom.us/t/destroyvideoelement-always-returns-sdkerr-uninitialize-c-wrapper/17044/2 "2020-05-22T07:35:55Z")

</div>

Hi @bragma,

Thanks for the post. For some reasons, this “destroy video element” feature is not working as expected in the C# wrapper. However, the underneath interface DestroyAllVideoElement on Windows SDK is working well. If you would like to have the fix right now, you may modify the following files in the C# wrapper:

- customized\_video\_container\_dotnet\_wrap.h
- customized\_video\_container\_dotnet\_wrap.cpp

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 9:29pm UTC](https://devforum.zoom.us/t/destroyvideoelement-always-returns-sdkerr-uninitialize-c-wrapper/17044/3 "2020-08-21T21:29:02Z")

</div>

Closed on August 21, 2020, 9:29pm UTC


