Results 1 to 2 of 2
  1. #1
    reenignE remmy's Avatar
    Join Date
    Dec 2004
    Posts
    34

    For those diverse in the .NET Framwork

    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:

    Code:
    LRESULT CALLBACK eventListener(HWND hWnd, UINT msg, WPARAM wP, LPARAM lP)
    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.

    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.
    Attached Files Attached Files
    Last edited by remmy; February 4th, 2007 at 17:59.
    I think Van Halen said it best. "Go ahead and JMP 004AA6EA;90!


    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    reenignE remmy's Avatar
    Join Date
    Dec 2004
    Posts
    34
    Well, I've made progress, but had to rewrite quite a bit of code. Attached is the current progress. 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).

    Also, it's not multi threaded yet. That's not an over site, just laziness, so the form does not redraw while playing just yet/the form is unresponsive while playing, however it speed is comparable to it's C++ counterpart. memory usage, not so much. There are no optimizations being used yet, so it's a little large in the memory department right now.

    Should have the rest of it patched together soon.
    Attached Files Attached Files
    I think Van Halen said it best. "Go ahead and JMP 004AA6EA;90!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •