- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: usedll() not working after migration
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hello,
We have migrated from Installshield 2014 to Installshield 2019.
We are using usedll() to load a dll using supportdir folder. It was working with old release which was created with IS 2014.
After migration to IS 2019, we are getting error
unable to load <dll path>/dllname.
Please suggest on this.
Thanks.
Sumit
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @theone_sumit ,
Can you post the script here that you are currently having which uses UseDll()?
You can try the below code as well:
NUMBER nResult; ... ChangeDirectory(SUPPORTDIR); nResult=UseDLL(SUPPORTDIR^"Sample.dll"); if (nResult<0) then MessageBox("Fail: "+SUPPORTDIR^"Sample.DLL", 0); SprintfBox(INFORMATION, "Debug", "Err.Number= %d", Err.Number); else MessageBox("Success [Sample.dll]",0); UnUseDLL("Sample.dll"); endif;
The above snippet can give you more detail about error number.
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @theone_sumit ,
Can you try with "SetDllDirectory" to add the SUPPORT directory to your search path in your script?.It is as part of enhancement which got added in InstallShield 2018 release-please refer
After this call,you can call Usedll function so that SUPPORTDIR will be added to the search path.
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hello Jennifer,
We have tried this solution. However, still facing the issue.
Are there any other things we need to configure ?
Thanks,
Sumit
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @theone_sumit ,
Can you post the script here that you are currently having which uses UseDll()?
You can try the below code as well:
NUMBER nResult; ... ChangeDirectory(SUPPORTDIR); nResult=UseDLL(SUPPORTDIR^"Sample.dll"); if (nResult<0) then MessageBox("Fail: "+SUPPORTDIR^"Sample.DLL", 0); SprintfBox(INFORMATION, "Debug", "Err.Number= %d", Err.Number); else MessageBox("Success [Sample.dll]",0); UnUseDLL("Sample.dll"); endif;
The above snippet can give you more detail about error number.
Thanks,
Jenifer