All,

I would like to make one correction to the generally correct response from
Chris.

VB created ActiveX DLLs (and ActiveX EXEs) can be used by any other language
which supports the COM interface (C++, Powerbuilder, Delphi, VBA, ASP).
MapBasic does not support the COM interface.

- Brad

> -----Original Message-----
> From: Chris Martin [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, February 07, 2000 6:08 AM
> To:   MapInfo-L; Bill Thoen
> Subject:      Re: MI Can MapBasic call routines in ActiveX DLLs?
> 
> I've been asking around about this; I would like to be able to share 
> some VB code (access to Win32API, common functions, etc.) with 
> MapBasic. Currently, I cut and paste the code, then make the 
> necessary syntax modifications... Not too much of an ordeal, but 
> could it be better?
> 
> The answer so far seems to be a resounding NO!
> 
> If you haven't already done so, non-VB/MB people can switch off 
> now...
> 
> The new VB5/6 DLLs are ActiveX DLLs or COM Servers. It doesn't really 
> matter what all this means apart from the fact you can't access the 
> functions inside from other languages. There are ways around, but 
> they start at complex, then get a bit worse (in my view).
> 
> You can apparently write some sort of interface in C++ or 
> alternatively re-write completely in C++. And there are one or two 
> 3rd-party tools that help; I've been told that Desaware's SpyWorks 
> will give you some kind of export capability that will do the biz. 
> But unless some new information comes in, I shall stick to cutting 
> and pasting....
> 
> Some words from one of my sources:
> "Use of VB DLL's is made through COM who takes charge of making "visible"
> the appropriate classes.
> 
> In normal DLL's an Export Table is generated where all public 
> function names and their parameters are written. Any program can then 
> import that library (that's what you do when you DECLARE an api 
> function)  and use its functions.
> 
> Unfortunately, as VB DLL's are COM servers, the only functions that they
> export are to register and un register the server. There's no other 
> functionality you can access."
> 
> 
> > A while ago Chris Martin's summary on how to get custom icons
> > into MapInfo interested me enough to wonder what else you can do
> > with this technique. Basically --and this works great-- you can
> > create a custom ActiveX DLL that will allow you to use all sorts of
> > home-made icons like so:
> > 
> > 1) Create a new ActiveX DLL project
> > 2) Open resource editor, and add your custom bitmap pairs
> > 3) Save resource file in Project
> > 4) Save and compile project
> > 5) Distribute...
> > 6) When selecting icon, specify pathname of DLL
> >           eg. ICON 1002 FILE "MyIcons.DLL"
> > 7) Sit back and impress friends and colleagues, with smiley faces
> > and 
> >      Bunny Wabbits.....
> > (You need at least VB 6 or you won't have the Resource Editor.)
> > 
> > But my question now is, can you make ActiveX DLLs that can
> > contain functions and subprograms that can be called from MapInfo
> > like you can with the earlier style DLLs? If so, does anyone have a
> > small example? I know VB can't do the old style DLLs, but it's VB
> > that I have now, so it would be neat to be able to use to make new
> > style DLLs, if they could be made to work with MapBasic. Can this be
> > done?
> > 
> > - Bill Thoen
> > --------------------------------------------------------------------
> > - To unsubscribe from this list, send e-mail to [EMAIL PROTECTED]
> > and put "unsubscribe MAPINFO-L" in the message body, or contact
> > [EMAIL PROTECTED]
> 
> CJ Martin
> GIS Consultant
> WS Atkins Consultants Ltd
> (01952) 201234
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to