Pass string's pointer in CallDLL function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • sonysys
    Forum Member
    • Sep 2003
    • 1

    Pass string's pointer in CallDLL function

    I wonder that Is there anyway to pass the string's pointer in parameter to CallDLL function in SUF6?

    For example:

    Function Prototype
    int myfunction(char *str, int i)

    In Setup factory
    CallDLL Function(%DLLResult%=c:\mydll.dll: myfunction(%myparam%,255))

    The content of variable %myparam% will be modified during execution myfunction

    I alway get an error "Memory write error at location 0x00000000..."

    I would greatly appreciate any help.
    Thank you.
  • Brett
    Indigo Rose Staff Member
    • Jan 2000
    • 2001

    #2
    Re: Pass string's pointer in CallDLL function

    It should work find passing a string to the DLL. Just make sure that the DLL does not try to free the char* memory. This will cause heap problems.

    Comment

    Working...
    X