I have a small app that runs as a service. I recently needed to update it, and found that I cannot build it with FWH 2404 or 2407. In both cases it errors out.
It appears the problem is that these versions require uxtheme.lib to be included. Of course a service is not going to use "windows" or its themes. In order to build it successfully, it is necessary to revert to 2402 ( or earlier ). Then I can eliminate uxtheme.lib and it builds, and runs, without a problem.
Is there a way to address this issue ?
Thanks.
FWH - can't build Service with 2404 or 2407
FWH - can't build Service with 2404 or 2407
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: FWH - can't build Service with 2404 or 2407
If you think that is the reason, please make these changes to "window.prg"It appears the problem is that these versions require uxtheme.lib to be included.
1) Please locate this line of code
Code: Select all | Expand
METHOD SetWindowTheme( cSub, cIds ) INLINE _SetWindowTheme( ::hWnd, cSub, cIds )
2) Comment out this code at the end of window.prg":
Code: Select all | Expand
#pragma BEGINDUMP
#include <windows.h>
#include <uxtheme.h>
#include <hbapi.h>
#include <fwh.h>
HB_FUNC_STATIC( _SETWINDOWTHEME )
{
HRESULT h = SetWindowTheme( ( HWND ) fw_parH( 1 ), ( LPCWSTR ) fw_parWide( 2 ), ( LPCWSTR ) fw_parWide( 3 ) );
hb_retl( h == S_OK );
}
#pragma ENDDUMP
Please let us know if you are able to build services after these changes.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: FWH - can't build Service with 2404 or 2407
I am very sorry for the delay in responding to your suggestion. I have been away from the computer for the past week +
Yes, by doing as you instructed, the program will build and operate successfully.
So, SetWindowsTheme is the problem when building a Service. In essence, we are not actually using a theme in a service since we do not display anything. The program runs strictly in the background and uses no graphics.
Tim
Yes, by doing as you instructed, the program will build and operate successfully.
So, SetWindowsTheme is the problem when building a Service. In essence, we are not actually using a theme in a service since we do not display anything. The program runs strictly in the background and uses no graphics.
Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit