How to capture Exceptions in Process Monitor Traces using PocDump

ProcDump was updated to version 5 coming with some great new features targeting exception filtering and the like. For instance you can now write a dump at the time a specific first chance exception was raised using the exception name: procdump –ma –e 1 –f “System.Exception” myprocess.exe   What’s also new and little hidden it…

0

Setting the right DirectoryEntry for DirectorySearcher used for DirectorySynchronization

This week I was asked why one would get the an AccessDenied Error Code when accessing the DirectorySearcher.FindOne Method while the DirectorySearcher.DirectorySynchronization Property is set and the DirectoryEntry is set to an Organisational Unit (OU) rather. The following Example explains 1: using (DirectoryEntry deRoot = new DirectoryEntry("LDAP://OU=MyOU,DC=yourDomain,DC=com")) 2: { 3: using (DirectorySearcher ret = new…

1

WaitHandle.WaitAll throws NotSupportedException when joining more than 64 WaitHandled

I was just looking after a Problem where a customer was not able to join more than 64 wait handles in a WaitOne method call. This is because of an internal limitation trying to prevent you from exhaustive usage of synchronization primitives. MSDN mentions it in the remark section: http://msdn.microsoft.com/en-us/library/z6w25xa6(v=vs.90).aspx “On some implementations, if more…

2

GdipDrawImageRect and other GDI+ functions may return GenericError (-1) on Windows 7

I came across an anyoing issue where GDI plus functions returned Status code –1 GenericError after 1000 calls on Systems running Windows 7 or Windows Server 2008 R2. It turned out that the function call to kernel NtGdiSaveDC(hdc); Returns 0x0 after 999 iterations or at the 1000th call that is. The public callstack subset looks…

0

Event Logging API function “ReportEvent” Returns “ERROR_INVALID_PARAMETER” 0x57 when Event Source contains predefined XML entities

The Event Logging API allows user code to write Event Information into the Windows Event Log. There is a nice example how to do it in MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/aa363680(v=vs.85).aspx When you are using the function ReportEvent the function might return the error  ERROR_INVALID_PARAMETER (0x57) if you are trying to report an event to an Event Source…

0

async Bing for Metro Style Apps

While getting ready to support customers developing great Windows 8 Metro Style Apps I started creating an App myself. I chose to write some code that queries Bing Search Service for Images and displays results as tiles. I stumbled across some things that I want to share with you. For details how to code against…

0

How to: grant “Manage Build Resources” Privilege to users with tfssecurity.exe

TFS allows flexible setup. It can be customized to address most peoples requirements. Everything that can be changed with TFS Explorer in the UI can also be modified using the API and command line tools. TFSSECURITY.EXE is one of those allowing to batch script modifications to TFS’s security interface. However, for some scenarios the tool…

0

How to solve “Unable to cast COM object of type Microsoft.Office.Interop.Excel.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Excel._Application’”

Recently I was working on a problem where a customer received that error message when trying to open a TFS work item list in Excel triggered from Team Explorer. The error did not appear when opening Excel right away and accessing a TFS query. I was checking Process Monitor to see what was going on…

5

Mouse not captured in remote desktop session when Virtual PC VHD file runs in Hyper-V

Today I received a Virtual PC VHD file that I needed to run in my Hyper-V system. It booted fine but the mouse did not respond. The Hyper-V console’s status bar kept saying “Mouse not captured in remote desktop session“. Fixing that issue is a little tricky and requires some keyboard acrobatics: 1) Uninstall the…

3