Skip to content

How to use GdiGetBatchLimit function

Thien Ton

Asked Apr 17, 2006, 5:17 AM EDT1 answer
Share
LinkedInX
I am using VS 2003 and our program run out of GDI resource after a while, I try to use GdiGetBatchLimit() and GdiSetBatchLimit() to control our GDI resource, but I just can't figure out how to use this function, the documentation from MSDN isn't helping.  Can any one help me on this? Example code would be excellent.  Please also note what header or library I have to import or add in the references for this function. Appreciate very much. :)

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • +1
    OK NVM, I figure out how to use the function, I'll post here for reference if someone run into them.

    To Declare them in your class:
    Declare Function GdiGetBatchLimit Lib "gdi32.dll" () As Integer

    To call the function:
    Dim Tmp1 As Integer = GdiGetBatchLimit()

    In the MSDN, they said if the function success it should return the gdi limit of the process, however I found it is not what I think it is.  When I set the gdi limit to 60, and call the GdiGetBatchLimit it will return 20.  Anyone have any idea why?
    +1