Results 1 to 8 of 8

Thread: Custom DLL - User Interaction

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Custom DLL - User Interaction

    I have a custom DLL with a number of procedures I am calling from a SB7
    script.
    Does anyone know if there is a problem with opening a window in a Custom
    DLL that gets interaction from the user (ie, the user presses a button or
    enters text and presses a button)?
    My SB program is GPFing after calling my custom dll if I prompt the user to
    interact with a window.

    I have a tested a number of scenarios.
    1) I have a Clarion window open and do something on Event:OpenWindow and
    then exit the window after the task so the user never interacts with the
    window. This works fine.
    2) Open the window and allow the user to enter a field and press OK. This
    is GPFing.
    3) Open the same window and press cancel. This is GPFing. There is no code
    in the Cancel button except Post(Event:CLoseWindow)
    4) hard-code the value the user is entering in the window and perform the
    operations (in Clarion) without opening the window. This works fine.

    This is completely source. The window is very simple:

    I just noticed that none of the example DLL SB projects have a Clarion
    window with Accept loop. There are some MESSAGE statements but no accept
    loops.
    Is this a limitation of the DLL interface? If so, no problem I can rework
    to prompt the user for the values in the SB interface and pass the values
    to the DLL. I wanted to check here before taking that option.

    I'm using SB 7.2860 and Clarion 6.3.9058. As I mentioned other functions
    form the DLL work fine and if I call this same function in a
    non-interactive way it is fine.

    Any pointers would be great.

    Thanks,
    Rick

  2. #2

    Default Re: Custom DLL - User Interaction

    What is the line of script you are using to call the DLL?

    --
    Russell B. Eggen
    www.radfusion.com
    Clarion developers: www.radfusion.com/devs.htm

  3. #3

    Default Re: Custom DLL - User Interaction

    > What is the line of script you are using to call the DLL?
    >

    Call DLL "%TMPDIR%\sbdll_support.dll" -- Function "VALIDSQLCONNECTION"
    (*CSTRING,*CSTRING,*CSTRING,*LONG, LONG)
    (%SQLINSTANCE%,%_SB_INSTALLDIR%,%PRODUCTVER%,%FOUN DDB%,1)

    Rick Martin

  4. #4

    Default Re: Custom DLL - User Interaction

    Sorry, the prototype of the procedure is:
    ValidSQLConnection PROCEDURE (*CSTRING pSQLServer, *CSTRING pPath, *CSTRING
    pProductVersion, *LONG pFoundDB, LONG pQuiet) !,LONG,PASCAL ! Generated
    from procedure template - Window

    Rick Martin

  5. #5

    Default Re: Custom DLL - User Interaction

    We have one window where the user can press a button.

    Haven't heard of a crash.

    Nothing fancy at all.


    Jeff Slarve

  6. #6

    Default Re: Custom DLL - User Interaction

    Hi Rick,

    > I just noticed that none of the example DLL SB projects have a Clarion
    > window with Accept loop. There are some MESSAGE statements but no accept
    > loops.
    > Is this a limitation of the DLL interface? If so, no problem I can rework
    > to prompt the user for the values in the SB interface and pass the values
    > to the DLL. I wanted to check here before taking that option.

    Here is a Clarion example with an ACCEPT LOOP:

    Binary:
    http://www.lindersoft.com/projects/M...ll_Dll_Exe.zip

    Source Codes:
    http://www.lindersoft.com/projects/M...ll_Dll_Src.zip

    By the way, IIRC, Clarion DLLs with a "TIP" attribute on a BUTTON can cause
    a stack-corruption.

    Does this help?

    Friedrich

  7. #7

    Default Re: Custom DLL - User Interaction

    >
    > By the way, IIRC, Clarion DLLs with a "TIP" attribute on a BUTTON can cause
    > a stack-corruption.
    >

    Friedrich,
    You da man. It was a TIP on an ENTRY control.
    I don't how I would have found that. Perhaps something could be added to
    FAQs?

    Thanks,
    Rick

  8. #8

    Default Re: Custom DLL - User Interaction

    Dang.

    Jeff Slarve

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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