Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Windows 7 Professional SP1 (de, en, jp mui's installed before SP1 setup) with latest Intel HD graphics drivers and latest DirectX (to my knowledge)

On my Tablet PC, where rotating the screen is pretty standard, I have the following problem:

Whenever I rotate the screen to portrait mode and use the Windows Photo Viewer and close said program, It terminates with a "Com Surrogate" error in the "d3d9.dll" module.

Some with that an error of similar kind said it helped to copy over Windows Photo Viewer from an unaffected installation, but I do not have another installation with this MUI setup.

Any idea how to fix that error short of reinstalling Windows?

share|improve this question
Does the event log provide you with more information? Perhaps a dump? – Tom Wijsman May 21 '11 at 22:01
I wasn't able to get any dump when the problem still persisted. (see my answer) – private_meta May 24 '11 at 16:21

d3d9.dll is a component of Directx. I would upgrade your video card drivers, maybe run dxdiag and run some of its tests in both landscape and portrait modes. Beyond that, check if there are any updates to directx itself that might fix it.

Edit: Sorry, didn't see that you already did video drivers and directx upgrades. Perhaps dxdiag might shed some light on the problem.

share|improve this answer
Sorry, see my answer. – private_meta May 24 '11 at 16:20
Updating the graphic drivers on my Intel HD Graphics 4000 did the trick. – Tom Auger Jun 6 at 14:27

Turning off Data Execution Prevention (DEP) on dllhost (the COM surrogate) fixed similar problems for some people:

Execute Control Panel / System / Advanced System settings / Advanced tab / Performance Settings button / Data Execution Prevention tab, and see if it says below : "Your computer's processor supports hardware-based DEP".

If DEP is available, one can :

Turn DEP off : bcdedit.exe /set {current} nx AlwaysOff
Turn DEP on: bcdedit.exe /set {current} nx AlwaysOn

Reboot for the change to take effect.

If turning DEP off does not fix the problem, you should turn it back on.

share|improve this answer
Sorry, see my answer. – private_meta May 24 '11 at 16:21
Even though it didn't fix the problem, I am not deleting this answer, in case it might help somebody else in the future. – harrymc May 24 '11 at 19:27
up vote 2 down vote accepted

This is a typical problem for me it seems, fixing by desperately asking.

This problem persisted for several weeks. As I did not receive an answer by the time I set the bounty, I installed Picasa Photo Viewer and set it to default to work around the symptoms.

I wasn't able to check the answers here for a couple of days, so now I checked it again and and tried Photo Viewer, now it works without a problem. The only difference was the installed Picasa Photo Viewer. I can only assume it fixed something in my dx-lib usage, because it was literally the only thing I did. Even after uninstalling Picasa and using Windows Photo Viewer as a Default Setting does not create the error anymore.

I thank the for the answers for the bounty, but I can't reward it as I can't say that/if it helped.

share|improve this answer

This worked for me on Windows 8.1, when Photo Viewer crashes after using either the "Next (Right Arrow)" or "Previous (Left Arrow)" functions:

Read last comment by Metal, reposted in full here:


One of method worked for me, i would like to share that it might help someone else.

Using OS: Windows 8.1 pro 64bit

The Com surrogates stopped working error was faced everytime i was going to pictures folder from "Start Menu" and clicking on "Pictures". The Pictures shortcut link was opening the pictures folder as "Apps -> Pictures" with a long random characters in address bar. Instead when i clicked my normal pictures shortcut, it simply takes me to C:\Users\username\pictures and the com surrogates problem was didn't occurred that way.

So I simply changed the "pictures" target location to "C:\Users\username\pictures" and problem got solved.

/end repost

I tried this and it works.

I had already re-enabled the 'Libraries' function on my Windows 8 when I first got it (comes disabled) but oddly, not all of the "shortcuts" on the Win-8 Start Screen got updated: 'Music' and 'Videos' open to 'Libraries\Music' and 'Libraries\Videos' like they should, but 'Documents' and 'Pictures' both open to 'Apps -> Documents' and 'Apps -> Pictures'. That "Apps" location path is what was causing my COM Surrogate error with photoviewer.dll

Funnily enough, if I click on the 'Libraries' link directly in the same explorer process, I can navigate from "Apps -> Pictures" to "Libraries\Pictures" (exact same results) and the error with COM Surrogate disappears, and I can scroll through all my photos again in Photo Viewer just like I used to.

This error is 100% reproducible on my machine. If it's a bug it should definitely be reported to Microsoft. For now, all I had to do was change the target path of my Windows 8 "shortcut" tile to Libraries, and the problem went away. If you follow the bad link back to it's source (Right-click -> Open Folder Location) it will take you to the mysterious "Apps" location, which is completely empty. The fixed shortcut links point directly to the "Libraries" location.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .