Using MSXML to read XML documents[^] Great, intuitive lib to MSXML.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [soonr.com -- PC Power delivered to your phone](http://www.soonr.com)
Using MSXML to read XML documents[^] Great, intuitive lib to MSXML.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [soonr.com -- PC Power delivered to your phone](http://www.soonr.com)
Howdy! With the new great OS -- 10 -- we're seeing something odd. Running our installer is not shutting down our app. We do receive the WM_QUERY_ENDSESSION and we do reply with TRUE ( ok to shutdown ) But, upon receiving the WM_ENDSESSION we receive a FALSE (don't shutdown). Somewhere between the QUERY and the END -- "someone" is saying NO to this. How does one go about debugging this sort of thing? I've used SPY++ but am not finding it to be the most useful tool, except to confirm what I knew in code. SPY is not telling me who sends the QUERY. If I could figure out where these messages are coming from, maybe I could watch the conversations taking place around this transaction. -- in previous versions of Windows this was not an issue -- it worked like we would expect. But Windows10 is telling me not to end my session.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [soonr.com -- PC Power delivered to your phone](http://www.soonr.com)
It might depend on the type of proxy used. I suspect it's possible using SOCKS, but I don't quite see a way to do this via HTTP
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
people seem to fall into traps like this -- when they try to be cool. there's no good reason to combine several distinct operations into single statement. one thing I've learned in my years is that 'cool is costly' -- you could spend many many hours trying to debug that mistake. write it simply and clearly (and readable) -- the compiler will optimize it for you. -p
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
For the example you give -- they are the same. The compiler is able to figure it out -- as "base" has a default constructor... "base()" The easiest way to see what's up here is to write both examples and run it through the debugger.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
no answers for you here - but you should google "sms gateway"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
Pardon the dumb question. But, do issues of process elevation go away if my process becomes a service? Thanks -peter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
Consider creating a global named mutex. Each app does this: 1) Create mutex -- give it a unique name, possibly including a GUID 2) WaitForSingleObject -- to capture the mutex. If this fails, then there's someone else holding it. On exit, ReleaseMutex() to give it up -- and make it available again.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
Thanks for your thoughts. I already listen to the device change events -- but one can never trust those to be completely accurate. Is there a way to differentiate "removable" drives from "floppy" drives? Some day, there will be no more floppy drives and my problem will go away!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
You'll need to update your code (based on hobocopy) to use this API -- ExposeSnapshot() -- will cause the snapshot to be mounted to a drive letter. Letting you use a "normal path". http://msdn.microsoft.com/en-us/library/aa382662(VS.85).aspx[^]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
Howdy out there! Without going into too much detail, I need to keep track of the drives -- to know if anything is attached, and if so what. Currently (on a timer) I am use a combination of GetVolumeInformation and FindFirstFile -- to both get volume information and make sure that the device is readable. I am already processing device events to get changes, but still periodically I also scan all the drives. For most users, my scheme isn't a problem. But, I have a user who is reporting activity on their A: drive periodically. What's the best way to check the drive without being annoying to the user? Do you think I am doing too much by trying to read the drive root? Is there a good alternative to reading the drive root to verify the contents of a drive?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
UAC is a good thing -- I think process security is an important thing. But think about me. I write backup software, and I want to add "volume shadow copy" support to my stuff. When UAC is in place, I am denied access to it to the shadow services... Is there a way the user can get backup rights without getting into the UAC mess? (for me it's a mess)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
to go a little further -- how does the whole world of UAC apply to services? How would a service go about getting admin priveleges?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
I looked at autoElevate -- Microsoft looks quite restrictive on that, as most of their own apps aren't allowed to use it. Is my only recourse here to tell the user they "can't have it" unless they elevate it or disable UAC? Are there any runtime API's which I can call to request elevation of the process? Or, is it the case that the security mode cannot change once the app has started?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
As he said: OnSetActive and OnKillActive should be overridden on each panel. When you exit one panel, OnKillActive is called -- at that point save data from that panel... then on the new panel OnSetActive can load the data needed. I do this all the time, it works great!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
I've got this app -- that wants to run with elevated priv's. I've added to the manifest: <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="highestAvailable" uiAccess="false"> </requestedPrivileges> </security> </trustInfo> Is it possible to make the app auto-start with elevation? The app can run without elevation... but in order to make use of some API's I need more rights. The question -- is there a way to register the app so that it's pre-approved to run elevated? I'd like if the user can approve it once and never be asked again? The app needs to run at the startup of the user session. I find that it won't start itself at login with this manifest.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
Absolutely! I'd love to display status information in my app about why I am having trouble backing up a file. "File in use by Microsoft Word" I could of course "guess using the file associations", but it would be cooler to know the actual application using the file. -peter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
How terrible is it to find out what application has a particular file open? Clues? -peter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
Check out: http://freeimage.sourceforge.net/[^]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)
If you can -- consider this alternate route -- catching your crashes and write a minidump file. You can set your own crashhandler with SetUnhandledExceptionFilter() and then using MiniDumpWriteDump. Here's an example: Add Crash Reporting to Your Applications with the CrashRpt Library[^] Users sends you the DMP -- which you can then load into the VC++ debugger -- and if you have the PDB file from that build.... you get what you need. It's very handy.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)