Unsigned Integers And Visual Basic
Update: the information in this post has been superseded by the information from this post: Device context handles and signed/unsigned integer. It is no longer required to use unsigned integers with the ActiveX edition, this is handled internally by the library.
In version 7.25 of Quick PDF Library we made a change to the API which made the use of unsigned integers necessary. Unfortunately not all versions of programming languages support unsigned integers. In this particular case Visual Basic 6 and earlier versions do not support unsigned integers, while Visual Basic .NET and newer versions do.
Although VB6 was released over 10 years ago it still has a strong following and quite a few VB6 programmers use Quick PDF Library. This being the case we’ve come up with an easy workaround which will enable VB6 programmers to continue using all of the functions in Quick PDF Library.
We’re now providing a TLB file along with the ActiveX edition that handles the unsigned integers. The TLB file is only used at compile time so you won’t need to distribute it with your executable, but you will need to distribute the ActiveX as per usual.
The TLB file for Quick PDF Library 7.25 can be downloaded from here and will be included in all future installers.
Instructions for using the TLB file:
- Register the ActiveX on your machine as per usual
- Open your VB6 project
- Go to Project > References > Browse…
- Add the ‘QuickPDFAX0725VB.tlb’ file
- Compile
As you are adding the TLB file as the reference it is not necessary to add the ActiveX file as a project reference because the TLB file interfaces with the ActiveX through the registry.
Please note: if you do not use the GetCanvasDC, DARenderPageToDC or RenderPageToDC functions then you won’t run into any issues if you choose not to use the TLB file. The unsigned integers are currently only used with these functions.

How does this affect using the DLL (not activeX) from within VB6?
Comment by Tom — June 8, 2011 @ 10:16 am
Tom, we will need to provide a TLB file for the DLL edition as well. Are you using the DLL edition?
Comment by Rowan — June 8, 2011 @ 11:58 am
[…] languages we will attempt to come up with suitable workarounds — for example, as mentioned on this blog post a couple of days ago, we have created a TLB file to be used with the ActiveX edition of our library and VB6 which […]
Pingback by » Unsigned Integers and Device Context Functions » Quick PDF Library Blog — June 9, 2011 @ 2:03 am
The QuickPDFDLL0725.bas file in the DLL\Import\VB6 file remains unchanged from previous versions. The Long type is still used for GetCanvasDC, DARenderPageToDC and RenderPageToDC.
Comment by Kevin — June 9, 2011 @ 8:05 am