I've written a small Media Foundation Transform and added the C++ DLL to my C# Windows Store App project.
The 32bit version of the DLL running the x86 configuration works just fine but x64 doesn't work (it throws an Exception with the following message:
"MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED : HRESULT - 0x800700C1")
If I add the 64bit version it's the same just the other way around x64 works and x86 doesn't.
Is there any way I can set it up so that it uses the x86 version of the DLL for the x86 configuration and the x64 version for the x64 configuration?
Took me some time but I figured out how to do it using NuGet. First I added a location on my PC as package source as explained here.
In VS2013 CE you do this by opening the NuGet Package Manager Settings (Tools > NuGet Package Manager > Package Manager Settings) and under Package Sources you add a location on your computer.
To create the NuGet I combined several HowTo's since one alone didn't work. The main one was this.
I built the dlls for my required platforms and created the following folder structure
Since it might be a little hard to see ProjectName.props and ProjectName.targets are located in the netcore451 folder. The .dll, .pri and .winmd in lib are the x86 version. According to the HowTo it's redundant and you can just ignore these files but without them VS might not work correctly in design mode.
In the folder that contains build and lib I created a file ProjectName.nuspec
ProjectName.props
ProjectName.targets
I'm not sure if it's necessary to check for x86 and Win32 but it works for me.
Disclaimer
This was the first time ever I created a NuGet package and the code above might suck.