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.

Problem using COM dll in installscript

3 replies to this topic


  • Full Members
  • 93 posts

Posted 03 December 2009 - 07:41


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
STRING Name[1024];
STRING Machine[1024];
STRING Version[1024];
STRING HotFix[1024];
STRING DateApplied[1024];
int Status;

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.


  • Full Members
  • 93 posts

Posted 04 December 2009 - 06:56

Any ideas here?

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

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.
user posted image


  • Full Members
  • 93 posts

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:

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

Thanks for your help anyways.