Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2

Thread: DLL Usage Count

  1. #1
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863

    DLL Usage Count

    when a dll is "registered" with SetupFactory; it knows hte count of how many times it's "used"

    however, due to "runtime" files; we cannot register a file until after all other files have been installed & registered.

    This isn't a problem, we run regsvr32 "after install"

    however, UNINSTALL is the problem. How can we determine the usage count, decrement it; and if needed, delete the file if the usage count is now zero?

    Thanks
    -josh


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  2. #2
    Join Date
    Jan 2000
    Posts
    2,002

    Re: DLL Usage Count

    You could write a set of actions that get executed during uninstall that does the usage count manually using the Registry actions. The key that you want to poke around in is:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\SharedDLLs

    Basically, just get the value of your DLL by it's filename, decrement the number and determine if it is <= 0. IF so, unregister the DLL ("regsvr32.exe /u yourfile.dll"), delete the registry value, and delete the file. If it is still greater than 1, just leave everything as-is.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts