# c++/CLI Wrapper

**URL:** <https://qa.fmod.com/t/c-cli-wrapper/12435>\
**Category:** FMOD Studio\
**Created:** [April 7, 2016, 3:10pm UTC](https://qa.fmod.com/t/c-cli-wrapper/12435 "2016-04-07T15:10:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom1](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@Tom1](https://qa.fmod.com/u/Tom1)\
**Post date:** [April 7, 2016, 3:10pm UTC](https://qa.fmod.com/t/c-cli-wrapper/12435/1 "2016-04-07T15:10:17Z")

</div>

Hi,

I’ve built some code in C++ using FMOD. For building a GUI around it, I’m trying to make a wrapper class that should make a DLL out of the code that can be reused in CLR.  
However, I get an error C1189, telling me that there is one or more mutexes used in the code, which is incompatible with the CLR mode. Does anyone have a suggestion about how I can solve this ?

Best regards,

Tom

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [April 8, 2016, 6:18am UTC](https://qa.fmod.com/t/c-cli-wrapper/12435/2 "2016-04-08T06:18:03Z")

</div>

CLR wrapping isn’t a supported usage of FMOD, it may very well be possible but we have no expertise in this area so unfortunately cannot advise on this matter.

Hopefully someone in the FMOD community can assist you further.

---

<div class="post-metadata">

**Author:** ![Tom1](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@Tom1](https://qa.fmod.com/u/Tom1)\
**Post date:** [April 8, 2016, 6:36am UTC](https://qa.fmod.com/t/c-cli-wrapper/12435/3 "2016-04-08T06:36:59Z")

</div>

> [@](#):
>
> CLR wrapping isn’t a supported usage of FMOD, it may very well be possible but we have no expertise in this area so unfortunately cannot advise on this matter.
> 
> Hopefully someone in the FMOD community can assist you further.

Hi Mathew,

Is there another way of connecting it to a CLR environment to be able to provide it with a GUI ?

Kind regards,

Tom

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [April 8, 2016, 7:49am UTC](https://qa.fmod.com/t/c-cli-wrapper/12435/4 "2016-04-08T07:49:43Z")

</div>

You might be able to compile our C# wrapper as a managed library and use that. That approach seems similar to what you are doing which makes me think the mutex error is coming from your code somehow (we don’t use mutex in our headers). I’m certainly not an expert in this area though, you might have more luck on StackOverflow.
