Ingo,
Could you try with the file I have just attach.
Thanks.
"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
news:440ea4ac$[email=
1@ozsrvnegro.ozlan.local...]
1@ozsrvnegro.ozlan.local...[/email]
>
> "Ignacio Ortiz de Zúñiga" <
iozuniga@ozs.com> wrote:
> Ignacio,
>
> thanks for your effort.
>
>>You are calling TCanvas methods without creating a document with
>>TPrinter:StartDoc().
>
> No, :StartDoc() is called before, here the complete code without the
> :TextOut-lines
>
> IF !Printer:Setup()
> RETURN .F.
> ENDIF
> WITH OBJECT oFont:=TFont():New()
> :cName := "Courier New"
> :nSize := 10
> :lBold := .t.
> END WITH
> Printer:lPreview:=.T.
> Printer:StartDoc("Normal-Mahnbescheid")
> WITH OBJECT Printer:oCanvas
> :oFont:=oFont
> :nMapMode:=mmHIMETRICS
> For nX:=1 TO LEN(a_nmbCm)
>
> aPix[nX]:=:PointToPixels((a_nmbCm[nX,2]*100)+nLeft,(a_nmbCm[ nX,1]*100)+nTop)
> next
> :nMapMode:=mmPIXELS
> END WITH
> for nZahl:=1 to nAnzahl
> Printer:StartPage()
> WITH OBJECT Printer:oCanvas
> for nX:=1 TO Len(aMB)
> .....
> .....
> next
> END WITH
> Printer:EndPage()
> next
> Printer:EndDoc()
> Printer:Preview()
> oFont:End()
>
> Meanwhile I found the reason.
>
> The error happens only if the Canon IP4000 is selected. For this printer
> is a very large driver installed.
>
> When I started my application outside of Xailers IDE all is ok.
> Running the app from the IDE than the error occurs.
>
> Is it possible that the heap of the running app will be manipulated by the
> IDE? See the LogDebug lines:
>
> #1: HEAP[mwin.exe]:
> #2: Heap block at 001DE828 modified at 001DE90C past requested size of dc
> #3: HEAP[mwin.exe]:
> #4: Invalid Address specified to RtlFreeHeap( 00150000, 001DE830 )
>
> Maybe this messages will help you, for me is it primary important that my
> application will be running outside the IDE without any error.
>
> Regards
>
> Ingo
>
Attached files ICanvas.rar (3.2 KB)Â