RE : [MI-L] MBX error: Dll not found even if it's there

2006-10-20 Thread Christophe Brabant
Of course, I use Depends.exe from VisualStudio suite.

Chris

-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Uffe
Kousgaard
Envoyé : mardi 17 octobre 2006 15:45
À : Mapinfo-L
Objet : Re: [MI-L] MBX error: Dll not found even if it's there


- Original Message - 
From: Christophe Brabant [EMAIL PROTECTED]

 By this way, if DLL1.dll depends of many other DLL's, it's hard to 
 know which DLL is really missing.

Then you need an application like showdep, which shows DLL dependancies as a

hierarchy. Invaluable tool for situations like this.

Kind regards

Uffe Kousgaard
www.routeware.dk

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE : [MI-L] MBX error: Dll not found even if it's there

2006-10-17 Thread Christophe Brabant
Never had this problem with DLL's.

I always locate the DLL's in the same folder containing MBX application.

ANOTHER PROBLEM I HAVE ENCOUNTERED WITH DLL'S
=
(it could help someone one day...)

If a MBX application uses a DLL1.dll, and if DLL1.dll depends of DLL2.dll :
When the first call to DLL1.dll is done, if DLL2.dll is missing, the error
message is DLL1.dll not found. This is a wrong message.
By this way, if DLL1.dll depends of many other DLL's, it's hard to know
which DLL is really missing.

Chris

-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Thomsen, Bo
Victor
Envoyé : lundi 16 octobre 2006 11:45
À : Jeff H.
Cc : mapinfo-l@lists.directionsmag.com
Objet : SV: [MI-L] MBX error: Dll not found even if it's there


Jeff - 

I've encountered the same problem and I suspect it is some kind of timing
problem - the dll's is not loading fast enough. For me, the problem
typically occurs when the dll's are located on a moderately slow networked
drive.
Try to collect all your dll's and the mbx in the _same_ directory on the
pc's _local_ hard drive.

I'll assume your dll uses the dispatch id to generate a com object of the
current MapInfo instance and use this object to remote control MapInfo. If
that's the case , have you had any problem with MapInfo loosing focus ? And
maybe solved this problem ?? 

NB! I'm using Delphi, not C/C++ , but I don't think that the difference in
language matters.

Regards 
Bo Thomsen 
GeoConsult I/S

-Oprindelig meddelelse-
Fra: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] På vegne af Jeff H.
Sendt: 12. oktober 2006 12:34
Til: mapinfo-l@lists.directionsmag.com
Emne: [MI-L] MBX error: Dll not found even if it's there

Hi,

I created a dll in C/C++ and exported one of its functions in order to be 
able to call it from MapBasic. Then I created a small .mbx file that calls 
that function. This works just fine as when my mbx is executed it runs my 
dll exported function. So my dll function is exported correctly as MapBasic 
expect it.

Recently I changed my dll by adding more dll dependencies on it (my dll 
depends on other dll's). I noticed an *intermittent* problem. When my mbx 
get executed I get this error that my dll could not be found and my mbx does

not get loaded nor executed. If i try the same operation again it works. So 
it appears to me like an *intermittent* problem. I'm not sure what the 
source of this problem. Would it be a racing problem as MapBasic tries to 
load my dll and fails as MapInfo Pro is still not completely loaded?

Have any one encountered a similar problem?

Thank you

Jeff Lacoste

ps: My dll and all it dependent dll are present. My equivalent mapbasic 
function has an input argument the MapInfo Dispatch ID. I'm using 
systemInfo(17) to pass the current running MapInfo Pro Dispatch ID to my 
C/C++ function to use it.


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l




___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MBX error: Dll not found even if it's there

2006-10-17 Thread Jeff H.
I'll try out the two suggested solutions: MapBasic and C++ (looping to get 
things a chance to be loaded). As this is an intermittent problem I may not 
know, for sure, if this fixes realy the problem. But i'll give it a try.


Thanks Spencer for the provided help.

Jeff Lacoste



From: Spencer Simpson [EMAIL PROTECTED]
To: 'Jeff H.' [EMAIL PROTECTED], mapinfo-l@lists.directionsmag.com
Subject: RE: [MI-L] MBX error: Dll not found even if it's there
Date: Mon, 16 Oct 2006 10:06:36 -0400

I think Jeff is actually on the right track.  We had an application here at
BMC that would work only if a certain amount of time had passed since
MapInfo started, so the coder added a loop to make the program sleep for 
a

few seconds before beginning.

I've never tried calling back to MapInfo from a DLL, so I don't know if 
this

will work.

But if you tried

Update Window WIN_MAPINFO

at the beginning of Sub Main in your MapBasic app, it might clear out the
MapInfo window's message queue and force everything to be initialized.
If that doesn't work, a sleep loop may be your only alternative.
Regardless of what you do in MapBasic, you should definitely handle this
error in your C++ code.

Hope this helps
Spencer



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff H.
Sent: Thursday, October 12, 2006 6:34 AM
To: mapinfo-l@lists.directionsmag.com
Subject: [MI-L] MBX error: Dll not found even if it's there

Hi,

I created a dll in C/C++ and exported one of its functions in order to be
able to call it from MapBasic. Then I created a small .mbx file that calls
that function. This works just fine as when my mbx is executed it runs my
dll exported function. So my dll function is exported correctly as MapBasic
expect it.

