locked
C# COM Object and BLOCKED SCRIPT Issues RRS feed

  • Question

  • User39163625 posted

     I created a DLL using C# and

    1    using System;
    2    using System.Data;
    3    using System.Data.SqlClient;
    4    using System.Runtime.InteropServices;
    5   
    6    namespace Testing.App
    7    {
    8        [Guid("7eb3ed5c-6ece-4423-bca9-d5a842502769"),
    9            ClassInterface(ClassInterfaceType.None),
    10           ProgId("App.Validations")]
    11  
    12       public class Validations
    13       {
    14        //.........
    15        //Validation Methods and stuff here
    16        //

    17  
    18           #region " Public Methods "
    19  
    20  
    21           public static string ValidateLoan(System.String ID)
    22           {
    23               return "ErrorMsgs";
    24  
    25           }
    26  
    27           public static Array ValidateLoanByLoanNumber(System.Int32 ID)
    28           {
    29              
    30               return "BlahBlah";
    31  
    32           }
    33  
    34           #endregion
    35  
    36       }
    37   }
    38  

    I regasm the DLL

    I created the following test VBScript file

    1    wscript.echo "hi"
    2   
    3    Set objValidation = CreateObject("App.Validations")
    4   
    5    objValidation.ValidateLoanByLoanNumber(2)
    6   
    7    wscript.echo "hi"

    The object is created fine, but when it gets to line 5 it gives me the following error

    Error: "The system cannot find the file specified."
    Code: "80070002"

     

    Please help, thank you!

    Friday, May 23, 2008 10:46 AM

All replies