Announcement

Collapse
No announcement yet.

Delphi DLL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bob Devine
    replied
    Lance - you're a star! Thanks, it works fine now. It's a while since I used my PB and I remember now being caught out with the case of the names in the past.

    Cheers

    Bob


    ------------------

    Leave a comment:


  • Lance Edmonds
    replied
    A missing export error usually means that the DLL is being found fine, but Windows is unable to resolve the target sub/function name within the DLL's export table.

    Unless you use an ALIAS clause in your DECLARE statement, PB will expect the exported name(s) in the DLL to be capitalized.

    ie,
    Code:
    ' psuedocode...
    DECLARE FUNCTION myfunc LIB "Mylib.DLL" _
        (params) AS LONG ' name expected to be "MYFUNC"
    
    DECLARE FUNCTION myfunc LIB "Mylib.DLL" [b]ALIAS "MyFunc"[/b] _
        (params) AS LONG ' name expected to be "MyFunc"
    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Bob Devine
    started a topic Delphi DLL

    Delphi DLL

    I want to call a Delphi DLL from one of my PB DLLs. Two longs are passed to the DLL function. I'm using the skeleton app to test it but when I start it up I get a message that skeleton.exe is linked to missing export DCURVPRT.DLL:CHECKREGISTRATION2

    I've tried all sorts of combinations in the Declare statement, and have even moved the DLL into the same folder - anyone got any pointers to getting this to work?

    Thanks for any help

    Bob Devine
Working...
X