Здравствуйте!
Пытаюсь реализовать доступ через COM к классу на VB.NET
<ComVisible(True), System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDual), Guid("2D3C74CA-18A0-4A2F-8E0D-05ECA4795121"), ProgId("Google_AdWordsExamplesVB.Test")>
Public MustInherit Class Test
Public Sub New()
Description = "TestVB"
End Sub
''' <summary>
''' Returns a description about the code example.
''' </summary>
Public Description As String
End Class
Сборка не подписана, регистрирую ее следующим bat
%systemdrive%\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /codebase Google.AdWords.dll /tlb:Google.AdWords.tlb
%systemdrive%\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /codebase Google.AdWords.Examples.VB.dll /tlb:Google.AdWords.Examples.VB.tlb
Регистрация проходит успешно
Windows 7 64 bit
В реестре найти guid 2D3C74CA-18A0-4A2F-8E0D-05ECA4795121 не удается
код Js не работает.
var obj = new ActiveXObject("Google_AdWordsExamplesVB.Test");
WScript.echo(obj.Description);
Самое интересное, что регистрация аналогичного класса на С# прошла успешно.
[ComVisible(true), ClassInterface(ClassInterfaceType.AutoDual), ProgId("Google_AdWordsCS.Test")]
public class Test
{
public Test() { ;}
public string Description { get; set; }
}
c помощью аналогиченого bat
%systemdrive%\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /codebase Google.AdWords.dll /tlb:Google.AdWords.tlb
%systemdrive%\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /codebase Google.AdWords.Examples.CSharp.exe /tlb:Google.AdWords.Examples.CSharp.tlb
В чем может быть проблема?