Search found 29 matches: globalalloc

Return to advanced search

Re: *** Curso de C para programadores Harbour.

Hola Otto modifica esto:

GlobalAllocPtr -> GlobalAlloc
GlobalFreePtr -> GlobalFree

Por otro lado he investigado un poco el tema y creo que he visto algo en el propio Harbour.
by xmanuel
Thu Jul 15, 2021 1:11 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: *** Curso de C para programadores Harbour.
Replies: 141
Views: 17533

Re: Create or open a shared memory block

Otto,

For Windows you could use GlobalAlloc()
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-globalalloc

To make it Linux and OSX compatible, then simply use malloc()
by Antonio Linares
Sat May 23, 2020 7:03 am
 
Forum: mod_harbour
Topic: Create or open a shared memory block
Replies: 8
Views: 1095

Re: Ayuda DLL

Antonio, aquí la segunda parte: Error: Unresolved external '_HB_FUN_DRAWTHEMED' referenced from P:\32BITS\FWH\LIB\FIVEHX.LIB|DIALOG Error: Unresolved external '_HB_FUN_GETDLGBASEUNITS' referenced from P:\32BITS\FWH\LIB\FIVEHX.LIB|DIALOG Error: Unresolved external '_HB_FUN_CDLG2CHR' referenced from P...
by ricardog
Thu Aug 31, 2017 2:56 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Ayuda DLL
Replies: 24
Views: 6286

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

Antonio,

Me alegro de que el asunto quede resuelto :-)
by Antonio Linares
Fri Dec 16, 2011 12:11 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

Antonio, Encontrado el problema; resulta que yo utilizo una RPreview modificada por algun compañero del foro, siento no recordar el nombre; es una RPreview que lleva una TListView con las miniaturas de las paginas. Pues bien, he puesto la preview original de fwh y YA NO HAY CONSUMO DE MEMORIA !! Muc...
by A.Martinez
Fri Dec 16, 2011 8:20 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

Antonio, RESPUESTA 1: Pues siento decirte que creo que NO es la StretchDIBits() porque si modifico lo que me has mandado y pongo: ...//        if( ( wWidth == 0 ) || ( wHeight == 0 ) )        if( 1 )           SetDIBitsToDevice( hDC, wCol, wRow, lpBmp->biWidth,                        ...
by A.Martinez
Thu Dec 15, 2011 7:54 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

Antonio,

Si no haces el PREVIEW (quitando esa clausula), se produce la misma pérdida ?

gracias por tus pruebas,
by Antonio Linares
Thu Dec 15, 2011 7:41 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

Buscando en google veo que otros programadores (en otros lenguajes) han tenido problemas tambien con esta función:

http://stackoverflow.com/questions/8036855/how-to-handle-gdi-resource-leak

Quizá eso nos de una pista de por donde buscar...
by Antonio Linares
Thu Dec 15, 2011 7:37 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

Antonio, Bueno, lo importante es que ya sabemos de donde viene el problema: función StretchDIBits(). Ahora pensemos una estrategia... Miremos por ejemplo el código que use Wine para la función StretchDIBits(): http://cvs.winehq.org/cvsweb/wine/dlls/gdi/Attic/dib.c?rev=1.22&co...
by Antonio Linares
Thu Dec 15, 2011 7:29 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

A. de Antonio :D He puesto el codigo que me has enviado y he probado y todo sigue igual (sigue consumiendo memoria). Luego he probado a comentar la StretchDIBits( ) y entonces he observado que NO pinta nada pero NO consume memoria.     //       StretchDIBits( hDC, wCol, wRow...
by A.Martinez
Thu Dec 15, 2011 6:57 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

A. (Antonio, Adolfo, Alfonso... ?) :-) Prueba a implementar la función DibDraw() en tu aplicación y asi puedes hacerle modificaciones. Añade este código al final de tu PRG principal: #pragma BEGINDUMP#include <windows.h>#include <hbapi.h>static LPSTR DibBits( LPBITMAPINFOHEADER lpBmp...
by Antonio Linares
Thu Dec 15, 2011 6:27 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

Antonio, La memoria, además de con GlobalMemoryStatusEx(), lo compruebo con una utilidad externa. Ambos devuelven siempre el mismo %, con lo que imagino que esta bien. En todo caso, cuando la carga de memoria es muy alta..., no se el %, entonces empieza a no pintar los bitmaps, como si no tuviese me...
by A.Martinez
Thu Dec 15, 2011 5:52 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

Como compruebas la pérdida de memoria ?

El código fuente de DibDraw() está en FWH\source\winapi\dib.c pero no reserva/libera memoria.
by Antonio Linares
Thu Dec 15, 2011 5:31 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

Antonio, A. Podemos seguir haciendo otras pruebas. Comenta esta línea y prueba a ver si hay algún cambio: // DibDraw( ::hDCOut, hDib, hPalette, nRow, nCol,; // nWidth, nHeight, nRaster ) gracias Comentando la funcion DibDraw(): NO dibuja nada y NO hay escape de memoria Me encantaria seguir haciendo ...
by A.Martinez
Thu Dec 15, 2011 4:59 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069

Re: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?

A.

Podemos seguir haciendo otras pruebas. Comenta esta línea y prueba a ver si hay algún cambio:

// DibDraw( ::hDCOut, hDib, hPalette, nRow, nCol,;
// nWidth, nHeight, nRaster )

gracias
by Antonio Linares
Thu Dec 15, 2011 4:46 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: oPrinter:SayBitmap/ GlobalAlloc-GlobalFree ¿fuga de memoria?
Replies: 15
Views: 4069
Next

Return to advanced search