Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Calling MSDE API from Install Script


1 reply to this topic

avrsa

avrsa
  • Members
  • 2 posts

Posted 23 January 2002 - 01:49

How do I call the MSDE 2000 API functions NumInstalledInstances and IsInstanceNameValid from Install script. I got the sample code from Microsoft  - which is written in C++.  I even copied the sample header files over to the Install Shield header directory.  I think I am pretty close to getting this work, but I am not quite there.

Has anyone had to do this?  Any suggestions.


brassrat

brassrat
  • Members
  • 11 posts

Posted 23 January 2002 - 03:26

i've been trying to use them via a c++ dll.  The issue has to do with sqdedev.dll. This dll must be in the search path otherwise the windows installer won't be able to load it. I don't know how the install script processor can be told to load a particular dll. Moreover, this dll is NOT necessarily present on the target machine - its actually installed as part of MSDE or SQL Server 2000 installation (sigh). So, you have to get the dll into your msi and have the script processor invoke funcitons in it. I don't know if you can just reference functions in sqdedev.dll directly, treating it as a 'standard-dll'. I decided to put the dll into the binary table and read it out using one of the 'streambinaryfile' examples i found at the beginning of the ui sequence.
I would sure appreciate a better approach, however.