Howdy -- What I want to do is use Xbasic as a frontend for MySQL. The problem is I'm mainly a PHP(and a little Perl) person.
It looks like we should be able to make calls to the MySQL libs,dills & headers from Xbasic. My interest for the mement is with doing it on Windows. Here's the Xbasic site: http://xbasic.org and a link to a "DLL Primer" tutorial: http://xbnotes.freehosting.net/dllprimer.html Anyone up to the challenge, David ----- Forwarded message from Steven V Gunhouse <[EMAIL PROTECTED]> ----- Date: Fri, 30 Apr 2004 22:20:00 -0400 From: Steven V Gunhouse <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Subject: Re: [xbasic] Calls to C libs (database) To: [EMAIL PROTECTED] On Sat, 01 May 2004 00:20:45 -0000 "davidjayjakson" <[EMAIL PROTECTED]> writes: > Howdy -- > I read the reply previous post about SQL Server/MySQL support > mentioned ODBC? > What's the status of that, and can I get a lib to test? > > My other question(s) are, Can I make a call to a C lib? Or maybe > directly to MySQL lib or MySQL API? > > Links to doc/examples explaining how to make calls to C libs in > general as well as links, example dealing with MySQL would be > appreciated. In general, the *.dec file for a C library will say EXTERNAL CFUNCTION FunctionName (argument1, argement 2, etc.) That's about it. There are two standard calling conventions. The standard calling convention used in C is different from that used in the Windows API. In C language, Windows API functions must be called using the keyword "pascal", as Pascal (and also XBasic) use the same calling convention as the Windows API. Though it is possible to create a C library which can be called using the Pascal calling convention... If you have an appropriate header file (libname.h) for your library, you can tell which calling convention is used by whether or not the pascal keyword is used. If the header file declares a function as pascal, then XBasic would refer to it using the FUNCTION keyword. If the header file does not declare the function with the pascal keyword, then XBasic will refer to it using the CFUNCTION keyword. There are a couple of other requirements to actually compile a program which uses a library, but they are not specific to C. If you have a DLL file, then you will also need a LIB file to link against. And as mentioned, you will need to have or create a *.dec file for the library. If you have a C header file, creating your own *.dec file is pretty straightforward. ________________________________________________________________ The best thing to hit the Internet in years - Juno SpeedBand! Surf the Web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/xbasic/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. ----- End forwarded message ----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]