Re: How to write in VB.NET from this code?

Tech-Archive recommends: Speed Up your PC by fixing your registry



Tom,

You old VB6 guys show in fact often a lack of that.

You all are experts in taken all kind of interfaces, Api's or whatever for
what is now mostly an easier to maintenance class not in the language but in
the .Net and therefore for everybody.

It was just the thought I wanted to deal with you.
(And tickling for a reaction from Herfried)

:-)

Cor

"Tom Shelton" <tom_shelton@xxxxxxxxxxxxxxxxxx> schreef in bericht
news:zZGdnT7Q2bWq5kzYnZ2dnUVZ_hqdnZ2d@xxxxxxxxxxxxxx
On 2007-02-13, Cylix <cylix2000@xxxxxxxxx> wrote:
The following is a c# code about using browser helper object(BHO)
anyone know in VB.NET?

[
ComVisible(true),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
Guid("FC4801A3-2BA9-11CF-A229-00AA003D7352")
]
public interface IObjectWithSite
{
[PreserveSig]
int SetSite([MarshalAs(UnmanagedType.IUnknown)]object site);
[PreserveSig]
int GetSite(ref Guid guid, out IntPtr ppvSite);
}

Thanks a lot.


hmmm, something like:

< _
ComVisible(true), _
InterfaceType(ComInterfaceType.InterfaceIsIUnknown), _
Guid("FC4801A3-2BA9-11CF-A229-00AA003D7352") _

Public Interface IObjectWithSite
<PreserveSig> _
Function SetSite _
(<MarshalAs(UnmanagedType.IUnknown)> site As Object) As Integer

<PreserveSig> _
Function GetSite _
(ByRef guid As Guid, ByRef ppvSite As IntPtr) As Integer
End Interface

Anyway, that should be fairly close :)

--
Tom Shelton


.



Relevant Pages

  • Re: limit of lines?
    ... [GUID] ... IValueType = interface ... property FormatString: string ... This brings back 5 cells for the Order and 5 cells for each of the related ...
    (borland.public.delphi.non-technical)
  • Re: classes/ interface/device-setup/etc
    ... the guid in is the setup class, typically an INF will have nothing ... >>> I have a very unique device that needs an interface class of its own. ... They register the same GUID. ...
    (microsoft.public.development.device.drivers)
  • Re: classes/ interface/device-setup/etc
    ... > I have a very unique device that needs an interface class of its own. ... They register the same GUID. ... > And where does the [ClassInstall32] section of the .inf file fit into ... this set display name of class and icon - As icon I use standard usb icon. ...
    (microsoft.public.development.device.drivers)
  • Re: IConnectionPointContainer & C#
    ... interface proxy marshalling, and I'm not surprized that something is getting ... void IConnectionPointContainer.FindConnectionPoint(ref Guid riid, out ... IConnectionPoint ppCP) ... But the COM client that gets this IConnectionPoint ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: use createfile to access usb device
    ... GUID_DEVCLAS_USB is a device class. ... Not all USB devices have the same interface, ... If you don't know the device interface GUID for the ... >> SetupDiEnumDeviceInterfaces() and SetupDiGetDeviceInterfaceDetail. ...
    (microsoft.public.development.device.drivers)