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: GetFileInfo using FILE_SHARED_COUNT constant always returns -1
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
‎Dec 04, 2015
02:41 PM
GetFileInfo using FILE_SHARED_COUNT constant always returns -1
I'm having difficulty getting the shareddll reference count for a file that is installed on my machine. In the registry the reference count for this particular file is 3. When I call this function it is always returning -1. Here's how I am calling it:
What am I doing wrong?
NUMBER nCount, rnVal;
STRING sCount, fileToCheck;
begin
fileToCheck = CommonFiles64Folder ^ "MyCompany\\myfile.dll";
rnVal = GetFileInfo (fileToCheck, FILE_SHARED_COUNT, nCount, sCount);
What am I doing wrong?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 07, 2015
09:59 AM
I think the function, at least as it relates to getting FILE_SHARED_COUNT, is meant for Installscript projects, not basic msi, which is the project type I'm working with. That's unfortunate.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 11, 2015
11:02 AM
You can always make a CA that calls a batch file. Find what you need in
HKLM\SOFTWARE\[Wow6432Node\]Microsoft\Windows\CurrentVersion\SharedDLLs YourAppHere
Or use PowerShell if you prefer that.
HKLM\SOFTWARE\[Wow6432Node\]Microsoft\Windows\CurrentVersion\SharedDLLs YourAppHere
Or use PowerShell if you prefer that.
