Announcement

Collapse
No announcement yet.

Trouble linking to DLL

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

  • Trouble linking to DLL

    Hi I'm new to the forums, but have been using PowerBASIC for the last 3 years. I'm using version 5 now.

    I'm trying to implement Maxim IC's 1 wire bus in my test system, but I can't link to the DLL successfully. I keep getting a ...

    "The procedure entry point GET_VERSION could not be located in the dynamic link library IBF32.DLL" error.

    Maxim assures me this a STD function call and I believe the syntax looks correct. I also used a program called DLL viewer to verify the functions are labeled as advertised. I'm having trouble uploading the IBF32.dll file, but I'll try harder if my source code checks out.

    Any help would be greatly appreciated.

    Thanks,
    -Ken
    Attached Files

  • #2
    These declares are for Visual Basic.

    You need to add ALIAS to your declares and use BYREF ASCIIZ instead of BYVAL STRING for asciiz strings, e.g.

    Code:
    DECLARE FUNCTION Get_Version LIB "IBFS32.DLL" ALIAS "Get_Version" (BYREF ID_buf AS ASCIIZ) AS INTEGER
    With the new declare, try:

    Code:
    LOCAL tmp AS ASCIIZ * 255
    Get_Version(tmp)
    Last edited by José Roca; 18 Feb 2009, 04:21 PM.
    Forum: http://www.jose.it-berater.org/smfforum/index.php

    Comment

    Working...
    X