lucky34238
Programmer
Can anyone convert this vc++ to Delphi?
Thank you.
-------------------------------
#include <windows.h>
#include <msi.h>
#include <ostream.h>
const char *Word = "{CC29E963-7BC2-11D1-A921-00A0C91E2AA2}";
const char *Excel = "{CC29E96F-7BC2-11D1-A921-00A0C91E2AA2}";
const char *PowerPoint = "{CC29E94B-7BC2-11D1-A921-00A0C91E2AA2}";
const char *Access = "{CC29E967-7BC2-11D1-A921-00A0C91E2AA2}";
const char *Office = "{00000409-78E1-11D2-B60F-006097C998E7}";
int main(void)
{
DWORD size = 300;
INSTALLSTATE installstate;
char *sPath;
sPath = new char[size];
installstate = MsiGetComponentPath(
Office,Word,sPath,&size);
if ((installstate == INSTALLSTATE_LOCAL) ||
(installstate == INSTALLSTATE_SOURCE))
cout << "Installed in: " << sPath << endl;
delete sPath;
return 0;
}
Thank you.
-------------------------------
#include <windows.h>
#include <msi.h>
#include <ostream.h>
const char *Word = "{CC29E963-7BC2-11D1-A921-00A0C91E2AA2}";
const char *Excel = "{CC29E96F-7BC2-11D1-A921-00A0C91E2AA2}";
const char *PowerPoint = "{CC29E94B-7BC2-11D1-A921-00A0C91E2AA2}";
const char *Access = "{CC29E967-7BC2-11D1-A921-00A0C91E2AA2}";
const char *Office = "{00000409-78E1-11D2-B60F-006097C998E7}";
int main(void)
{
DWORD size = 300;
INSTALLSTATE installstate;
char *sPath;
sPath = new char[size];
installstate = MsiGetComponentPath(
Office,Word,sPath,&size);
if ((installstate == INSTALLSTATE_LOCAL) ||
(installstate == INSTALLSTATE_SOURCE))
cout << "Installed in: " << sPath << endl;
delete sPath;
return 0;
}