Menu

Basic Dll functions ( Open failed )

Help
2006-07-25
2012-12-11
  • Nobody/Anonymous

    Hello,

    First i want to say that I just speak a little bit english, so I’m sorry if sometime what i say is complicated or false.

    It's the first time when i use the MediaInfo library (MediaInfo.dll) and i have some problems to know how to use it.

    I use a different Frensh laguage for programming, it's the W-Language, this why i need a very good and detailed explanation of how to use the MediaInfo Library.

    In this programmation Laguage that I use is like that:

    1) To define a variable :
    Variable_nam is int/String/...
    Variable_nam is int/String/... = Value

    2) To call a DLL :
    CallDLL32("DLL_File”, “Function_name”, Parameter1, Parameter2, ParameterN)

    So, this is how I do to open a media file with the MediaInfo (but everytime it faile) :

    Hndl is int = 0
    Hndl = CallDLL32("C:\MyProgram\MediaInfo.dll", "MediaInfo_New") // The returned value <> 0

    LIB = "" // LIB is the name of an object.
    LIB = "Handle : " + Hndl

    sop is int = CallDLL32 ("C:\MyProgram\MediaInfo.dll", "MediaInfo_Open", Hndl, "C:\MyProgram\Example.mp3")

    IF sop <> 0 THEN
        LIB  = LIB + RC + "Open Success : " + sop // RC is /n in the C-Language (Retourn to ligne)
    ELSE
        LIB  = LIB + RC + "Open Failed : " + sop
    END

    The result is that the MediaInfo_Open is failed 
    So i I ask you to help me please.
    I think that the problem is on my program, but if u explane to me how does it work or to give me an example, with the C-Language i will correct my program.

    Thank you very much ;)
    AS31

    (you can contact me at l_as31_l@yahoo.fr) if you like!)

     
    • Jerome Martinez

      Jerome Martinez - 2006-07-26

      C/C++ example are provided in the DLL package.
      I think that the problem is W-Language is not Unicode-aware.
      MediaInfo_Open() request Unicode string, does WinDev supports Unicode?
      If not, try old Ansi method : MediaInfoA_Open(), and continue with MediaInfoA_* methods, which use Ansi strings.
      For example, in C :
      MediaInfo_Open(Hndl, L"C:\MyProgram\Example.mp3");
      MediaInfoA_Open(Hndl, "C:\MyProgram\Example.mp3");

      wchar_t* Return=MediaInfo_Open(Hndl, 0);
      char* ReturnA=MediaInfoA_Open(Hndl, 0);

      Note the "L", which means Unicode string.

      PS : au pire on parlera en francais si c'est plus simple ;-)

       

Log in to post a comment.