Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Free some GDI Handlers
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01530443
Message ID:
01530505
Views:
95
Martina I think I found it.
It is a bug in hndlib.dll.
In Function: getFParam(...)
Martin creates two GDI resources:
xxdc = initDC()
and
HFONT fnt = CreateFontIndirect(&lf);
but after that he has several RETURNs w/o releasing them.
esp. this that is at the end of WHILE{} loop.
while (len>0) {
...
      fclose(myfile);
	if (subset||type==10)
	    fs.closefile();
			
	//return c_stream.avail_out;
	err = deflateEnd(&c_stream);

/// HERE there is no relase of xxdc and fnt
	if (err!=Z_OK) return err;
            return totalout;
		};
There are other functions too.


>I will try this code snipet on my report evening.
>
>MartinaJ
>
>>>Hi Borislav,
>>>
>>> I did test yesterday a small report (one page) with output to 2000 pdf files without the problem.
>>>
>>>MartinaJ
>>
>>Thank you Martina,
>>Here the whole process:
>>
>>
>>thisform.loSession = xfrx("XFRX#LISTENER")
>>thisform.loSession.SetParams(,,,,,,"XFF")
>>thisform.loSession.DoNotOpenViewer = .t.
>>thisform.loSession.SetThermFormCaption("Generating - "+thisform.Caption )
>>thisform.loSession.setEmbeddingType(2) 
>>
>>REPORT FORM (thisform.form_prt) OBJECT thisform.loSession
>>thisform.loXFF            = thisform.loSession.oxfDocument
>>
>>LOCAL loSession
>>loSession = xfrx("XFRX#INIT")
>>
>> SCAN
>>      WAIT WINDOW NOWAIT NOCLEAR lcExitTo + [ ]+ALLTRIM(Ime)+[ ] +ALLTRIM(Egn)
>>      && This is my method to get Page range for a group
>>      lcPageRange = thisform.loXFF.GetPageRangeForGroup(lcEgn+[: ]+Egn) 
>>
>>      lcFileName = "NameOfThePDF"
>>
>>      loSession.SetParams(lcFileName,,,,,,"PDF")
>>      loSession.lNotOpenWord = .t.
>>      loSession.setPageRange(lcPageRange)
>>      loSession.setPermissions(.t., .f., .f., .t.)
>>
>>      loSession.transformReport(thisform.loXFF)
>>ENDSCAN
>>
>>
>>The report look like the image I attached here.
>>Excuse me for the Cyrillic, but have no time to translate it :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform