Dean Although you’re better off reading a
C or C++ first-principles book, there’s a simple project / article on the
CodeProject which gives a recipe for the simplest C-callable DLLs but I think
you will need to get a not-free (but still cheap) version of Visual Studio 2005
so that you can build it using C++ (not C#). I don’t think there is an
Express version of C/C++ available. The article is called “Super Easy DLL”
by Greg Ellis written December 2004 for Visual C++ 6.0 - www.codeproject.com/dll/EasyDLL.asp Of course, the example given in this very
short article is trivial. If you go this path, read the comments /
warnings to the article (at the bottom), since this isn’t the panacea for
all DLL development. But, as has been pointed out several times
here by the experts, IL Thomas From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of McGowan Dean I have written a dll in
C# express edition and would like to call its functions from MapBasic. Here are
my scripts: C# using
System; using
System.Collections.Generic; using
System.Text; using
System.Data; namespace
MapInfoTools {
public class MIFunctions
{
public double GPS_X()
{
//Return test value for now.
return 1;
}
public double GPS_Y()
{
//Return test value for now.
return 2;
}
} } MB Declare
Function GPS_X Lib
"C:\Projects\C#\MapInfoTools\MapInfoTools\obj\Release\MapInfoTools.dll"
as float print GPS_X() My MB application
compiles correctly but produces error 342 (“External library does not
contain GPS_X…”) at runtime. Can anybody point out where I am going
wrong? Cheers, Dean Dean McGowan GIS
Injengör Teknik
& Service Upplands
Väsby kommun |
_______________________________________________ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l