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

Services Multiple Dependencies.


1 reply to this topic

shetty

shetty
  • Members
  • 11 posts

Posted 12 February 2004 - 06:24

Hi,

Regarding the multiple Dependencies in INServ.ini. According to the description for the function CreateServiceA (in Advapi32.dll), it takes a pointer to a double-null terminated array of dependency names. Each dependency name is separated by single-null characters. You should use a character such as ‘|’ to separate dependency names in InServ.ini. Then, replace each ‘|’ with the null character '\0' in Service.rul.
Example:
[Service1]
.....
....
Dependencies="ABCD|XYZ|123ABC"
....
...

When i read this out, the string must be set as ABCD\0XYZ\0123ABC\0
But at the same the definition of STRING data type says :- However, InstallShield does not support multiple null terminated strings in the same string variable.

Please let me know if anybody is aware of using the multiple dependencies for services.

Shetty


Esquimaux

Esquimaux
  • Members
  • 17 posts

Posted 01 April 2004 - 17:53

Actually, the string should be "ABCD\0XYZ\0123ABC\0\0". Don't forget the double NULL at the end.

Initialize the string as "ABCD*XYZ*123ABC**" and then replace the '*' characters with '\0' characters.

Then, use ServiceAddService to create the service, or to update its values. Make sure you set the SERVICE_IS_PARAMS.lpDependencies value to "ABCD\0XYZ\0123ABC\0\0" before executing ServiceAddService.

Good Luck.
The Eskimo

"Evil shall come upon thee, which thou shalt not know how to deprecate"
- Robert Lowth, eighteenth-century Bishop of Winchester