I've just started playing around with C# and as my first project, I decided to write a sample application that loads the THP Dynamic Library I created based on thakis' thpplay source.
The DLL is loading and initializing properly, however, do to the lack of a callback, I'm currently only able to play the first Frame of a THP via C#.
For instance, in thakis' original source, he used:
Now my question is how would this be implemented in C#? I'm guessing I'd have to use pInvoke, but being completely new to C#, I'm just guessing.Code:LRESULT CALLBACK eventListener(HWND hWnd, UINT msg, WPARAM wP, LPARAM lP)
Attached is the test application in its current state along with the Dynamic Link Library for anyone who is interested in the Library. It's a C++ Dynamic Link Library.
Check dumpbin for exports and thpplay's source for implementation ideas.
-Edit
Forgot to mention that the purpose of doing the application in C# is just to provide THP playing functionality to those who wish to use it in the .NET Framework.
-Edit 2
Once I can iron out the callback, I'll be happy to share the source for the class with whomever wants it.


Reply With Quote
Note the name Debug. I've managed to get videos to play completely through without a problem, however, audio is still limited to the cached frames (10).