Recently I changed my dll by adding more dll dependencies on it (my dll
depends on other dll's). I noticed an *intermittent* problem. When my mbx
get executed I get this error that my dll could not be found and my mbx 
does


not get loaded nor executed. If i try the same operation again it works. So
it appears to me like an *intermittent* problem. I'm not sure what the
source of this problem. Would it be a racing problem as MapBasic tries to
load my dll and fails as MapInfo Pro is still not completely loaded?

Have any one encountered a similar problem?

Thank you

Jeff Lacoste

ps: My dll and all it dependent dll are present. My equivalent mapbasic
function has an input argument the MapInfo Dispatch ID. I'm using
systemInfo(17) to pass the current running MapInfo Pro Dispatch ID to my
C/C++ function to use it.


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l






___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MBX error: Dll not found even if it's there

2006-10-17 Thread Spencer Simpson
I think Jeff is actually on the right track.  We had an application here at
BMC that would work only if a certain amount of time had passed since
MapInfo started, so the coder added a loop to make the program sleep for a
few seconds before beginning. 

I've never tried calling back to MapInfo from a DLL, so I don't know if this
will work.

But if you tried 

Update Window WIN_MAPINFO

at the beginning of Sub Main in your MapBasic app, it might clear out the
MapInfo window's message queue and force everything to be initialized.
If that doesn't work, a sleep loop may be your only alternative.
Regardless of what you do in MapBasic, you should definitely handle this
error in your C++ code.

Hope this helps
Spencer



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff H.
Sent: Thursday, October 12, 2006 6:34 AM
To: mapinfo-l@lists.directionsmag.com
Subject: [MI-L] MBX error: Dll not found even if it's there

Hi,

I created a dll in C/C++ and exported one of its functions in order to be 
able to call it from MapBasic. Then I created a small .mbx file that calls 
that function. This works just fine as when my mbx is executed it runs my 
dll exported function. So my dll function is exported correctly as MapBasic 
expect it.

Recently I changed my dll by adding more dll dependencies on it (my dll 
depends on other dll's). I noticed an *intermittent* problem. When my mbx 
get executed I get this error that my dll could not be found and my mbx does

not get loaded nor executed. If i try the same operation again it works. So 
it appears to me like an *intermittent* problem. I'm not sure what the 
source of this problem. Would it be a racing problem as MapBasic tries to 
load my dll and fails as MapInfo Pro is still not completely loaded?

Have any one encountered a similar problem?

Thank you

Jeff Lacoste

ps: My dll and all it dependent dll are present. My equivalent mapbasic 
function has an input argument the MapInfo Dispatch ID. I'm using 
systemInfo(17) to pass the current running MapInfo Pro Dispatch ID to my 
C/C++ function to use it.


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MBX error: Dll not found even if it's there

2006-10-17 Thread Uffe Kousgaard
- Original Message - 
From: Christophe Brabant [EMAIL PROTECTED]



By this way, if DLL1.dll depends of many other DLL's, it's hard to know
which DLL is really missing.


Then you need an application like showdep, which shows DLL dependancies as a 
hierarchy. Invaluable tool for situations like this.


Kind regards

Uffe Kousgaard
www.routeware.dk

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MBX error: Dll not found even if it's there

2006-10-17 Thread Uffe Kousgaard
- Original Message - 
From: SCISOFT [EMAIL PROTECTED]



showdep? Is that any better than Dependency Walker (free Microsoft 
utility)?


No idea. I have just been using the other one, since someone sent it to me 
and it has helped me in a few situations.



Kind regards

Uffe Kousgaard
www.routeware.dk

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MBX error: Dll not found even if it's there

2006-10-17 Thread SCISOFT
Uffe
showdep? Is that any better than Dependency Walker (free Microsoft utility)?
I have a couple of versions of DW - v2.1.3623 seems to be the most recent
(16April2002 build; Win32 only). 

IL Thomas
GeoSciSoft - Perth, Australia

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Uffe
Kousgaard
Sent: Tuesday, October 17, 2006 9:45 PM
To: Mapinfo-L
Subject: Re: [MI-L] MBX error: Dll not found even if it's there

- Original Message - 
From: Christophe Brabant [EMAIL PROTECTED]

 By this way, if DLL1.dll depends of many other DLL's, it's hard to know
 which DLL is really missing.

Then you need an application like showdep, which shows DLL dependancies as a

hierarchy. Invaluable tool for situations like this.

Kind regards

Uffe Kousgaard
www.routeware.dk

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.4/477 - Release Date: 16/10/2006

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MBX error: Dll not found even if it's there

2006-10-17 Thread Ihab Hawater


Hi, 

We encountered the same issue with one of our tools and the work around that 
we have found is to run the MapBasic tool through the MapInfo Professional 
'Run MapBasic Program ...' (of the 'Tools' menu). 

Ihab Hawater 


- Original Message -
From: Christophe Brabant [EMAIL PROTECTED] 


By this way, if DLL1.dll depends of many other DLL's, it's hard to know
which DLL is really missing.


Then you need an application like showdep, which shows DLL dependancies as a
hierarchy. Invaluable tool for situations like this. 

Kind regards 


Uffe Kousgaard
www.routeware.dk
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l