Click to See Complete Forum and Search --> : How to pass ActiveX object into COM server


dhunter
May 7th, 1999, 01:46 PM
In ASP page, I create an ActiveX object (specifically an Mapinfo MapX object) and an ATL COM server with MFC support that I created using Visual C++ 6.0. I need to pass the MapX object into the server, so that I can create map GIFs, etc. I created a CComVariant property to do this, and set it up in the ASP page like this:

Dim ghtml
Dim hcor
Dim hmap
Set hcor = Server.CreateObject("MapInfo.MapXcourier")
Set hmap = hcor.GetMapXFromNewServer("ky.gst")
Set ghtml = Server.CreateObject("GhtmlEngine.ghtmlGen.1")
ghtml.CMapX = hmap

In the server (ghtml), I try to manipulate the map object, but can't seem to find the right way to convert/cast the CMapX property to do this. Am I totally off base, or is there some trick I need to know?