Win 3.x APIs Equivalent in Win 95

Question:
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.

Answer:
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 (… ).

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

Top 5 B2B SaaS Marketing Agencies for 2023

In recent years, the software-as-a-service (SaaS) sector has experienced exponential growth as more and more companies choose cloud-based solutions. Any SaaS company hoping to stay ahead of the curve in this quickly changing industry needs to invest in effective marketing. So selecting the best marketing agency can mean the difference

technology leadership

Why the World Needs More Technology Leadership

As a fact, technology has touched every single aspect of our lives. And there are some technology giants in today’s world which have been frequently opined to have a strong influence on recent overall technological influence. Moreover, those tech giants have popular technology leaders leading the companies toward achieving greatness.

iOS app development

The Future of iOS App Development: Trends to Watch

When it launched in 2008, the Apple App Store only had 500 apps available. By the first quarter of 2022, the store had about 2.18 million iOS-exclusive apps. Average monthly app releases for the platform reached 34,000 in the first half of 2022, indicating rapid growth in iOS app development.