Hello,
We require to use a COM dll in Installscript. One of the COM functions expects a structure to be passed as an input parameter. In the script, i declare a structure which has exactly the same members as defined in the COM dll.
I initialize the members of the structure and pass the structure as an input argument to the COM dll.
I get the following error:
Error number = -2147024809
Error description = The parameter is incorrect
The structure is declared in the COM dll as follows:
typedef /* [public][public] */ struct __MIDL___MIDL_itf_NetIQXMLParser_0000_0000_0001
{
BSTR Name;
BSTR Machine;
BSTR Version;
BSTR HotFix;
BSTR DateApplied;
int Status;
} ComponentStruct;
My structure in installscript is as follows:
typedef ComponentStruct1
begin
STRING Name[1024];
STRING Machine[1024];
STRING Version[1024];
STRING HotFix[1024];
STRING DateApplied[1024];
int Status;
end;
Where am i going wrong?
Help please. I am stuck on this from teh past few days and i have to finish this in a day or two.
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.
Problem using COM dll in installscript
Started by
kirann_hegde
, Dec 03 2009 07:41
3 replies to this topic
Posted 04 December 2009 - 15:24
I never passed a structure to a DLL call, so my only suggestion is to do a process of elimination to determine the source of the problems.
For example, try passing a BSTR outside of a structure, try passing the individual elements instead of a structure, etc.
Good luck and hope it helps.
For example, try passing a BSTR outside of a structure, try passing the individual elements instead of a structure, etc.
Good luck and hope it helps.
Posted 05 December 2009 - 07:39
Passing individual elements does help. HOwever i wanted to know if there was a way to pass a structure directly, as the InstallShield documentation mentions that it is supported. However one of the InstallShield engineers replied stating that its not supported in this version.
Take a look at this:
http://community.fle...ad.php?t=191305
At the same time, i also came across a link which suggests what should be done to facilitate passing of structure from automation clients to COM dlls
http://vcfaq.mvps.org/com/4.htm
Thanks for your help anyways.
Take a look at this:
http://community.fle...ad.php?t=191305
At the same time, i also came across a link which suggests what should be done to facilitate passing of structure from automation clients to COM dlls
http://vcfaq.mvps.org/com/4.htm
Thanks for your help anyways.