January 23, 2004


The problem:

Attempting to print from IE6 on Windows XP gives you a pop-up box with the following error:

Line: 639
Char: 1
Error: Invalid Argument
Code: 0
Url: res://c:\windows\system\shdoclc.dll/preview.dlg

It helpfully asks if you want to continue running scripts, but neither “Yes” nor “No” make it happy. You cannot print, and you cannot look at a Print Preview screen.

The solution:

Replace the iepeers.dll file. This can be tricky, because Windows File Protection might replace the file automatically (undoubtedly with a bad backup copy) when you rename it, or it might not even allow you to rename it in the first place. System File Checker is supposed to catch things like this, but of course it doesn’t. What I did, since I’m on a network, was grab a copy from a working computer and copy it right into the folder. Windows warns you about replacing it, but go ahead and do it anyway. If nothing else works, go into Safe Mode and replace the little bugger there. Just be sure you replace it with a good, working, 226kb file from another computer. Grabbing the 84kb iepeers.dl_ from the i386 folder on the Windows CD won’t do the trick.

Then you have to register the DLL: regsvr32 iepeers.dll, cross your fingers, and dance in a circle while reciting an ancient Zulu chant.

Why do you replace iepeers.dll when the error is in shdoclc.dll? Only billg knows for sure. DLL rasslin’ should be an Olympic sport. Even in XP, supposedly the latest and greatest, the DLLs can bring your system to its knees unless you know the right battle tactics.

Filed under The Computer Vet Weblog

Comments (45)

