home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 10,082 of 10,840   
   Otie to All   
   C DLL calls using VB   
   01 Jun 06 22:40:36   
   
   XPost: comp.lang.basic.visual   
   From: otie_nospam@adelphia.net   
      
   I have a FindCity.dll written in C.   
      
   I am trying to call routines from it using VB, but I keep getting "Can't   
   find DLL entry point" errors.   
      
   Here is what the docs say:   
      
   int SetCountryByNameA(LPCSTR countryname);   
   Set the current country by name.  These functions look through the lists of   
   country and US state names, then their abbreviations, then the alternate   
   names and abbreviations.  If the string passed as an argument matches at any   
   point, the current country is set accordingly.  The comparisons are case   
   insensitive.  If the current country is set, its index is returned.   
   Otherwise the return value is -1.  For example, you could set the current   
   country to Colorado by passing "Colorado", "colorado", or "CO".  You could   
   set it to the United Kingdom by passing "United Kingdom" or "UK" or   
    "Britain" or "gb" (or several other alternates).   
      
      
   In VB I do this:   
      
   Declare Function SetCountryByNameA Lib "FindCity.dll" Alias   
   "_SetCountryByNameA@51" (countryname As String) As Long   
      
   Dim test1 As Long   
   test1 = SetCountryByNameA("Germany")   
      
      
   The C docs give me a FindCity.def file that contains:   
      
   LIBRARY FindCity   
      
   VERSION 1.20   
      
   DESCRIPTION "Functions for using ACS Atlas data files."   
      
   EXPORTS   
     ACStimechangelookupA      @1   
     FindCityA                           @11   
     SetCountryByNameA          @51   
      
      
   The docs say "You must tell your development program to link with   
   findcity.lib."   
      
   Do I care about this?   
      
      
      
   Thanks for any help.   
      
      
      
      
   Otis   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca