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

Reply via email to