I’m trying to migrate an application I created in SQLWindows to Centura and it had some Windows API function calls in USER.EXE. Porting it to Centura, the “Cannot find library or one of its components error appears” so I changed USER.EXE to USER32.DLL and it compiled.Upon running the application, it GPFs in Centura.I have a Introductory Form patterned from the “Special Edition Using Gupta SQLWindows” that has this message handler in the form’s message actions section.
On WM_NCCREATE Call SetWindowLong( hWndForm, GWL_STYLE, GetWindowLong( hWndForm, GWL_STYLE ) – ( WS_CAPTION | WS_THICKFRAME | WS_VSCROLL | WS_HSCROLL ) )This works fine in SQLWindows. Where are the Windows API Functions now in Windows 95? This might be causing the problem.
Please take a look at the URL www.centurasoft.com/support/tech_info/migwizrd.htmIt is a utility, written on the Centura 1.0, which will do a first pass through an outline to try to change the function calls from the 16 bit SDK to the 32 bitSDK. The zip file referenced on the page not only contains the wizard, but alsoa database, 6.1 format, which maps the 16 to 32 bit function calls, C to Centuradatatypes and parameters for each of the function calls. The wizard utilizes the database to build a mapping of the existing functions to call the correct 32bit functions. The approach was not to change many lines of code, but to definea global function which in turn will call the external function. I should note the wizard is compiled with Centura 1.0 and will not run with Centura 1.1. I amwaiting for the 1.1 version of the CDK to update the executable.
One of the reasons you may be getting the GPF may be that SetWindowLong is no longer a function in the 32 bit SDK, but a macro which can not be called directly. My guess is the export ordinal you have defined for it, changed and you are not calling the correct function. It would be best to set the ordinal to 0 and let Centura do a name search on the function. You should get an error which states the function is not defined. Typically the 16 bit functions now have an ‘A’ or ‘W’ appended to the name to signify Unicode platform. In the example you have provided, the function call would be SetWindowsLongA (… ).