This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to call DLL function from Setup.Rul file.
Subscribe
- 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
Jun 22, 2012
05:50 AM
How to call DLL function from Setup.Rul file.
How to Call DLL function from Setup.rul file.
I have code block for call DLL function. but my DLL structure is completed.
DLL Name :- MyConnectionManager.DLL
I want to call below function :-
public void StoreConnectionStringParts(string connectionName, string serverName, string database, bool integratedSecurity, [string userName = null], [string password = null])
Member of New.Utility.Database.ConnectionManagement.ConnectionManager
How I call this method ?
I am using below code block but it is not working.
UseDLL( svConnMgrDir ^ "MyConnectionManager.dll" );
MyConnectionManager.StoreConnectionStringParts(parameter value);
UnUseDLL( svConnMgrDir ^ "MyConnectionManager.dll" );
If I used dot then also It not allowing. What to do in this case ?
Thank you.
I have code block for call DLL function. but my DLL structure is completed.
DLL Name :- MyConnectionManager.DLL
I want to call below function :-
public void StoreConnectionStringParts(string connectionName, string serverName, string database, bool integratedSecurity, [string userName = null], [string password = null])
Member of New.Utility.Database.ConnectionManagement.ConnectionManager
How I call this method ?
I am using below code block but it is not working.
UseDLL( svConnMgrDir ^ "MyConnectionManager.dll" );
MyConnectionManager.StoreConnectionStringParts(parameter value);
UnUseDLL( svConnMgrDir ^ "MyConnectionManager.dll" );
If I used dot then also It not allowing. What to do in this case ?
Thank you.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 19, 2012
02:08 PM
I am trying to call a method from a DLL as well. Looks like we are on the same page with the InstallScript code. One thing that I read is that you need to make sure the install has access to the DLL (put it in support files) and the first thing to do before calling UseDLL is ChangeDirectory.
My DLL is in the Support Files, so my call looked like this:
if ( ChangeDirectory(SourceDir) < 0 ) then
MessageBox("Error changing to the Source Directory", SEVERE);
endif;
You should replace SourceDir with svConnMgrDir. What I haven't been able to get to work is calling the method.
HTH though 🙂
My DLL is in the Support Files, so my call looked like this:
if ( ChangeDirectory(SourceDir) < 0 ) then
MessageBox("Error changing to the Source Directory", SEVERE);
endif;
You should replace SourceDir with svConnMgrDir. What I haven't been able to get to work is calling the method.
HTH though 🙂
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)