Good evening Mr the gurus,
I have a DLL that contains a CA. This DLL will need to call another DLL, which is supplied by a third-party and that I can't modify.
I have tried simply adding the second DLL to the BinaryTable but of course it didn't work; MSI outputs binaries with temporary encoded names (idb?).
What should I do?
Thanks.
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.
Chained DLL
Started by
mrouthier
, Mar 19 2002 04:05
3 replies to this topic
Posted 19 March 2002 - 09:56
You need to use the msi database commands to read the second dll out of the binary table into a temporary location. You can then call it.
In outline
hDatabase = MsiGetActiveDatabase(hInstaller)
MsiDatabaseOpenView(hDatabase,
"SELECT * FROM Binary WHERE Name='BinaryName'"
&hView);
MsiViewExecute(hView, 0);
MsiViewFetch(hView, &hRecord);
Count = MsiRecordDataSize(hRecord,2);
// This is ok for smalll files otherwise we will need to
// iterate.
pBuffer = malloc(Count);
MsiRecordReadString(hRecord,
2,
pBuffer,
&Count);
Now you can write pBuffer out to a file. Do not forget to close all the handles and add error checking.
Hope this helps
In outline
hDatabase = MsiGetActiveDatabase(hInstaller)
MsiDatabaseOpenView(hDatabase,
"SELECT * FROM Binary WHERE Name='BinaryName'"
&hView);
MsiViewExecute(hView, 0);
MsiViewFetch(hView, &hRecord);
Count = MsiRecordDataSize(hRecord,2);
// This is ok for smalll files otherwise we will need to
// iterate.
pBuffer = malloc(Count);
MsiRecordReadString(hRecord,
2,
pBuffer,
&Count);
Now you can write pBuffer out to a file. Do not forget to close all the handles and add error checking.
Hope this helps
Posted 21 March 2002 - 10:11
Glad to help.
In case anybody else reads the above. MsiRecordReadString should be MsiRecordReadStream.
Sorry for any inconvenience that may of caused.
In case anybody else reads the above. MsiRecordReadString should be MsiRecordReadStream.
Sorry for any inconvenience that may of caused.