This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: msiviewclose returns error
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
09:42 AM
msiviewclose returns error
For retrieving information out of the msi tables during the current setup run, we do these handlings:
msidatabaseopenview => returns hView
msiviewexecute(hView, 0)
while msiviewfetch(hView, hRec)
//do something
endwhile
msiclosehandle(hRec)
msiviewclose(hView)
msiclosehandle(hView)
As we upgraded from InstallShield 11 to InstallShield 2008, we always get returncode 6(ERROR_INVALID_HANDLE) when we try to close the view(msiviewclose(hView)). The 2 other close calls return '0'(ERROR_SUCCESS).
We didn't change anything on the code between using InstallShield 11 and InstallShield 2008. In InstallShield 11, this worked fine.
Does anyone know if there is something changed on the msiviewclose call in Installshield 12(didn't used this release) or Installshield 2008??
Is it maybe not necessary anymore to close the executed database view(by calling msiviewclose) seperately?
Thanks in advance...
msidatabaseopenview => returns hView
msiviewexecute(hView, 0)
while msiviewfetch(hView, hRec)
//do something
endwhile
msiclosehandle(hRec)
msiviewclose(hView)
msiclosehandle(hView)
As we upgraded from InstallShield 11 to InstallShield 2008, we always get returncode 6(ERROR_INVALID_HANDLE) when we try to close the view(msiviewclose(hView)). The 2 other close calls return '0'(ERROR_SUCCESS).
We didn't change anything on the code between using InstallShield 11 and InstallShield 2008. In InstallShield 11, this worked fine.
Does anyone know if there is something changed on the msiviewclose call in Installshield 12(didn't used this release) or Installshield 2008??
Is it maybe not necessary anymore to close the executed database view(by calling msiviewclose) seperately?
Thanks in advance...
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
11:50 AM
This issue is due to how InstallScript manages MSI handles returned from certain MSI functions. If I remember correctly, this should be resolved in IS 2009. In 2008 and previous versions, you can work around this issue and not leak any handles by calling MsiCloseHandle instead of MsiViewClose to close the view handle.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 23, 2009
02:30 AM
Josh,
so when I download and try the 2009 evaluation version I shouldn't see this problem occuring anymore? Or is there a difference between the 2009 full and evaluation version?
Thanks
so when I download and try the 2009 evaluation version I shouldn't see this problem occuring anymore? Or is there a difference between the 2009 full and evaluation version?
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 23, 2009
12:45 PM
After double-checking this, the issue will still occur in IS 2009. You can reference work order number IOC-000080530 to track this issue. This should be fixed in the next release of InstallShield.
You can work around this behavior by passing the absolute value of the view handle to MsiViewClose, or do not call MsiViewClose (calling it is only necessary if you are going to execute the view again without having already fetched all the records from the view).
You can work around this behavior by passing the absolute value of the view handle to MsiViewClose, or do not call MsiViewClose (calling it is only necessary if you are going to execute the view again without having already fetched all the records from the view).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2009
06:37 AM
Josh,
just verified it.
Passing the absolete value of the handle to msiviewclose works fine.
I defined a flag to enable the workaround.
When the new installshield 2010 version arrives, I test again the original code.
Thx for the tip...
just verified it.
Passing the absolete value of the handle to msiviewclose works fine.
I defined a flag to enable the workaround.
When the new installshield 2010 version arrives, I test again the original code.
Thx for the tip...