Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Device context handles and signed/unsigned integers

June 21, 2011

For Quick PDF Library version 7.25 we changed the integer type of the device context handles returned by the GetCanvasDC function and accepted as parameters to the RenderPageToDC and DARenderPageToDC functions.

The reason for this is that the Delphi VCL declares the HDC type as an unsigned 32-bit integer.

The Windows graphics system does return values in the entire unsigned 32-bit range.

However, since making the change in 7.25 we have done further research and found some inconsistencies in various programming environments.

In particular, the Windows SDK defines a device context handle HDC as a PVOID which is a signed 32-bit integer.

The .NET Framework uses System.IntPtr which is also a signed 32-bit integer.

For 7.26 we will be making further changes to how device context handles are processed by Quick PDF Library to properly match different programming languages.

  • Delphi DCUs – Unsigned – Cardinal
  • Delphi DLL – Unsigned – HDC
  • C# ActiveX – Signed – System.IntPtr
  • C# DLL – Signed – System.IntPtr
  • C++ DLL – Signed – HDC
  • C++ ActiveX – Signed – HDC
  • VB.NET ActiveX – Signed – System.IntPtr
  • VB.NET DLL – Signed – System.IntPtr
  • PowerBuilder DLL – Signed -long
  • PowerBASIC DLL – Unsigned – DWORD
  • ActiveX Type Library – Signed – long

The information in this article supersedes the information that we posted on this topic a couple of weeks ago (specifically two two blog posts: Unsigned Integers and Device Context Functions and Unsigned Integers And Visual Basic).

1 Comment

  1. […] 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 […]

    Pingback by » Unsigned Integers And Visual Basic » Quick PDF Library Blog — June 21, 2011 @ 8:09 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.




© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum