Porting UNIX C code to windows DLL (16/32)
Posted on 1997-06-30
OK, I developed UNIX utility in C. This is fairly complicated Parser. It accepts sql string (usualy created on the fly dynamic SQL, so it is normally one huge string) and then formats it nicely with all the intends, multiple levels of nested subselect, etc. so it is very easy to debug its syntax. Works great on UNIX, recognises all sql key words, smart enough to detect sql parameters, etc..
Now I want to port it to Windows DLL. I have 1.52 VC++ and 4.0 VC++, both installed on NT 3.51. I tried to create a DLL in both versions and failed. I have no problem creating primitive DLL on both 16/32 platforms that accepts the string and changes it and returns back (e.g. to VB application), but my utility does not want to work. I am able to build it, then I can call it from the main program (VB 3.0 for 16 bit DLL, VB 4.0 for 32) and my VB crashes.
There is no MFC functionality required, no C++ functionality, just plain UNIX C, that I want to make a DLL. This is really helpful application for those who creates dynamic SQL, I want to distribute it as a shareware. I will be very gratefull if you will be able to guide me through my porting process step by step. I know C pretty good, but not VC++. As additional bonus I will send you the registered version of this DLL when it will be finished, if you can help me. Thank you.