# i cannot import "MediaSoundComponent.h" help me :(

**URL:** <https://forums.unrealengine.com/t/i-cannot-import-mediasoundcomponent-h-help-me/762657>\
**Category:** C++\
**Tags:** UE-5, unreal-engine, CPP, question\
**Created:** [February 3, 2023, 5:55am UTC](https://forums.unrealengine.com/t/i-cannot-import-mediasoundcomponent-h-help-me/762657 "2023-02-03T05:55:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WheelletBurger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WheelletBurger](https://forums.unrealengine.com/u/WheelletBurger)\
**Post date:** [February 3, 2023, 5:55am UTC](https://forums.unrealengine.com/t/i-cannot-import-mediasoundcomponent-h-help-me/762657/1 "2023-02-03T05:55:13Z")

</div>

Hi there 😊. I have some problem.  
I’m having a hard time solving a problem.  
I tried to add and play “MediaSoundComponent.h” in cpp, but I received the following error code.

1\>C:\Program Files\Epic Games\UE\_5.0\Engine\Source\Runtime\AudioMixer\Public\Quartz\AudioMixerQuantizedCommands.h(31): error C2838: ‘PlaySoundW’: illegal qualified name in member declaration  
1\>C:\Program Files\Epic Games\UE\_5.0\Engine\Source\Runtime\AudioMixer\Public\Quartz\AudioMixerQuantizedCommands.h(31): error C2440: ‘return’: cannot convert from ‘BOOL (\_\_cdecl \*) (LPCWSTR,HMODULE,DWORD)’ to ‘EQuartzCommandType’  
1\>C:\Program Files\Epic Games\UE\_5.0\Engine\Source\Runtime\AudioMixer\Public\Quartz\AudioMixerQuantizedCommands.h(31): note: There is no context in which this conversion is possible

I’m doing my best to find the cause of the error, but it’s unclear what it’s conflicting with.  
An external plugin is fetching the OPENCV-4.5.5 dll with CUDA added via CMAKE. Is this the problem?  
Or is there any other solution? Help 😂!

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [February 3, 2023, 6:14am UTC](https://forums.unrealengine.com/t/i-cannot-import-mediasoundcomponent-h-help-me/762657/2 "2023-02-03T06:14:10Z")

</div>

Have you included the [MediaAssets](https://docs.unrealengine.com/4.27/en-US/API/Runtime/MediaAssets/index.html) module in the Build.cs ?

---

<div class="post-metadata">

**Author:** ![WheelletBurger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WheelletBurger](https://forums.unrealengine.com/u/WheelletBurger)\
**Post date:** [February 3, 2023, 6:16am UTC](https://forums.unrealengine.com/t/i-cannot-import-mediasoundcomponent-h-help-me/762657/3 "2023-02-03T06:16:45Z")

</div>

Yes I am already importing.

---

<div class="post-metadata">

**Author:** ![WheelletBurger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WheelletBurger](https://forums.unrealengine.com/u/WheelletBurger)\
**Post date:** [February 7, 2023, 12:06am UTC](https://forums.unrealengine.com/t/i-cannot-import-mediasoundcomponent-h-help-me/762657/4 "2023-02-07T00:06:20Z")

</div>

> [@UTexture::UpdateResource() overwrote by winbase.h #define](https://forums.unrealengine.com/t/utexture-updateresource-overwrote-by-winbase-h-define/399580):
>
> There’s lots of nasty things in winbase that uses the preprocessor to define a reference to either the W (wide character) or A (ASCII character) version of windows functions, based on whether you have the wide character compilation flag raised. I’ve not come across this exact issue, but if you simply need a resolution, include winbase.h in your precompiled header file, then #undef UpdateResource.

I noticed I didn’t share all the information in the question. I’m not sure that this workaround is a definitive solution. But it worked, so I applied it once.

---

<div class="post-metadata">

**Author:** ![CrimsonHawk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrimsonHawk](https://forums.unrealengine.com/u/CrimsonHawk)\
**Post date:** [August 12, 2024, 6:16am UTC](https://forums.unrealengine.com/t/i-cannot-import-mediasoundcomponent-h-help-me/762657/5 "2024-08-12T06:16:43Z")

</div>

For those who run into this error later, like I did:

You need to add `#include "Windows/MinWindows.h"` anywhere before the header that causes your errors!
