• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X Scripting - Skill
  3. how can load the Dll files and use it?

Stats

  • Replies 5
  • Subscribers 17
  • Views 11988
  • Members are here 0
More Content

how can load the Dll files and use it?

Roser
Roser over 6 years ago

Hi all

I had tried to use dll files ,but I can only load dll file is the example file named "axlecho_plugin.dll", and the others dll files I  created can't be load ,

this is the codes:

dll_name="dllcreate"

testDll=axlDllOpen(dll_name)

when run over this function ,awlayw return nil except dll_name="axlecho_plugin".

but all Dll files are the same path.and No waring and Error when create the dll files.

what wrong with it ? and how can i do to void this issue, thanks !

  • Cancel
  • Sign in to reply
  • eDave
    eDave over 6 years ago

    Here is a function I have used in the past:

    defun( DE_pluginsLoad (pluginName, pluginSymsList)
    prog((dllLib, symName); pluginName
    dllLib = axlDllOpen(pluginName); load dll library
    if(dllLib then
    foreach(symList, pluginSymsList
    symName = cadr(symList)
    set(car(symList), axlDllSym(dllLib, symName))
    unless(eval(car(symList)), axlMsgPut(list(lsprintf("'%s' symbol not present in %s Dll", symName, pluginName), 2)), axlDllClose(dllLib), return())
    )
    else printf("Can't find %s Dll\n" pluginName), return()
    )
    return(dllLib)
    ))

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Roser
    Roser over 6 years ago in reply to eDave

    Hi Dave, the function called  axlDllOpen  ,it's return value already correct,

    but how can i pass the parameters to dll's function?

    the C++ code for test is below:

    int numberAdd(&a,&b) 

    {return a+b;

    }

    The skill code is below:

    defun( testdll()

    dll_name="mydll"

    dll_lib=axlDllOpen(dll_name)

    if(dll_lib then

    printf("Opening %s.dll\n" dll_Name)

    dll_Add = axlDllSym(dll_lib "Add")

    printf("\nExample of axlDllCall with 1 of each argument\n")

    ret = axlDllCall(dll_Add 3 4)

    printf("Return  %L\n" ret)

    else

    printf("Can't find %s.dll\n" dll_Name)

    )

    )

    is this Codes right? could you give me any advice?Thk 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 6 years ago in reply to Roser

    Sorry. I have't used this for years.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • koffeekingston
    koffeekingston over 6 years ago in reply to Roser

    If you are unable to do so then you need to install some plugin so that there won't be DLL error, so far dell printer error 016-302 helped me to get the solution of this.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Hoangkhoipcb
    Hoangkhoipcb over 1 year ago

    Hi Roser!

    You can refer in this shown.

    HoangKhoi.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information