Dll issue while launching the application

I am using one dll in my application for including the functionality provided by that dll . This dll i am getting after installing one msi . But in my application i have a requirement like if the user has not installed that msi then we have to show one warning message(e.g msi has not installed , code for this i have implemented in the main() of my application ) and have to exit from the application .

But the problem is if the user has not installed the msi , then while launching the application itself its showing one error message since its not able to get the dll and this time control not even coming to my main() where i have written the code for this msi checking (through registry entry).

Is there any efficient way to resolve this issue ..
It looks like you're statically binding to the DLL, and your program is trying to load the DLL at program load time.

You should bind to it statically (with LoadLibrary/GetProcAddress or COM). That way you can detect the DLL's presence at runtime.
can u plz share some code how to do this ?

In your 1st sentence you have mentioned that i am statically binding to the dll and in 2nd sentence you have said i should bind to it statically ..i am not getting what you are saying .
The contents of above link is littlebit complex .. can u please give me some easy hint on it ?
What MSI is this ? I suggest you create a small stub that looks in the registry for msi presence and then launch or not your main program.
Thankx i got it ..i have to create one package which contains my application exe and one general exe and before launching my application i have to call that general.exe 1st that will check whether the msi is present or not , accordingly i have to call my application.exe . Is my understanding correct ?
Yes, this is correct. Usually 1st exe task could be done by your installer program (both NSIS and InnoSetup have APIs for this kind of tasks). You could also provide a link to msi webpage to download if it is not installed.
Topic archived. No new replies allowed.