cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
theone_sumit
Level 4

usedll() not working after migration

Jump to solution

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

Labels (1)
0 Kudos
(1) Solution

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

View solution in original post

0 Kudos
(3) Replies
Jenifer
Flexera Alumni

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

https://helpnet.flexerasoftware.com/installshield24helplib/rn/ReleaseNotes.htm#isreleasenotes_2630790174_1049156

After this call,you can call Usedll function so that SUPPORTDIR will be added to the search path.

 

Thanks,

Jenifer

0 Kudos

Hello Jennifer,

 

We have tried this solution.  However, still facing the issue.
Are there any other things we need to configure ?

 

Thanks,

Sumit

0 Kudos

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

0 Kudos