locked
Retrieving COM class error when using Microsoft Script Control in C# RRS feed

  • Question

  • I meet with a problem when using Microsoft Script Control. When I tried to run the following code:

    Code Snippet

    MSScriptControl.ScriptControl sc = new MSScriptControl.ScriptControl();

     

     

    I received an error message:

    Retrieving the COM class factory for component with CLSID {0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC} failed due to the following error: 80040154.

     

    For what I did, I just install that control and add reference "Interop.MSScriptControl.dll" to my c# project. My operating system is windows server 2008 (I'm not sure whether it is related to this issue.) Since I'm quite unfamiliar with COM, I felt lost where the problem is. If anyone happen to know this issue, please kindly shed some light on me. Thanks in advance.

     

     

    Monday, August 13, 2007 8:48 AM

Answers

  • Hi,

     

    try to modify your project's platform from 'Any CPU' to 'X86' .

    This is common problem for X64 Environment .

     

    Monday, August 13, 2007 11:39 AM

All replies

  • Yes it is related to the Windows Server 2008 I believe..

    Monday, August 13, 2007 9:16 AM
  • Hi,

     

    try to modify your project's platform from 'Any CPU' to 'X86' .

    This is common problem for X64 Environment .

     

    Monday, August 13, 2007 11:39 AM
  •  

    Thanks. It works now. :-)
    Tuesday, August 14, 2007 2:38 AM
  •  help!anyone knows how to solve this problem,please tell me the way!
    • Edited by bluefox_qbc Friday, November 7, 2008 4:23 AM
    Friday, November 7, 2008 4:23 AM