Re: SV: [Spam] Re: [MI-L] DLL function name limit
Thank you fro the tip, Bo, but it did not work.Any other ideas? Is there a limit for the DLL also that the function names must be a maximum of 31 characters like other MapInfo symbol names? Regards Rakesh On 26 Sep 2006 at 14:04, Thomsen, Bo Victor wrote: > Hi Rakesh - > > Try to change the place of the function name and the alias: Instead of this: > > Declare Function IClientObject_ShowImageServicesDialog Lib "ISClientC.dll" > Alias "ShowServices" (ByVal object as Integer, showImageServicesXml as String) as String > > try this: > > Declare Function ShowServices Lib "ISClientC.dll" Alias " IClientObject_ShowImageServicesDialog" (ByVal object as Integer, showImageServicesXml as String) as String > > > call the function like this: > > sArg2 = space$ (255) > sVal = ShowServices (nArg1, sArg2) > > > Regards > > Bo Thomsen > GeoConsult I/S > Denmark > > -Oprindelig meddelelse- > Fra: [EMAIL PROTECTED] [mailto:mapinfo-l- [EMAIL PROTECTED] På vegne af Rakesh Rao > Sendt: 26. september 2006 13:03 > Til: mapinfo-l@lists.directionsmag.com > Emne: [Spam] Re: [MI-L] DLL function name limit > > > Hi Bill, > > Thank you for your reply. No, the Alias clause did not help either. > --- > // Below function name compiled correctly but does not link, gives a run-time > error saying that > the function does not exist in DLL > > IClientObject_ShowImageServicesDialog > > > // Below function does not compile at all, gives an error saying that > function is already > defined. It appears to be taking only the furst 32 signifiant characters in > the function name. > > IClientPropertiesDialog_ShowPropertyPage > > > ' Declaration in header file > > Declare Function IClientObject_ShowImageServicesDialog Lib "ISClientC.dll" > Alias > "ShowServices" (ByVal object as Integer, showImageServicesXml as String) as > String > > Declare Function IClientPropertiesDialog_ShowPropertyPage Lib "ISClientC.dll" > ( ByVal > object as Integer, ByVal pageId as Integer, ByVal parentHandle as Integer ) > as Logical > > Is there a way to get around this, other than having to recompile the DLL and > make changes > at source? > > > Regards > Rakesh > - Rakesh Rao [ rakesh.rao (at)4d-technologies.com ] > - Four Dimension Technologies > [www.4d-technologies.com] > - Get GeoTools, Work smarter: www.4d-technologies.com/geotools > - Free Lisp downloads @ TechCenter: www.4d-technologies.com/techcenter > - View GDF files in AutoCAD, Get GDFViewer with GeoTools > > ___ > MapInfo-L mailing list > MapInfo-L@lists.directionsmag.com > http://www.directionsmag.com/mailman/listinfo/mapinfo-l > > > > > - Rakesh Rao [ rakesh.rao (at)4d-technologies.com ] - Four Dimension Technologies [www.4d-technologies.com] - Get GeoTools, Work smarter: www.4d-technologies.com/geotools - Free Lisp downloads @ TechCenter: www.4d-technologies.com/techcenter ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
RE: SV: [Spam] Re: [MI-L] DLL function name limit
Rakesh, I'm not sure that the problem is that you have a long function name. The error indicates that the function already has been declared some where else in your application. Make sure that you not by mistake have declared the function twice, or that you have a function with a similar name. This other function might even be ocated in a different module, if you have more than one MapBasic module (.mb). Peter Horsbøll Møller GIS Developer, MTM Geographical Information & IT COWI A/S Odensevej 95 DK-5260 Odense S. Denmark Tel +45 6311 4900 Direct +45 6311 4908 Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] http://www.cowi.dk/gis -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rakesh Rao Sent: Tuesday, September 26, 2006 2:38 PM To: mapinfo-l@lists.directionsmag.com Subject: Re: SV: [Spam] Re: [MI-L] DLL function name limit Thank you fro the tip, Bo, but it did not work.Any other ideas? Is there a limit for the DLL also that the function names must be a maximum of 31 characters like other MapInfo symbol names? Regards Rakesh On 26 Sep 2006 at 14:04, Thomsen, Bo Victor wrote: > Hi Rakesh - > > Try to change the place of the function name and the alias: Instead of this: > > Declare Function IClientObject_ShowImageServicesDialog Lib > "ISClientC.dll" Alias "ShowServices" (ByVal object as Integer, showImageServicesXml as String) as String > > try this: > > Declare Function ShowServices Lib "ISClientC.dll" Alias " IClientObject_ShowImageServicesDialog" (ByVal object as Integer, showImageServicesXml as String) as String > > > call the function like this: > > sArg2 = space$ (255) > sVal = ShowServices (nArg1, sArg2) > > > Regards > > Bo Thomsen > GeoConsult I/S > Denmark > > -Oprindelig meddelelse- > Fra: [EMAIL PROTECTED] [mailto:mapinfo-l- [EMAIL PROTECTED] På vegne af Rakesh Rao > Sendt: 26. september 2006 13:03 > Til: mapinfo-l@lists.directionsmag.com > Emne: [Spam] Re: [MI-L] DLL function name limit > > > Hi Bill, > > Thank you for your reply. No, the Alias clause did not help either. > -- > - // Below function name compiled correctly but does not > link, gives a run-time error saying that > the function does not exist in DLL > > IClientObject_ShowImageServicesDialog > > > // Below function does not compile at all, gives an error saying that > function is already defined. It appears to be taking only the furst 32 > signifiant characters in the function name. > > IClientPropertiesDialog_ShowPropertyPage > > > ' Declaration in header file > > Declare Function IClientObject_ShowImageServicesDialog Lib > "ISClientC.dll" Alias "ShowServices" (ByVal object as Integer, > showImageServicesXml as String) as String > > Declare Function IClientPropertiesDialog_ShowPropertyPage Lib > "ISClientC.dll" ( ByVal object as Integer, ByVal pageId as Integer, > ByVal parentHandle as Integer ) as Logical > > Is there a way to get around this, other than having to recompile the > DLL and make changes > at source? > > > Regards > Rakesh > - Rakesh Rao [ rakesh.rao (at)4d-technologies.com ] > - Four Dimension Technologies > [www.4d-technologies.com] > - Get GeoTools, Work smarter: www.4d-technologies.com/geotools > - Free Lisp downloads @ TechCenter: www.4d-technologies.com/techcenter > - View GDF files in AutoCAD, Get GDFViewer with GeoTools > > ___ > MapInfo-L mailing list > MapInfo-L@lists.directionsmag.com > http://www.directionsmag.com/mailman/listinfo/mapinfo-l > > > > > - Rakesh Rao [ rakesh.rao (at)4d-technologies.com ] - Four Dimension Technologies [www.4d-technologies.com] - Get GeoTools, Work smarter: www.4d-technologies.com/geotools - Free Lisp downloads @ TechCenter: www.4d-technologies.com/techcenter ___ 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: SV: [Spam] Re: [MI-L] DLL function name limit
Peter and others, The DLL function names are parsed like all MapBasic identifiers and therefore must be 31 characters or less. Using the MapBasic "alias" is not a solution. If you do have access to the DLL source or can even just relink it, you can use a .DEF file to provide aliases for the actual functions in the Windows export table. This is useful if you would rather not change the names of the functions in the actual source code. A .DEF file is optionally specified at link time and has a number of documented options. One option provides a way to do "aliasing". LIBRARY NAME_OF_DLL EXPORTS NameThatMapBasicLikes=RealNameOfFunction ShowServices=IClientObject_ShowImageServicesDialog When you use this syntax, the public name that anyone will see will be the one on the left. The name on the right becomes internal. Sincerely, Eric Blasenheim Principal Software Architect MapInfo Corporation Mail List:[EMAIL PROTECTED] From: Peter Horsbøll Møller <[EMAIL PROTECTED]> on 10/02/2006 07:38 AM ZE2 To: <[EMAIL PROTECTED]>, cc: Subject: RE: SV: [Spam] Re: [MI-L] DLL function name limit Rakesh, I'm not sure that the problem is that you have a long function name. The error indicates that the function already has been declared some where else in your application. Make sure that you not by mistake have declared the function twice, or that you have a function with a similar name. This other function might even be ocated in a different module, if you have more than one MapBasic module (.mb). Peter Horsbøll Møller GIS Developer, MTM Geographical Information & IT COWI A/S Odensevej 95 DK-5260 Odense S. Denmark Tel +45 6311 4900 Direct +45 6311 4908 Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] http://www.cowi.dk/gis -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rakesh Rao Sent: Tuesday, September 26, 2006 2:38 PM To: mapinfo-l@lists.directionsmag.com Subject: Re: SV: [Spam] Re: [MI-L] DLL function name limit Thank you fro the tip, Bo, but it did not work.Any other ideas? Is there a limit for the DLL also that the function names must be a maximum of 31 characters like other MapInfo symbol names? Regards Rakesh On 26 Sep 2006 at 14:04, Thomsen, Bo Victor wrote: > Hi Rakesh - > > Try to change the place of the function name and the alias: Instead of this: > > Declare Function IClientObject_ShowImageServicesDialog Lib > "ISClientC.dll" Alias "ShowServices" (ByVal object as Integer, showImageServicesXml as String) as String > > try this: > > Declare Function ShowServices Lib "ISClientC.dll" Alias " IClientObject_ShowImageServicesDialog" (ByVal object as Integer, showImageServicesXml as String) as String > > > call the function like this: > > sArg2 = space$ (255) > sVal = ShowServices (nArg1, sArg2) > > > Regards > > Bo Thomsen > GeoConsult I/S > Denmark > > -Oprindelig meddelelse- > Fra: [EMAIL PROTECTED] [mailto:mapinfo-l- [EMAIL PROTECTED] På vegne af Rakesh Rao > Sendt: 26. september 2006 13:03 > Til: mapinfo-l@lists.directionsmag.com > Emne: [Spam] Re: [MI-L] DLL function name limit > > > Hi Bill, > > Thank you for your reply. No, the Alias clause did not help either. > -- > - // Below function name compiled correctly but does not > link, gives a run-time error saying that > the function does not exist in DLL > > IClientObject_ShowImageServicesDialog > > > // Below function does not compile at all, gives an error saying that > function is already defined. It appears to be taking only the furst 32 signifiant characters in the function name. > > IClientPropertiesDialog_ShowPropertyPage > > > ' Declaration in header file > > Declare Function IClientObject_ShowImageServicesDialog Lib > "ISClientC.dll" Alias "ShowServices" (ByVal object as Integer, > showImageServicesXml as String) as String > > Declare Function IClientPropertiesDialog_ShowPropertyPage Lib > "ISClientC.dll" ( ByVal object as Integer, ByVal pageId as Integer, > ByVal parentHandle as Integer ) as Logical > > Is there a way to get around this, other than having to recompile the > DLL and make changes > at source? > > > Regards > Rakesh > - Rakesh Rao [ rakesh.rao (at)4d-technologies.com ] > - Four Dimension Technologies > [www.4d-technologies.com] > - Get GeoTools, Work smarter: www.4d-technologies.com/geotools > - Free Lisp downloads @ TechCenter: www.4d-technologies.com/techcenter > - View GDF files in AutoCAD, Get