mysql, windoze, and libmysql.dll
I am happily hacking, and I appear to be having an attack of senility because I can't find something that ought to be easy to find.
Basically, I have decided to get Windows Superbase to connect with and manipulate Linux (or any other) mysql. It happens that I have a commercial product that is written in the Superbase DML (reasons are historical and lead us back to the early days of the Amiga) and I am pushing that app gradually in a multi-platform direction. I have it working with Wine in Linux (about 98%, that is), but I can make the real breakout if I get this mysql interface running.
So I have obtained a copy of libmysql.dll and I am using that for my interface. I have some VB code that invokes the dll and I have established that my Win2K VMWare client can talk to my Linux mysql server without much trouble using the VB code.
I also have managed to open and close a connection with the linux server using Superbase, but I am having trouble based on insufficient information.
Superbase and its DML are pretty much a sandbox. The DML is a dialect of Basic, and goes way way back in years. The current version is reminiscent of VB and, except for some syntax inconsistencies, is pretty nice. The environment allows for rapid development and, since there is a complete relational database at the heart of the package, the result is a very decent capability to build complex data management applications quickly. Over time, Superbase has become a hybrid 16/32 bit application. The core is 16 bit, but it has the capability to access and use 32 bit Windows dlls.
The downside is that, because it is an old database app, its ability to manipulate bits and bytes in a binary sense is limited, although it has a lot of string handling capability. The direct consequence is that I cannot bring binary data structures into the Superbase environment to work on them, but I have to do all that outside and bring in pieces as I need them.
Consequently I am doing a lot with kernel32 functions. But, then, I have all the documentation for the kernel32 functions.
Now, I don't have function protos and data structure information for the libmysql.dll. This is proving to be a problem because I am finding it difficult to figure out where things are (particularly my return values) from Superbase. I don't always know what my return value is supposed to be, and therefore I don't know how to handle it without a lot of fumbling. The VB code I have provides some help, but not enough since VB handles everything very differently than superbase does and translating from VB to infer function returns, then re-translating to Superbase is proving very tedious and error prone.
I have googled for these protos and haven't found them. I haven't even found the Windows source for mysql, which would help immensely. Of course, I am tired so oerhaps I am merely having a major brain fart, and perhaps after sleeping for a bit I will be able to find these things without trouble.
But on the off chance that they really are as hard to find as they seem to be, would anyone here happen to either have the protos or know where I could find them?
|