Calling DLL with several data fields in output params

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Java script Dude

    #1

    Calling DLL with several data fields in output params

    Hi,

    I basically need to write a script that will make calls to a DLL and
    parse the return result for API calls that consist of several data
    fields in the input and output parameters.

    [Questions]
    [q1] Is ctypes the right Python library to use for this interaction.
    .. . . . . I know about calldll but it seems quite poorly documented.
    [q2] Are there any existing windows DLLs that one could use to build
    simplified test code.
    .. . . . . One that has several input and output parameters and playing
    with it will not kill my system.
    .. . . . . Also, I'd rather not have to learn how to write a DLL to
    build a test case.

    BTY - I have not decided on the language yet but would love to do this
    in Python. Although, I am considering writing in C++ (me_b_newbie) -or-
    JNI (it_b_ugly) -or- Obj-C (it_b_cool). MS languages are not an option
    in my book :}

    Thanks,
    JsD

  • Peter Hansen

    #2
    Re: Calling DLL with several data fields in output params

    Java script Dude wrote:[color=blue]
    > I basically need to write a script that will make calls to a DLL and
    > parse the return result for API calls that consist of several data
    > fields in the input and output parameters.
    >
    > [Questions]
    > [q1] Is ctypes the right Python library to use for this interaction.
    > . . . . . I know about calldll but it seems quite poorly documented.[/color]

    ctypes replaces and improves on calldll, which whether poorly documented
    or not is unsupported. It can do whatever you need.
    [color=blue]
    > [q2] Are there any existing windows DLLs that one could use to build
    > simplified test code.[/color]

    Can't help you. There are obviously many windows DLLs in existence, and
    any one of them might be suitable to you, but you'll have to judge that
    yourself.

    Why wouldn't you just use the target DLL that you already have?

    -Peter

    Comment

    • Java script Dude

      #3
      Re: Calling DLL with several data fields in output params

      >Why wouldn't you just use the target DLL that you already have?

      Still in the process of getting the software from the vendor.

      However, I have had luck in playing around with win32 api and am now
      getting the hang of using ctypes.

      Looks like I am going down the Python road.

      Thanks for the info :]

      JsD

      Comment

      Working...