Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2007
    Posts
    11

    DLL call with multiple string parameters

    I'm having a lot of trouble with DLL.CallFunction when I pass multiply strings to the DLL. It seems that only the first one is actually passed.

    SF 7.0.6.1 code:
    Code:
    nReturn = DLL.CallFunction("C:\\EngDlx\\InstallDll_Dlx.dll", "InstallMonitor", "\"First String\", \"Second String\"", DLL_RETURN_TYPE_INTEGER, DLL_CALL_CDECL);
    The dll looks like:
    Code:
    extern "C" __declspec(dllexport) int InstallMonitor(LPTSTR pName, LPTSTR pFileName)
    { ...
    AfxMessageBox(pName);
    AfxMessageBox(pFileName);
    ...
    This first message box pops up with "First String" in it, the second message box pops up blank.

    I've also tested this with a dll function with 8 string parameters followed by one int parameter. The int parameter is passed with no problems, but only the first string parameter on the list of string parameters is passed.

    Is this a bug with DLL.CallFunction or am I missing something? I could always combine all the string parameters into one string parameter and then split it up in the DLL call, but this seems unnecessarily circuitous.

  2. #2
    Join Date
    Sep 2007
    Posts
    11
    I ended up combining all string parameters into one string separated by newline characters, then the DLL tokenizes the single string parameter.

    However, has anyone else run into this problem?

Similar Threads

  1. Jukebox Enhancements
    By Zylo in forum AutoPlay Media Studio 6.0
    Replies: 2
    Last Post: 01-13-2007, 07:39 PM
  2. Failed to call DLL function. (#2, Line 1)
    By fe4ther in forum Setup Factory 6.0
    Replies: 4
    Last Post: 01-14-2003, 08:01 PM
  3. SUF6 - Call DLL action
    By Romahe in forum Setup Factory 5.0
    Replies: 1
    Last Post: 11-27-2001, 06:02 AM

Posting Permissions

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