Closed devedse closed 5 years ago
You can't remove GetModuleHandleA
or LoadLibraryExA
like this. They are not part of MediaFoundation. They were introduced in DXGI by 556aee5cd01b7dfa4ded256ef7510f57bcb9df0e so the relevant code (DllImport
in Kernel32
interop) need to be put into appropriate ifdef DESKTOP_APP
.
I would love to fix this issue, but I'm not sure on how to continue (haven't ever worked with things like this). Would you mind giving some guidance?
In the file Source/SharpDX.DXGI/Kernel32.cs
where the DllImport are causing trouble, you should ifdef the whole file for DESKTOP_APP:
#if DESKTOP_APP
...
#endif
@xoofx , I executed the changes, could you review?
Thanks. If you could check that is is actually fixing your problem by using the NuGet packages from the build directly: https://ci.appveyor.com/project/xoofx/sharpdx/build/artifacts
@xoofx , yes this has in fact solved the issue:
@xoofx , when will this be released to NuGet?
https://github.com/sharpdx/SharpDX/issues/939 was already closed but with version 4.2 of SharpDX new issues appear.
Could someone verify if this is the right fix for this issue?