Important fix!

Important fix!

Postby Antonio Linares » Fri Oct 20, 2006 9:15 am

Please add this code to your FWPPC main PRG:
Code: Select all  Expand view
#pragma BEGINDUMP

#include <hbapi.h>
#include <windows.h>

LPSTR WideToAnsi( LPWSTR );

HB_FUNC( GETWINDOWTEXT )
{
   HWND hWnd = ( HWND ) hb_parnl( 1 );
   int iLen = GetWindowTextLength( hWnd );
   LPWSTR pText = ( LPWSTR ) hb_xgrab( ( iLen * 2 ) + 2 );
   LPSTR pAnsi;
   
   GetWindowText( hWnd, pText, iLen + 1 );
   
   pAnsi = WideToAnsi( pText );
   hb_retc( pAnsi );
   hb_xfree( pAnsi );
   hb_xfree( pText );
}   

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby pawelu » Fri Oct 20, 2006 10:49 am

Antonio,

What this code change ?

Thanks
Pawel
pawelu
 
Posts: 126
Joined: Thu Oct 06, 2005 10:18 pm
Location: Poland

Postby Antonio Linares » Fri Oct 20, 2006 12:50 pm

Pawel,

It fixes internal memory corruption. Anyhow a new FWPPC build is coming with more changes.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 13 guests