QTPからC#dllを呼び出そうとしています(vbscriptを使用)。私はいくつかのことを試みましたが成功しませんでした:
- Visual Studio 2010
- C#クラスライブラリ(st.dll)を作成する
コード:
using System;
using System.Collections.Generic;
using System.Text;
namespace st
{
public class Class1
{
public static int GetValue()
{
return 34;
}
}
}
regasm /codebase st.dll
- 失敗する'有効な.NETアセンブリではないため'
QTP / vbscriptで、私は試しました
extern.Declare micInteger, "GetValue", "e:\st.dll", "GetValue"
- メッセージを返します:'無効なプロシージャ呼び出しまたは引数'
QTPに関係なく、.vbsファイルからc#dllを呼び出す方法についての洞察をいただければ幸いです。