Thanks Bo. All the dll are actualy in the same folder as the mbx and they are in a local drive. This issue started to happen only when i added more dependency into my dll. Which leaded me to think about a racing problem.

Yes I'm using a dispatch ID in order to be able to *talk* to the running MapInfo Pro instance and this works fine. I did not encounter any focus loss.

Jeff Lacoste




From: "Thomsen, Bo Victor" <[EMAIL PROTECTED]>
To: "Jeff H." <[EMAIL PROTECTED]>
CC: <mapinfo-l@lists.directionsmag.com>
Subject: SV: [MI-L] MBX error: Dll not found even if it's there
Date: Mon, 16 Oct 2006 11:45:18 +0200

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

Reply via email to