Re: EXCEPTION_INVALID_HANDLE woes

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



What exactly do you mean with "normal" system ?
The Flag is set in a registry key by tools such as gflags.exe.
As far as debugging goes, maybe the user/customer
has some debug monitor infrastrucutre in place.

You should try to get a full dump with handle information
from the customer, so that a proper investigation and fix can be made.

> Is there a function call my application can make to turn off the flag for
> itself?

Not in general. You sould write code that checks the registry
or it checks for a debug port, but, why defeat the safeguard when you can
fix it ?

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

<msidell@xxxxxxxxxxxxxxxxx> wrote in message
news:6kp7l1tkis5pubrg185eh3njg64g0hu0m8@xxxxxxxxxx
> On Mon, 17 Oct 2005 09:19:42 -0700, "Ivan Brugiolo [MSFT]"
> <Ivan.Brugiolo@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>> If there is the FLG_ENABLE_CLOSE_EXCEPTIONS flag enabled
>> for the curent process or system wide, or if there is a debugger attached
>> to the process, then only the close-handle function will raise an
>> exception
>> when an invalid handle is passed to it.
>
> Thanks for the info.
>
> Is it possible for this flag to be set on "normal" user's systems? (The
> exception is being reported by our customers, who I assume are not running
> a debugger or other monitoring tools.)
>
> Is there a function call my application can make to turn off the flag for
> itself?
>
> --
> Mark


.



Relevant Pages

  • Re: [ptrace] please review follow fork/exec changes
    ... The SIGHUP I mentioned is due to the fact that the parent exits immediately. ... I think it will be easier if the flag is different from PL_FLAG_FORKED. ... PT_FOLLOW_EXEC is easy to implement, but my question is, how can debugger ... ignores the notification when the invalidation shall be done, ...
    (freebsd-current)
  • [RFC PATCH] New SA_NOPRNOTIF sigaction flag
    ... Sometimes when a task is being ptraced (e.g. by a debugger), ... The SIGSEGV ... I'm proposing the addition of a new SA_NOPRNOTIF flag to struct sigaction ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [SOLVED] Trap flag handling change in 2.6.10-bk5 broke Kylix debugger
    ... and the debugger got a little further, ... flag values it received, ... LD_PRELOAD stub on the ptrace function in user-space. ... "remember" whether it was single-stepping or not. ...
    (Linux-Kernel)
  • Re: ToolHelp thread count doesnt match debugger
    ... Viewer and it agreed with ToolHelp, not with the debugger. ... debugger is only showing managed threads. ... Not odd at all. ... Now what's interesting is that since I have set that flag, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: ToolHelp thread count doesnt match debugger
    ... Viewer and it agreed with ToolHelp, not with the debugger. ... debugger is only showing managed threads. ... Not odd at all. ... Now what's interesting is that since I have set that flag, ...
    (microsoft.public.dotnet.framework.compactframework)