The CLR has been unable to transition from COM context 0xXXXXXX to COM context 0xXXXXXX for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages

Error Message:

β€œThe CLR has been unable to transition from COM context 0x1979d8 to COM context 0x197868 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.”

You get this nasty error message and your life is sucked. This happens when you are debugging your application and using breakpoints.

Fix For The Problem:

Go to menu Debug->Exception-> a form appears. Then in Managed Debug Assistants section, just uncheck the ContextSwitchDeadlock.

Note:

If you are not able to see Exception MenuItem in debug menu, then add it from Tools->Customize->Commands.

Advertisements

Windows 7 with 4 versions: Comparison between various versions and editions…

via Windows 7 home page

via Windows 7 home page

Finally windows 7 is here with following 4 versions(as of now):

Comparison shows that you would have really less feature with Starter Edition, you will not be even able to change desktop wallpaper…so sad !

You can see the comparison at:

Microsoft also has 10 reasons to go for windows 7.. Hmmm…

Now we have comparison between various versions of windows:

LoL !!! people are also saying that windows 7 is a subtracted version of vista…. I dont know 😐

Adding macro in to toolbar as tool bar button, creating macro and adding it, with small example

How nice it would be if your favourite macro is available as toolbar button. Its really easy to do. Suppose you have created a macro hello and you want to add it, then just follow these step:

Adding macro to toolbar

  1. Go to menu: tools->Customize… => it will open Customize window.
  2. In Customize window go to ‘Commands’ tab and select ‘Macros’ at left pane, all the macros you have created would be visible at right pane.
  3. Just drag the macro you want to toolbar.
  4. It would automatically create a button with macro name.

Customizing toolbar macro button

  1. Write click on macro toolbar button while Customize window is open.
  2. In this menu you can do all the customization. Changing name, image etc.
  3. You can also assign a shortcut key. Just put &1(if you want alt+1 to a shortcut key) or which ever combination you want.

Office tips and tricks: Creating and adding new toolbar in ms office, a very simple example

You would have seen many toolbars in your office app. Have you ever thought of having toolbar with your own name ;). Yes you can add new tool bar with some really simple step in to your office app(word/outlook/excel etc.). So here we go:
1. Go to menu: tools->Customize… => it will open Customize window.
2. In Customize window go to Toolbars tab and click on “New…” button. It will open a small window here you need to give toolbar name.
3. Your toolbar is ready to add.
4. You can drag buttons from Customize window’s Command tab.
5. For ex. in Command tab select ‘File’ at left pane and drag ‘Open’ in right pane to the newly created toolbar. Its done.

You can also add previously created macro in to this toolbar.