使用RegAsm.exe \ TSTestHarnessWCFClient.dll / codebase
访问在注册表中注册的COM对象时出现问题这是VBScript代码:
Set oTestHarness = CreateObject("ProgramIDOfCOM")
If oTestHarness.Init("EnvName", "UserName") = false then
MsgBox("Test Harness cannot be initialized")
End If
错误代码:80131534
构造函数内的代码
public TestHarnessCOM_Class()
{
ChannelFactory<ITestHarnessExecutor> pipeFactory =
new ChannelFactory<ITestHarnessExecutor>(
new NetNamedPipeBinding(),
new EndpointAddress(
"net.pipe://localhost/PipeTestHarness"));
pipeTestHarness = pipeFactory.CreateChannel();
((IContextChannel)pipeTestHarness).OperationTimeout = new TimeSpan(2
, 0, 0);
}