I am trying to call a C # dll from QTP (uses vbscript). I tried several things without success:
- Visual studio 2010
- Create C # class libary (st.dll)
code:
using System;
using System.Collections.Generic;
using System.Text;
namespace st
{
public class Class1
{
public static int GetValue()
{
return 34;
}
}
}
regasm /codebase st.dll- fail "because it is not a valid .NET assembly
In QTP / vbscript I tried
extern.Declare micInteger, "GetValue", "e:\st.dll", "GetValue"- Returns the message: "Invalid call or procedure argument"
Regardless of QTP, I would really appreciate how to call C # dll from a .vbs file.
source
share