RE: MI Callback to Mapbasic from DLL - is it possible?

2000-01-11 Thread Anton de Gruchy

I do this through DDE.  I set up a DDE link between my DLL and the MapBasic.
Then I use the MapBasic DDE handler to react to my commands.

The AutoSave on my web site is an example

if you would like more info contact me.

Anton de Gruchy
-
MapIT - GIS Program development
35 Settlers Drive
Edgemead, 7441
Cape Town, South Africa
Ph: 27 021 5580256
Fax: 27 021 5590147
Cell: 082 855 9747
e-mail [EMAIL PROTECTED]
URL: http://home.global.co.za/~jwdeg

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alan Hale
Sent: Thursday, 6. January 2000 12:26
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: MI Callback to Mapbasic from DLL - is it possible?


Yes, this is precisely what I wish to do. In more detail, I am building a
form in a Delphi DLL which includes a form with a listbox, to which I will
pass (through a Mapbasic program) items derived from a MapInfo table. Each
time I select an item in the listbox I want to pass back the item name to my
Mapbasic program, and trigger a function/procedure to map from the item
name.

It looks a s though what you and others have suggested will allow me to do
what I require (though I'm going to have to think about it some more. Thanks
very much.





***
Alan Hale
Area Ecologist, West Area
Countryside Council for Wales
Plas Gogerddan
Aberystwyth SY23 3EE
Tel.: 01970 821100
Email: [EMAIL PROTECTED]
***


 HENROTAY PIERRE [EMAIL PROTECTED] 06 January 2000 
If my understanding of your question is correct, you want to execute a
MapBasic function or subroutine or statements from a DLL (called itself from
an MBX).
A possibility is to use integrated mapping (via DDE or - recommended - OLE
automation).
This way you may:
- execute a single MapBasic command and run an MBX
- exchange infos (global variables) with an MBX
- send infos to an MBX, making use of its RemoteMsgHandler (or
RemoteQueryHandler); that one can parse the infos retrieved and dispatch to
an appropriate function/subroutine

Pierre


!
!

--
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]



RE: MI Callback to Mapbasic from DLL - is it possible?

2000-01-10 Thread Alan Hale

Thanks for this code - yes, it was very helpful in understanding how to work this. One 
point - as it stands the example never calls the custom Endhandler routine (there is 
no code in the Mapbasic RemoteMsghandler to deal with a return value of 'closed'. I 
dealt with this simply by 'if commandinfo(CMD_INFO_MSG) = "Closed" then End Program'.

I appreciate your assistance.

Regards



***
Alan Hale
Area Ecologist, West Area
Countryside Council for Wales 
Plas Gogerddan
Aberystwyth SY23 3EE
Tel.: 01970 821100
Email: [EMAIL PROTECTED]
***


 HENROTAY PIERRE [EMAIL PROTECTED] 06 January 2000 
Maybe the following could be of interest; this illustrates a modeless form
which communicates with MapBasic via OLE automation; most of the code for
handling the modeless form was borrowed from the MapInfo FTP site
(contribution from Robert Edwards,
The MapTools Company); the OLE part is unpublished.
Code is Delphi and was tested with Delphi 3. The MapBasic code is provided
as well.
Hope this helps.
Pierre
 example.zip 

   
   
   
   
   
   
   
   
   
   
   
  !
!
!
   
   
   
   
   
   
  
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]