Re: Passing Window Handle from Com to VB.NET

From: Fabian Schmied (REMOVETHISfabianDOTschmied_at_fhs-hagenbergDOTacDOTat)
Date: 05/26/04


Date: Wed, 26 May 2004 09:52:37 +0200

Ron Green schrieb:

> I have a COM DLL that exposes an Interface which takes
> the window handle of a VB.NET picturebox.
>
>
> In COM DLL (Inprocess server)
>
> STDMETHOD(InitializeVideo)( HWND parentWindow );
>
>
> In VB.NET Application:
> Grabber.InitializeVideo(Me.cPictureBoxLiveVideo.Handle())
>
> VB complains: "Value of type 'System.IntPtr cannot be converted to
> remotable handle"
>
>
>
> What is the proper way to pass a Window handle from a COM DLL to a VB.NET
> App?

This isn't related to DirectX. You might get more answers on a .NET
newsgroup. Most appropriate seems microsoft.public.dotnet.framework.interop.

Fabian