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

ISWI Automation from VC++?


3 replies to this topic

Scott H

Scott H
  • Members
  • 3 posts

Posted 20 August 2001 - 21:42

Hi,

I have the InstallSHield automation objects working fine from VB, and _nearly_ working from C++ (MS).  SaveProject(), though, gives me an AV every time, although I'm able to OpenProject() and Set/Get properties, etc.  I'm using ISWI 2.03.

Anyone have success under C++?

Thanks,
ScottH


Kelly Lawson

Kelly Lawson
  • Members
  • 12 posts

Posted 24 August 2001 - 18:50

I'm working on this right now, I currently get an access violation when I try to open a project, not when i try to close one.  I've gotten this working fully under Delphi, but I've been having serious problems with VC++.  I'm using ISWI 1.52, and I had to get an idl file from OLEView, then edit it a little bit and compile it in my project to create a header and _i.c file.  With ISWI 2.03, have you had to edit your .idl at all?  Did the OpenProject call work without any monkeying around?  Does the interface call from your .idl look anything like this:
       [id(0x60030016), helpstring("ISWi Project file")]
       HRESULT OpenProject(
                       [in] BSTR strISWiProjectFile,
                       [in, optional, defaultvalue(0)] VARIANT_BOOL bReadOnly
                       [out, retval] long* );

Thanks.


Scott H

Scott H
  • Members
  • 3 posts

Posted 06 September 2001 - 22:03

Sorry so long getting back to the thread.  I've been "out" ;-).

We got ours working.  The solution was to use a fully-qualified path for the filename when opening the .ism to begin with; when we did that, the AV on SaveProject() disappeared.  Simply loading the filename from the current directory with a command-line app resulted in the AV on SaveProject().

No further problems, from VB, Delphi, VC++, or Perl -- it all seems to be working fine.

We haven't edited anything; I cheated, and created the classes (and a .tlh file) using VC's ClassWizard.  I haven't used 1.52 -- there could be problems with it that I haven't faced :-).

Scott H.