Clarion 6 SVAPI.INC bug!

PDF-XChange Viewer SDK
Simple DLL and ActiveX

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Tracker Supp-Stefan

Post Reply
Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Clarion 6 SVAPI.INC bug!

Post by Tracker - Clarion Support » Tue Feb 19, 2008 4:46 pm

We have found that the SVAPI.INC file supplied by SV is defective.

While trying to debug a vexing problem in converting PDF pages to BMP files, we uncovered the following error in svapi.inc in Clarion 6.3 build 9058. A user of 9053 first encountered the problem.

In the BITMAP GROUP, both bmPlanes and bmBitsPixel are defined as UNSIGNED. This causes them to be compiled as ULONG variables (32-bit). However the original definition of BITMAP (per Microsoft Platform SDK) has them defined as WORD (USHORT) (16-bit) variables.

However there is another wrinkle: the same variables appear in BITMAPINFOHEADER as signed SHORT variables

You will need to open your SVAPI.INC in a text editor and find the following lines:

Code: Select all

BITMAP                          group,type
bmType                            long
bmWidth                           long
bmHeight                          long
bmWidthBytes                      long
bmPlanes                          SHORT  !*** Modified by Kostya/Craig
bmBitsPixel                       SHORT  !*** Modified by Kostya/Craig
bmBits                            long
                                end
Make the indicated modifications to the two lines and that should be that. Capitalization optional. :)
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Post Reply