Menu

#1 VB TO VFP

closed-later
None
5
2005-11-17
2005-10-30
Anonymous
No

I working in VFP and i try to use dll file.
I study vb proj and i try to write a code who call
dll "MediaInfo" functions, but i cannot.

My code is:

DECLARE INTEGER lstrlenW IN "kernel32" INTEGER
DECLARE INTEGER lstrcpyW IN "kernel32" STRING
@, INTEGER
DECLARE INTEGER MediaInfo_Open
IN "C:\MediaInfo.DLL" STRING @
DECLARE INTEGER MediaInfo_Close
IN "C:\MediaInfo.DLL" INTEGER
DECLARE INTEGER MediaInfo_Inform
IN "C:\MediaInfo.DLL" INTEGER, INTEGER
DECLARE INTEGER MediaInfo_GetI
IN "C:\MediaInfo.DLL" INTEGER, INTEGER,
INTEGER, INTEGER, INTEGER
DECLARE INTEGER MediaInfo_Get
IN "C:\MediaInfo.DLL" INTEGER, INTEGER,
INTEGER, STRING, INTEGER, STRING
DECLARE INTEGER MediaInfo_Option
IN "C:\MediaInfo.DLL" INTEGER, STRING @,
STRING @
DECLARE INTEGER MediaInfo_State_Get
IN "C:\MediaInfo.DLL" INTEGER
DECLARE INTEGER MediaInfo_Count_Get
IN "C:\MediaInfo.DLL" INTEGER, INTEGER,
INTEGER

*Information about MediaInfo
*To_Display = GetString(MediaInfo_Option
(0, "Info_Version", ""))
SET STEP ON

Handle = MediaInfo_Open("C:\Example.ogg")
To_Display = GetString(MediaInfo_Inform(Handle, 0))
?To_Display

Function GetString(lpszW As Integer) As String
*GetString = REPLICATE(CHR(0), lpszW)
&& anullate becouse lpsz = big number and i
receive error "String is too long"
I try this :

lcStr = CHRtran(SYS(2600,lpszw,2600),CHR(0),"")
lstrcpyW(@lcstr, lpszW)
&& but my VFP is crashed
RETURN lcstr
ENDFUNC

Anyway, my result was a string : "Not a good
file ................. CHR(0)"

I don't now what is wrong? My declare ?
I try to do this. Please help.

Discussion

  • Jerome Martinez

    Jerome Martinez - 2005-11-02
    • labels: 552382 -->
    • status: open --> pending-later
     
  • Jerome Martinez

    Jerome Martinez - 2005-11-02

    Logged In: YES
    user_id=801394

    (changed to support request)

    Since 0.7.x, interface has changed, but examples are not all
    updated.

    See mediainfo.h, it is updated (or Delphi example)

    Short reply :
    int MediaInfo_New() (return an handle)
    int MediaInfo_Open(int Handle, string FileName) (Open the
    file, when a handle is created.

    You can take a look to MediaInfo_OpenQuick for opening in
    one line, but not yet documented, so you must take a look on
    MediaInfo.h...

    Sorry for this problem.

    Note : I am interested to have an example file like other
    example for VFP.

     
  • SourceForge Robot

    • status: pending-later --> closed-later
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.