topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 11:43 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: What are these dll files used for?  (Read 6312 times)

Huidong

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
What are these dll files used for?
« on: August 05, 2011, 07:57 PM »
I have been wondering what CloseApp.dll, CloseApp2.dll, and DcMouseHk.dll are used for. But I did figure out that DcKeyHk.dll is necessary for the shortcut key to work. Could you please tell the function of these dll files? Thank you.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: What are these dll files used for?
« Reply #1 on: August 05, 2011, 08:03 PM »
Hi Huidong.

the mousehook and keyhook are actually ONLY used in redbox capture mode -- which is optional, and is used to capture regions in windows and menus, and scrolling windows.  they are not loaded until these modes trigger.

closeapp.dll and closeapp2.dll are identical dlls and their only purpose and use is to close an already running version of screenshot captor when the setup installer needs to shut down the application to install an update, or before uninstalling.   The reason there are 2 is that i couldn't find a way to just use 1 with the inno setup installer in both the cases of install and uninstall.

you can see i tried to name them appropriately :)

if you are concerned about them, know that they are all compiled by me personally.  and if you wanted you could delete them, you just wouldn't be able to use red box capture mode in screenshot captor, and you'd have to make sure you manually exited the program from the tray before running update or uninstalling.

Huidong

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: What are these dll files used for?
« Reply #2 on: August 05, 2011, 08:31 PM »
Hi mouser,

Thank you for the clarification. I was just curious, not concerned at all. The red-box capture is one of those highlights that make SC outstanding and unique, so I would definitely keep the two hooks. But I will describe by the way some inconvenience with the hook. Using Windows 7, I always run SC with the highest privilege otherwise I guess it can't capture windows associated with elevated processes (correct me if that's not the case). However, this brings a problem when using the two hooks: they do not work when (elevated) SC tries to capture a window associated with a process that's not elevated. Of course a workaround is to click on the gear button to capture, but rather inconvenient. I wonder if there's some fix for this issue?

The other trivial point, I set the capture folder to somewhere, but SC still creates a folder named "Screenshots" in the program directory, I wonder if this can be avoided?

Thank you very much.

Huidong

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: What are these dll files used for?
« Reply #3 on: August 05, 2011, 08:34 PM »
but SC still creates a folder named "Screenshots", I wonder if this can be avoided?

hmm that shouldn't happen if it can write into the directory you specify.. ill explore that and the other issue on my windows 7 vmware and see if i can get a clue about it.

Huidong

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: What are these dll files used for?
« Reply #4 on: August 05, 2011, 08:44 PM »
By the way, I use SC in portable mode and its directory is not %ProgramFiles%\. Just to be detailed, I start SC with the highest privilege via the following way:

I defined a keyboard shortcut (Win+S) in an AutoHotKey script file, and this script file is run via the Task Scheduler in the highest privilege upon my log-on to the system. Anyway my point is that I do not do "Run as Administrator" (via context menu) to elevate SC.

db90h

  • Coding Snacks Author
  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 481
  • Software Engineer
    • View Profile
    • Bitsum - Take control of your PC
    • Read more about this member.
    • Donate to Member
Re: What are these dll files used for?
« Reply #5 on: August 05, 2011, 08:47 PM »
I've never noticed this anomaly with heavy use in Windows 7, though never specifically tested for it either. I do *routinely* capture windows of elevated processes with SST non-elevated on my system. Not using the portable mode.

Make sure the screenshot save folder is one that non-elevated users have write access to. If there is any case where an injected DLL of SSC must run in an unelevated process space, then it would fail to be able to write to that folder otherwise. This is likely the default, and perhaps you changed it to another folder?  Ah.. this is WILD speculation on my part, lol.

ScreenshotCaptor is GREAT, btw.. I still use it, have for YEARS. Nothing beats it.
« Last Edit: August 05, 2011, 09:30 PM by db90h »

Huidong

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: What are these dll files used for?
« Reply #6 on: August 05, 2011, 09:00 PM »
I've never noticed this anomaly with heavy use in Windows 7, though never specifically tested for it either. I do *routinely* capture windows of elevated processes with SST non-elevated on my system. Not using the portable mode.

Make sure the screenshot save folder is one that non-elevated users have write access to. This is likely the default, and perhaps you changed it to another folder?  Ah.. this is WILD speculation on my part, lol.

ScreenshotCaptor is GREAT, btw.. I still use it, have for YEARS. Nothing beats it.
Thanks. My folder to save captures can be accessed w/o elevation. So that's not the cause. However, it's on a different volume. I'm curious, do you see a folder named "Screenshots" in your SC program folder? It's there by default installation, so I assume yes, and could you delete it, then restart SC, to see if that folder is re-created?

Huidong

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: What are these dll files used for?
« Reply #7 on: August 05, 2011, 09:09 PM »
I do *routinely* capture windows of elevated processes with SST non-elevated on my system.
Wow, that's miraculous, I could never do that (i.e. window capture or red-box capture an elevated process's window with SC with "normal" privilege, with UAC enabled Windows 7).
What's SST by the way?

db90h

  • Coding Snacks Author
  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 481
  • Software Engineer
    • View Profile
    • Bitsum - Take control of your PC
    • Read more about this member.
    • Donate to Member
Re: What are these dll files used for?
« Reply #8 on: August 05, 2011, 09:15 PM »
I meant SSC .. but I know it works, because I do it all the time capturing images of my elevated and non-elevated software. EDIT: Yes, that folder exists, and it is NOT recreated on startup of SSC.

EDIT: Just tested it, one more time.. works fine. Non-elevated SSC, elevated program. Yes, UAC is enabled.

If it is using that %PROGRAMFILES% subfolder for any reason, then that is the likely problem I still say, as it is being recreated so being used for something -- in your case. Maybe portable mode has something to do with it, dunno.
« Last Edit: August 05, 2011, 09:34 PM by db90h »

db90h

  • Coding Snacks Author
  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 481
  • Software Engineer
    • View Profile
    • Bitsum - Take control of your PC
    • Read more about this member.
    • Donate to Member
Re: What are these dll files used for?
« Reply #9 on: August 05, 2011, 09:20 PM »
edit post notification
« Last Edit: August 05, 2011, 09:36 PM by db90h »

Huidong

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: What are these dll files used for?
« Reply #10 on: August 05, 2011, 09:26 PM »
Thanks. Is your save folder on the same volume as the SC program?
Note that the folder re-creation does not occur in the moment of capturing, but rather immediately after SC is launched. But SC has no trouble writing files to the designated folder. It's not the problem of saving a capture to a folder, but rather, of initiating the capture at all when the target window has a higher privilege than SC.

db90h

  • Coding Snacks Author
  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 481
  • Software Engineer
    • View Profile
    • Bitsum - Take control of your PC
    • Read more about this member.
    • Donate to Member
Re: What are these dll files used for?
« Reply #11 on: August 05, 2011, 09:28 PM »
Yea, I checked a restart of SC.. I am not messing up my methodology.. hsa worked forever, initiating a capture, via hotkey, of an elevated window (only, not the whole screen). It works, simple as that. When SSC is executing within another process's space, its permissions may be different than in its native space, so it may fail to be able to write to a folder that requires elevated access. In other cases, the inverse may be true. You should never use that as a screenshot folder. It should be %APPDATA%\Screeenshotcaptor\Screenshots .. (I made that up as where it ought to be) .. or your own custom folder. For portable mode the default may behave wrong.
« Last Edit: August 05, 2011, 09:36 PM by db90h »