PDA

View Full Version : More Newbie Question


smehaffie
07-13-2007, 12:32 AM
1) I want to get some information on a custom dialog box and then pass then use those values in a function I call in a dll written in C#. An example for this is getting SQL connection data from the user and then updating the app.setting file for the application. How can I do this?

2) Install SQL Express as an additional feature. The questions I have are: How to run an external application as a additional component and how to run multiple external files to do the same thing. Example: With SQL Express you need to uncompress the files and then run one of the files that were uncompresses to actually run the file. I know the commands to do this in a dependency file but not sure how to do this as a feature.

S. Shawn Mehaffie

P.S. I am evaluating whether this will work for a project I am working on so need some answer pretty quick.

Brett
07-16-2007, 05:04 PM
1) I want to get some information on a custom dialog box and then pass then use those values in a function I call in a dll written in C#. An example for this is getting SQL connection data from the user and then updating the app.setting file for the application. How can I do this?

You can create an edit field on a dialog using the dialog editor (Project > Dialogs). You assign a property name to the edit field. The property will then store the value entered by the user at runtime. As far as calling a C# dll, that is a bit tricky. In general, custom action DLLs should only be written in native C/C++, not managed .NET code. There are a variety of reasons for it - both practical and technical. Your best bet would be to create a C DLL to do the work.

2) Install SQL Express as an additional feature. The questions I have are: How to run an external application as a additional component and how to run multiple external files to do the same thing. Example: With SQL Express you need to uncompress the files and then run one of the files that were uncompresses to actually run the file. I know the commands to do this in a dependency file but not sure how to do this as a feature.

You should probably run the SQL Express installer from the bootstrapper.