VB6中使用mscoree.CorRuntimeHost的.Net Hosting会导致“Object Required”错误

时间:2018-06-01 05:47:30

标签: .net vb6

我需要在VB6环境中使用AIEncryptor.dll(这是一个.net dll),但它在vb6环境中显示“Object Required”错误。为什么会这样。有人请帮帮我

我不能用regasm.exe注册这个lib吗?

这是我的vb6代码

Dim CORHost As New mscoree.CorRuntimeHost
Dim domain As AppDomain

Dim AssemblyFilename As String
Dim Classname As String
Dim Result As Object
Dim objEnc As Object


AssemblyFilename = "D:\MyProject\AIEncryptor.dll"
Classname = "AcceleratedIdeas.AIEncryptor"

CORHost.Start
CORHost.CurrentDomain domain


Set Result = domain.CreateInstanceFrom(AssemblyFilename, Classname).Unwrap
  Result.InitVector = "@1B2c3D4e5F6g7H8"

您可以从here

下载AiEncryptor.dll

0 个答案:

没有答案