Reply to Thread

Post a reply to the thread: How to receive a value from a dll?

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 06-12-2007, 02:25 AM
    Mauricio

    Re: How to receive a value from a dll?

    Hi Friedrich,
    ok, no problem, it will be easy for me to change the function.
    Thanks for your help.

    Mauricio
  • 06-12-2007, 02:09 AM
    linder

    Re: How to receive a value from a dll?

    Mauricio,

    How would you handle the above with the Clarion CALL() procedure or the Windows RunDll32 technique?

    The return data type is always a numeric value.

    I would suggest to change this (in your DLL) to:

    MCS_Encrypt(STRING,STRING,*STRING),LONG

    I think we could add a feature so the return value could be a pointer to the buffer. But I think it's not really required.

    Friedrich
  • 06-12-2007, 01:40 AM
    Mauricio

    Re: How to receive a value from a dll?

    Hi Friedrich,
    no, the prototype of my Clarion function is MCS_Encrypt(STRING,STRING),STRING. It receives 2 parameters and returns a string that I have to save to %MCS_PASSWORD%. In Clarion I would do this:

    MCS_PASSWORD = MCS_Encrypt(MCS_CLAVE, MCS_PASSWORD).

    Thanks again.

    Mauricio
  • 06-11-2007, 08:18 AM
    linder

    Re: How to receive a value from a dll?

    Mauricio,

    If the DLL returns a value in the second parameter then it should be prototyped as (STRING, *STRING).

    There is a similar function call in the "Call Dll.sb6" script example.

    HTH,
    Friedrich
  • 06-11-2007, 07:05 AM
    Mauricio

    How to receive a value from a dll?

    Hi all,
    Following with my first script I need to encrypt a variable. I created a dll with a function, MCS_Encrypt and I call it in this way:

    Call DLL "c:\Wsource\NEW_MCS_TEST\dlls\encrypt_test.dll " -- Function "MCS_Encrypt" (STRING,STRING) (%MCS_CLAVE%,%MCS_PASSWORD%)

    The function returns a string and I would like to store this value in a variable (and then assign to %MCS_PASSWORD%).

    I know that the prototype for my function could be (STRING, *STRING) but, for other reason, I can't use it.

    Thanks in advance.

    Mauricio

Posting Permissions

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