Comments RSS - Trackback - Write Comment

  1. Kalrac says:

    You’ve never tried using Visual Studio .NET, have you…? When you write a program, often you’ll link other DLLs that you’ve written. In theory, VS is supposed to copy over new versions of the DLLs every time you compile. Unfortunately, it has this nasty habit of doing that by calling “xcopy *.dll bin/”, which means that if one of the DLLs you linked to had a different copy of a different DLL that you’re trying to use from a different location, you’ll get an error. And it’s rarely a “Could not copy X.DLL because the version is incorrect.” It will often randomly select a completely irrelevant error message. “Newline in constant” is my favourite.

    Posted January 24, 2004 @ 10:52 am
  2. Curtis says:

    We tried the solution suggested. I used a startup disk to rename the iepeers file. Then I grabbed a new copy of the file from the CABS files while in safe mode and put it in the Windows\system directory. Same error occurred when we restarted. I’m using Windows ME and IE 5.5. If you have any critique of what I did, I would certainly appreciated it. Thanks.

    Posted February 12, 2004 @ 10:55 am
  3. Scott Schrantz says:

    Pulling the file out of the CAB isn’t enough. You have to replace it with a live, working version from another computer. I’m not sure why, but Windows seems to do something special during the extraction process.

    And then once you’ve replaced the file, you need to register it. Start > Run > regsvr32 iepeers.dll

    Posted February 12, 2004 @ 11:09 am
  4. Kris says:

    I was having this problem with IE6 and found your web page via Google. My iepeers.dll was not corrupt, but something caused it to become unregistered (an uninstall I think). I saw the error when attempting to print and it was frustrating. I tried working around it by copy-pasting into a word processor, but was not always working perfectly either, especially on some of the graphics. Reregistering the library with ‘regsvr32 iepeers.dll’ seems to have taken care of the problem. Thanks!

    Posted February 17, 2004 @ 9:37 pm
  5. Bruce says:

    Do your systems contain ZoneAlarm or other kind software? How about things like Anonymizer? These kinds of programs might “force” the error.

    Posted March 17, 2004 @ 11:31 am
  6. Glen says:

    I renamed my old ipeers.dll to ipeersOLD.dll and copied a working one from another workstation running XP pro.
    No re-registration, no circle dance, just a copy of the ipeers.dll to the $\system32 dir.

    IE prints and so does outlook 2002, neither would print HTML documents. I re-installed office, upgraded office, nothing working til i found this cure.

    Thanks for catching the DLL problem – Amazes me how you track them issues down.

    Posted September 21, 2004 @ 11:23 am
  7. Mike says:

    Solution worked great. The existing iepeers.dll was 266k in size. Replacing with a 244k as in your article worked perfectly.

    No re-registration needed.

    Thanks for the hand…

    Posted November 8, 2004 @ 12:14 pm
  8. huy says:

    Line: 228
    Char: 1
    Error: Incompatible version of the RPC stub.
    Code: 0

    Posted November 22, 2004 @ 5:54 am
  9. azecraze says:

    Replacing the iepeers.dll file does not appear to fix this problem in Win98 if using a file from a WinME machine.
    Does it need to be OS specific?

    Posted December 9, 2004 @ 11:28 am
  10. barry says:

    will re-installing my windows 98 take care of this problem thanks

    Posted December 14, 2004 @ 8:06 am
  11. Hoody says:

    WOW Mike you must have read my screen lol…… I have exactly the same error and usin 98SE… where in the hell does this come from all sudden?….. I also re named and replaced the ipeer, and the shdoclc….. nuttin has worked, even removed my printer and let windows re install it… only thing I haven’t tried is that replacment from a working 98se machine, ipeer, but its hard to find one ….

    Posted December 17, 2004 @ 4:28 pm
  12. Hoody says:

    OKyyyyyy I got my print back in IE……… but with another file……… this is for you Mike……. get the file called DISPEX.DLL and replace the one in your windows/system ……. this file worked for me right off…. I found it on another tech site, but didn’t save the link…… do a google on it…….. I tried all the other stuff and nuttin worked……. this is Win98SE…. so dono bout XP…..

    Posted December 17, 2004 @ 5:15 pm
  13. rayc says:

    same error as previous posts.
    Just reregistered iepeers.dll and all was good.

    Thanks for the info

    Posted January 30, 2005 @ 9:14 pm
  14. John says:

    Dear Computer Vet

    Have googled my way to you as the “Line 639, Char 1, Invalid argument etc is exactly the problem which has been driving me crazy for the last 3 days.
    I have no computer knowledge and have followed blindly what I have read on the internet so far including entering “ren IEPEERS.dll IEPEERS.old” in MS DOS under cd\windows\system. I have further downloaded a IEPEERs file which is sitting on my desktop. Its properties include 243 kb and the File Version is 6.00.2900.2180(xpsp_sp2_rtm 040803-2158). Can you tell me is this suitable for IE 6 and being completely ignorant how do I get this file into its folder and make it run? Please, please, help me resolve this problem before the wife divorces me!


    Posted February 6, 2005 @ 4:39 am
  15. peter says:


    simply copy the file to the right place (i.e. C:\windows\system) as mentioned in the article.
    from the “dos” shell, you would do this with the command:


    note, however, that if you’re NOT running windows XP on your PC, the file version seems to be wrong for you (it mentions XP if you look closely).

    … unfortunately none of the tricks mentioned in this page has solved the problem for me.

    pointless sidebar: as an IT ‘professional’, i find it amazing that people *still* rely on windows for critical tasks (such as running a business). the fact that fixing almost every problem involves trying to guess wtf M$ is *really* doing inside your machine should be deeply insulting to anybody who pays for M$’s crap-ware.

    Posted February 8, 2005 @ 10:46 am
  16. peter says:

    another note: to check whether your ‘iepeers.dll’ file is different from that of another machine, you can use the command-line utility “fc”, e.g.


    this will either tell you that the two files are the same, or warn you and point out any differences (a bit messy with a binary file, but still useful).

    Posted February 8, 2005 @ 10:51 am
  17. Brian says:

    Okay, I’ve been dealing with this same message all day and night, and I just now (thanks to this website) figured the solution. In fact, rayc is the one that had the right answer for me. All I had to do was in the Run prompt, type regsvr32 iepeers.dll, and hit Enter. After windows gave me the message saying the dll had been successfully registered, I restarted the comp and all was well. Thanks!

    Posted March 10, 2005 @ 4:35 pm
  18. Manish says:

    Preview.dlg file not found

    Posted March 14, 2005 @ 2:17 am
  19. charles says:

    i registered the file in the registry by typing resvr32 iepeers.dll It worked perfectly without replacing the file. i have been to at least 50 websites with different solutions but this seems to be the only one that worked

    Posted March 15, 2005 @ 5:02 am
  20. rich schaffer says:

    I fixed this problem after hours and hours of screwing around, the same for my geek son, by simply going to Microsoft Windows Updates and clicking on updates to install, and then clicking on Windows Millenium Edition. (44). There was a 4 minute update on solving problems with Outlook Exress. I installed it and now my printer prints from Outlook Express! PRAISE THE LORD!!!!!!!

    Posted March 20, 2005 @ 11:54 am
  21. curtis bowman says:

    same problem with IE6 printing after rebuilding machine and downloading sp2. iepeers.dll was missing from windows 32 folder. grabbed a copy from son’s machine and registerd it and now all is well….. until the next breakdown!

    Posted April 25, 2005 @ 8:29 pm
  22. chupik says:

    I’ve tried all of these solutions and nothing seems to work. I’ve copied and registered the iepeers.dll and rebooted and nothing seems to work. Any other magic solutions out there?

    Posted May 5, 2005 @ 9:48 pm
  23. Steve says:

    I have this 639 error and it’s driving my family nuts. I have tried some of the solutions I found on other web sites, and it all appears to be old info to fix a previous problem.

    I’m running IE 6.0 on XP Home. I’m going to try these solutions tonight and cross my fingers. But thanks in advance for everyone’s comments. Some combination of the above MUST work…right?

    Posted June 3, 2005 @ 2:29 pm
  24. Donna says:

    I also have the 639 invalid argument error. I’m using Windows 98 and IE 6.

    I have spent HOURS trying to fix this. I’ve done all the above suggestions to no avail. The only change has been the error… after the above fixes I went to the 639 invalid argument error when trying to print from IE 6, instead of the 228 Incompatible version of the RPC stub.

    Any other suggestions?

    Posted June 8, 2005 @ 12:47 pm
  25. Ron says:

    Almost a year later, RAYC was what I needed. No need for me to replace the iepeers.dll, just reregister it. I had tried hours of attempts, from clearing the temp files to registering a million other dll’s. But this did the trick!

    Now I can print my emails from Outlook again without that annoying Internet Explorer Script Error popping up complaining about the shdoclc.dll/preview.dlg! Thanks guys!!

    Posted January 23, 2006 @ 5:49 am
  26. Traci says:

    OK, so the iepeers.dll file was no longer even on the computer (still unsure as to were it ran away to) so I downloaded a new iepeers.dll and added it to my windows/system file, but when I do the Run regsvr32 iepeers.dll thing i get this message:
    LoadLibrary(“iepeers.dll”) failed. GetLastError returns 0X0000001f. I have no idea what that means other than it didn’t do what it was supposed to do. This is happening with an ME operating system if that makes a difference. Any suggestions at all would be appreciated, we need to be able to print, this is driving the boss nuts.

    Posted February 2, 2006 @ 6:30 pm
  27. Mab says:

    Had same problem trying to print from OE. Tried all of the above etc.

    I’m running McAfee Virus Software. Went to their site and found this solution……
    Download and run IERegFix.bat
    Download IERegFix.bat and save this to your desktop.
    Locate IERegFix.bat on your desktop and double-click to launch.
    Once launched, you will be presented with “press any key to continue…” To execute, press any key on your keyboard. Note:This may take several minutes to complete.

    When it is finished, you will see “Action complete. Press any key to close.” Please press any key on your keyboard to close the IERegFix.bat.
    Clicked on link from McAfee site, link to McAfee page is

    Worked for me……It was really p*ssing me off…..
    Hope it helps someone else :o)

    Posted February 19, 2006 @ 9:49 am
  28. Gabe says:

    I have this problem every once and a great while. It will print for months then I get one page that will give me the 639 error message then it starts printing again for a few more months until I hit the same error msg. I can’t reproduce it. Tried everything. I gave up.

    Posted May 11, 2006 @ 5:03 pm
  29. svein says:

    I have a different problem.
    I get message:
    Line 1345
    char: 1
    error: unspecified
    code: 0
    tried to change iepeers.dll,but I still have the same problem.
    can anybody help me ?

    Posted July 5, 2006 @ 9:59 am
  30. Evan says:

    worked like a charm! interesting to note that the problem also effected the Outlook 2000 that I have on the same computer – it would give same script error as IE6.
    I tried replacing the .dll but it did not fix it… I had forgotten to do the
    “regsvr32 iepeers.dll” in the start/run so I did and now its fine!
    Thank you for this site.

    Posted July 10, 2006 @ 4:53 pm
  31. Manjeet Singh says:

    I have a different problem.
    I get message:
    Line :93
    char: 1
    error: Access is denied
    code: 0

    Posted August 5, 2006 @ 4:43 am
  32. CLD says:

    Thank you so much. I had one user with this issue and no manner of reinstallation of .dlls would work. Thank goodness for the Internet, google and your site.

    As far as M$… hey — they provide me job security, you know? 🙂

    Again, thanks!

    Posted August 16, 2006 @ 5:16 am
  33. dunskii says:

    regsvr32 iepeers.dll, worked a treat. thank you muchly. m$ keeps me in a job aswell 🙂

    Posted October 24, 2006 @ 6:11 pm
  34. Pierro says:

    PRAISE GOD!!!!
    Attempting to print from IE6 on Windows XP gives you a pop-up box with the following error:

    Line: 639
    Char: 1
    Error: Invalid Argument
    Code: 0
    Url: res://c:\windows\system\shdoclc.dll/preview.dlg

    Posted January 22, 2007 @ 12:23 am
  35. sissy boyd says:

    I cannot except AOL data, my printer will not print, it gives me the message of some kind of problem & finishes with URL: RES//c:\windows\system 32\shdoclc.dll/preview.dlg
    CAN I PLEASE have info to fix this problem so my printer will work

    Posted February 17, 2007 @ 6:34 pm
  36. sissy boyd says:

    I cannot except AOL data, my printer will not print, it gives me the message of some kind of problem & finishes with URL: RES//c:\windows\system 32\shdoclc.dll/preview.dlg
    CAN I PLEASE have info to fix this problem so my printer will work

    Posted February 17, 2007 @ 6:35 pm
  37. Alex says:

    Unfortunately, I’m one of those who neither the replacement nor the re-registering of iepeers.dll worked for. I really liked the answer too. It was so simple and less time-consuming than the IE repair or Windows Update method, both of which I tried. It’s not worth the time or money for a Windows repair or XP upgrade. My client is on IE6 and Win2K, by the way. In the meantime, I just have her on Firefox, which has no printing issue, and have showed her how to temporarily change e-mail messages from HTML to text format in Office 2K3 when printing. It just seems to be HTML in general that this issue is centered on. She has no trouble printing anything else from Windows… Word, Excel, accounting software, pictures.

    Just to be clear, her error is…

    Line: 639
    Char: 1
    Error: Invalid Argument
    Code: 0
    Url: res://c:\windows\system\shdoclc.dll/preview.dlg

    But thanks for the great information in any case!

    Posted June 14, 2007 @ 12:14 pm
  38. Species8372 says:

    For those having a problem with Line 1345:
    If a page has a frameset and one frame is of size zero this error will occur. So its an error dependent of the site you want to print.

    Posted July 6, 2007 @ 12:18 am
  39. Bill says:

    Go to Start Run and type in the ” regsvr32 iepeers.dll ” Enter, it will automatically register. This solved my problem of :-
    Line: 639
    Char: 1
    Error: Invalid Argument
    Code: 0
    Url: res://c:\windows\system\shdoclc.dll/preview.dlg

    Many thanks to Brian and Rayc your suggestion help alot.


    Posted February 1, 2008 @ 3:12 am
  40. Roel says:

    I had a similar error, when trying to print from outlook express (on windows xp pro). The reported error line was 1345. The proposed solution with iepeers.dll didn’t seem to work. I found my solution on another page, and it had to do with ole32.dll. Solution:

    start > run > regsvr32 ole32.dll

    Thanx for this post anyway! Hope this variation to the problem will be usefull to others too.


    Posted September 1, 2008 @ 6:53 am
  41. Siuloi says:

    It works,

    Posted October 21, 2008 @ 2:05 am
  42. Holly says:

    Had the same problem with a bit of variation to it:

    nternet Explorer Script Error
    ! An error has occurred in the script on this page
    Line: 228
    Char: 1
    Error: Automation server can’t create object
    Code: 0
    URL: res://C:\WINDOWS\system32\shdoclc.dll/preview.dlg
    Do you want to continue running scripts on this page?
    [ Yes ] [ No ]

    javascript engine in IE was broken. Ran the following to fix it:

    RegSvr32 actxprxy.dll
    RegSvr32 shdocvw.dll

    Posted April 8, 2009 @ 10:03 am
  43. bruno says:

    A firend’s Dell Dimension 4500S XP home has FIle not found error ! C:\WINDOWS\System32\shdoclc.dll/preview.dlg
    I cannot find file on the system. I looked at the windows XP CD and I could not find it. It is not on my XP pro comuter either.
    I cannot find the file on the internet. I want to get a copy and load it on the computer.
    Can some email the preview.dlg file ????
    Can someone tell me how to get it off the Dell disks.
    What program installs the preview.dlg file???

    Thanks Bruno

    Posted April 29, 2009 @ 8:39 pm
  44. bruno says:

    The friends’ computer Dell Dimension 4500S XP home and the FIle [preview.dlg] not found error shows up when we try to print anything. No print from IE, word, etc.. Can’t get anything to print.
    Thanks Bruno

    Posted April 29, 2009 @ 8:48 pm
  45. bruno says:

    noone has responded to my messages 43 and 44 yet.

    Can some email the preview.dlg file ????


    Posted May 10, 2009 @ 10:27 am

Write Comment