User Tag List

Results 1 to 7 of 7

Thread: Dll & mmf

  1. #1
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    May 2012
    Location
    King's Landing
    Posts
    143
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question Dll & mmf

    Hello everybody,
    I create games and softwares with mmf for some times ago, and I have discovered a very useful DLL to decode Qrcode. Since MMF can use DLL's with the dll object, i'ld like to use it. In the function of the dll i use, there are two arguments. For the first one, it's just the path of the image file we want to decode. Therefore, the second one raises some issues to me... it's a pointer, i don't know anything in C++ ... Please, i need your help !
    I just want to get the result (the string of the qrcode) with the DLL... I give you the documentation of the DLL about the function i'ld like to use :

    Result * __stdcall QRCodeDecode (HBITMAP hImage,int *pCount);

    With :
    hImage HBITMAP
    [in] the bitmap handle containing QRCode figure,
    pCount int
    [out] the barcodes the function found and the number of the result returnd. The
    pointer need be allocate memory before calling the function.

    Thanks for helping me !

  2. #2
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    May 2012
    Location
    King's Landing
    Posts
    143
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Have you got any idea ?

  3. #3
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    May 2012
    Location
    King's Landing
    Posts
    143
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Really no idea ?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Maybe you should provide a link to the DLL file?

  5. #5
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the first parameter is a HBITMAP, then it's not just the file name of your bitmap file. You have to load the file using LoadImage() from the WINAPI. That function generates a handle (an ID number) to describe that image, and it's that number you then plug in to the hImage parameter.
    That second parameter is tricky to do in MMF presently. I suspect you'd have to call malloc(), which takes the number of bytes and returns the address assigned. That address is passed to your second parameter, which gets filled in by the QR function.

    When you're done with it, use free() to get rid of your int now it's no longer needed.

    How to read the int, however... Unless some extension exists to read data from a memory address. Which might well be possible.

    Anyway, malloc and free live in coredll.dll, and LoadImage is in user32.dll.

    What that highlights at any rate is how much need there is for a better integration with DLLs. Or just don't try, lol - MMF is great, but there are some things it just isn't meant to do

  6. #6
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    May 2012
    Location
    King's Landing
    Posts
    143
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dines View Post
    If
    Anyway, malloc and free live in coredll.dll, and LoadImage is in user32.dll.

    What that highlights at any rate is how much need there is for a better integration with DLLs. Or just don't try, lol - MMF is great, but there are some things it just isn't meant to do
    Ok, thank you very much for your help, but there are still some issues with the second argument : coredll.dll only works for mobile device ! Do you know an other DLL compatible with XP (or greater) which makes the same job ?
    Thank you !

  7. #7
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, try ole32.dll, using CoTaskMemAlloc() and CoTaskMemFree().

    You'll need to use the Memory Object extension to set and get the data in the memory region you've allocated.

    EDIT: Actually, there's no need. Use DLL Object's 'add integer buffer parameter' action for adding a pointer to an integer. That way you can avoid needing to use malloc and free.

Tags for this Thread

Posting Permissions

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