Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

Peter Weyzen

@Peter Weyzen
About
Posts
479
Topics
106
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to read an XML file in C++.?
    P Peter Weyzen

    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)

    C / C++ / MFC c++ xml help tutorial question

  • Windows 10 & WM_QUERY_ENDSESSION/WM_ENDSESSION
    P Peter Weyzen

    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)

    C / C++ / MFC database com help question

  • C++ proxy programming question.
    P Peter Weyzen

    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)

    C / C++ / MFC question c++ php visual-studio sysadmin

  • C++
    P Peter Weyzen

    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)

    C / C++ / MFC c++

  • what is differnce between both following
    P Peter Weyzen

    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)

    C / C++ / MFC question c++

  • Sending SMS using a device application in C#/VB.NET 2005
    P Peter Weyzen

    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)

    C / C++ / MFC csharp visual-studio help question

  • Services & Elevation....
    P Peter Weyzen

    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)

    Windows API question com

  • Stopping multiple copies of application from opening
    P Peter Weyzen

    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)

    C / C++ / MFC help

  • Checking for attached device ( A: drive? )
    P Peter Weyzen

    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)

    C / C++ / MFC com help question

  • How to read/process locked files?
    P Peter Weyzen

    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)

    C / C++ / MFC c++ database sysadmin windows-admin help

  • Checking for attached device ( A: drive? )
    P Peter Weyzen

    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)

    C / C++ / MFC com help question

  • UAC question
    P Peter Weyzen

    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)

    C / C++ / MFC question com security json

  • UAC question
    P Peter Weyzen

    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)

    C / C++ / MFC question com security json

  • UAC question
    P Peter Weyzen

    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)

    C / C++ / MFC question com security json

  • Trapping the Active Page in a CPropertySheet in MFC using CStrings
    P Peter Weyzen

    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)

    C / C++ / MFC c++

  • UAC question
    P Peter Weyzen

    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)

    C / C++ / MFC question com security json

  • Who has the file opened?
    P Peter Weyzen

    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)

    C / C++ / MFC com question

  • Who has the file opened?
    P Peter Weyzen

    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)

    C / C++ / MFC com question

  • Multipage tiff
    P Peter Weyzen

    Check out: http://freeimage.sourceforge.net/[^]

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)

    C / C++ / MFC tutorial question

  • Is it possible to find out where a release version crashed by knowig the address?
    P Peter Weyzen

    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)

    C / C++ / MFC announcement csharp visual-studio debugging sales
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups