I am translating a dll that was written on C#, and I am having some troubles to translate a string declaration. The code in C# is as follows:
using BGMC_TypeDefs;
using stdole;
using System.Runtime.CopilerServices;
using System.Runtime.InteropServices;
namespace bgmcproject
{
[Guid("3C69B26B-8D17-11D3-BA9C-00E09803AA6A")]
[ClassInterface(0)]
[ComSourceInterfaces("bgmcproject.__bgmc\0\0")]
[TypeLibType(32)]
[ComImport]
public class bgmcClass : _bgmc, bgmc, __bgmc_Event
{
[DispId(1745027134)]
public virtual extern string szMachineImg { [DispId(1745027134), MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] [param: MarshalAs(UnmanagedType.BStr), In] set; }
}
}
I already translated some of the code, and I ended up with this:
Imports BGMC_TypeDefs
Imports stdole
Imports System.Runtime.CompilerServices
Imports System.Runtime.InteropServices
Namespace bgmcproject
<Guid("3C69B26B-8D17-11D3-BA9C-00E09803AA6A")>
<ClassInterface(0)>
<ComSourceInterfaces("bgmcproject.__bgmc\0\0")>
<TypeLibType(32)>
<ComImport>
Public Class bgmcClass
Implements _bgmc, bgmc, __bgmc_Event
<DispId(1745027134)>
Public virtual external String szMachineImg _
(<DispId(1745027134), MethodImpl(MethodImplOptions.InternalCall, _
MethodCodeType = MethodCodeType.Runtime)> _
<param MarshalAs(UnmanagedType.BStr), In> Set )
End Class
End Namespace
I would like to know how write the declaration of the szMachingeImg. Also if you can help me to clarify, if the "Implements" statement is correct, or I should write "Inherits". Many thanks in advance.