FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH 9.07 - problem with windows 2000
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
FWH 9.07 - problem with windows 2000
Posted: Sat Aug 29, 2009 11:23 AM

Hi all,
a customer just reported me that my app (xHarbour+ FWH9.07) doesn't runs under windows 2000.

The error message at startup is "Impossibile trovare il punto di ingresso PrintWindow della procedura nella libreria a collegamento dinamico USER32.DLL"
in english "Unable to find the starting point PrintWindow of the dinamic dll USER32.DLL"

Unfortunately I haven't a Windows 2000 OS to make accurate tests.

Does anyone alredy know this issue ?

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: FWH 9.07 - problem with windows 2000
Posted: Sat Aug 29, 2009 11:55 AM

As I can read on the forum, the problem can be solved removing user32.lib from the link and adding the following code

pragma BEGINDUMP

include <windows.h>

typedef BOOL ( FAR PASCAL * LPPRINTWINDOW )( HWND hWnd, HDC hDC, UINT nFlags );

BOOL WINAPI PrintWindow( HWND hWnd, HDC hDC, UINT uiFlags )
{
LPPRINTWINDOW pPW;
HINSTANCE hDLL = LoadLibrary( "user32.dll" );
BOOL bResult = FALSE;

if( hDLL )
{
pPW = ( LPPRINTWINDOW ) GetProcAddress( hDLL, "PrintWindow" );
bResult = pPW( hWnd, hDC, uiFlags );
FreeLibrary( hDLL );
}

return bResult;
}

pragma ENDDUMP

I just sent a modified app to my customer to get feedback.

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 9.07 - problem with windows 2000
Posted: Sat Aug 29, 2009 12:26 PM

This function is not supported on windows server 2000. It is implemented on Server 2003 or later and XP or later.

If you are not using Ribbonbar, you do not need this function. You can compile and link the program without the new user32.lib. ( or this function )

Regards



G. N. Rao.

Hyderabad, India
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: FWH 9.07 - problem with windows 2000
Posted: Sat Aug 29, 2009 01:16 PM

Hi,
I'am using ribbonbtn in my app.
Do you think I solved the problem with the previous code and removing user32.lib on Windows 2000 OS ?

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 9.07 - problem with windows 2000
Posted: Sat Aug 29, 2009 01:42 PM

Marco,

yes, you did it :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion