I have a form called VideoForm which has a Windows Media Player called player.
public AxWMPLib.AxWindowsMediaPlayer player;
When I open VideoFrame.cs [Design] I get two errors:
Could not find type 'AxWMPLib.AxWindowsMediaPlayer'
The variable 'player' is either undeclared or was never assigned.
If I create a new form in my solution and try to add a Windows Media Player to it, I get this error:
Failed to create component 'AxHost' The error message follows: 'System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
(with a ton of types listed below basically amounting to "stuff the toolbox needs to make a control")
I have tried: restarting Visual Studio, restarting my computer, deleting and re-importing the libraries, switching to 32, building, then switching back to 64 and building again, and manually finding the lib files on my machine.
But here's the weird part- if I close this solution, open another, add a Windows Media Player, compile to 64 bit, then close and reopen the original solution I don't get the errors!
EDIT: I do however get the following two errors when I attempt the above "hack":
Warning Processing COM reference "WMPLib" from path "C:\Windows\system32\wmp.dll". Type library importer encountered a property getter 'sessionPlaylistCount' on type 'WMPLib.IWMPNowPlayingHelperDispatch' without a valid return type. The importer will attempt to import this property as a method instead.
and
Processing COM reference "WMPLib" from path "C:\Windows\system32\wmp.dll". At least one of the arguments for 'IWMPGraphEventHandler.NotifyAcquireCredentials' cannot be marshaled by the runtime marshaler. Such arguments will therefore be passed as a pointer and may require unsafe code to manipulate.
I think I am getting a memory leak but am at a loss, and I see nothing at runtime in either Threads or GPU Threads windows.
I do not believe it is my code that is causing this, however if you want to see the code comment and I will add relevant parts.