Results 1 to 2 of 2

Thread: Function Pointers and Owner

  1. #1
    Member
    Real Name
    Matt Bavis
    Join Date
    Mar 2008
    Posts
    45

    Default Function Pointers and Owner

    I am working with a DLL that is used to validate a data record. The function provides results to a callback function. In order to retrieve the results I need to provide as parameters, a Callback Owner and a Callback function pointer. The function owner in other languages would be "this" or "Self" or "Myself". Does anyone know of a pointer that could be used as the owner for code written in XBasic? Also how do I define a function pointer? Should I be able to pass the name of my function as a parameter, or is there a different way to create a pointer to my function.
    Any information or references are appreciated.

    Thanks,
    Matt

  2. #2
    Member
    Real Name
    Matt Bavis
    Join Date
    Mar 2008
    Posts
    45

    Default Re: Function Pointers and Owner

    In case anyone runs into this issue, it looks like this is not possible with Xbasic. I received the following response from Greg @ Alpha.

    "I asked around and it sounds like there is no way to pass a pointer to an XBasic function to a DLL, but that it should be possible to pass a function pointer created by another DLL into the first one. Essentially you'd need to create a DLL with a method that returns the function pointer you need. You'd then call that from XBasic (getting your function pointer) and then pass the result as one of the parameters to the DLL you are interfacing with."

Similar Threads

  1. Owner - retired
    By Verne in forum Application Server Version 9 - Web/Browser Applications
    Replies: 3
    Last Post: 01-14-2018, 02:42 AM
  2. Pointers - Working with pointers returned from <TBL>.FIELD.GET()
    By SNusa in forum Alpha Five Version 11 - Desktop Applications
    Replies: 27
    Last Post: 02-06-2013, 09:31 AM
  3. Understanding Pointers passed to a function
    By boba in forum Application Server Version 9 - Web/Browser Applications
    Replies: 3
    Last Post: 07-18-2008, 04:49 PM
  4. Owner Draw
    By dik_coleman in forum Alpha Five Version 5
    Replies: 3
    Last Post: 08-02-2004, 07:08 PM
  5. Function returning pointers
    By michaelklein in forum Alpha Five Version 5
    Replies: 13
    Last Post: 04-30-2004, 08:51 AM

Bookmarks

Posting Permissions

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