Menu

Hwo to use the fobs4jmf.dll in vc?

user
2005-04-02
2013-05-09
  • Nobody/Anonymous

    I use LoadLibrary and GetProcess.
    void JNICALL Java_com_omnividea_media_codec_video_JavaDecoder_init  (JNIEnv *env, jobject obj)

    How to create env and obj ??

     
    • Nobody/Anonymous

      HMODULE g_hModule;
      HMODULE InitDll(char* DllName)
      {
          return (g_hModule = LoadLibrary(DllName));
      }
      FARPROC GetFunction(char* FunctionName)
      {
          if( NULL == g_hModule )
              return NULL;
          return GetProcAddress(g_hModule, FunctionName );
      }
      void init(JNIEnv* env, jobject jo)
      {
          typedef void(WINAPI* MYFUN)(JNIEnv* env, jobject jo);
          MYFUN fun = (MYFUN)GetFunction("Java_com_omnividea_media_codec_video_JavaDecoder_init");
          if( NULL == fun )
              MessageBox(0,"ERROR",0,0);
          return fun(env,jo);
      }

      JNIEnv* lpenv = new JNIEnv;
          jclass jc = new _jclass;
          init(lpenv,jc);

      this is my code, please help,thank you!

       
      • Jose San Pedro

        Jose San Pedro - 2005-04-02

        Hi,

        why are you trying to use fobs4jmf.dll in your VC project?!?

        This lib is to be used directly by JMF. If you need a C++ interface, you should take a look at Fobs (not Fobs4jmf). It provides a C++ API though I have had no succcess to make it work with any other compiler than gcc. You should be able to find a discussion in this forum about the reasons of this.

        Cheers.

        Jose San Pedro

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.