problem in create fivehmx.lib

User avatar
kajot
Posts: 375
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

problem in create fivehmx.lib

Post by kajot »

I am using FWH 26.06 and xharbour com

Type: C >>>xhb.exe -o"Obj\getsysin.c" -m -n -pOObj\ -q -gc0 -I"S:\include" -I"R:\include" -I"R:\include\w32" "Source\Function\getsysin.prg"<<<

xHarbour 1.2.3 Intl. (SimpLex) (Build 20190614)
Copyright 1999-2018, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'Obj\getsysin.obj'...
Source\\Function\\getsysin.prg(655): error #1050: Macro redefinition of '_WIN32_IE'.
Source\\Function\\getsysin.prg(676): error #2123: Redefinition of 'HMONITOR__' previously defined at R:\c_include\win\windef.h(187).
Source\\Function\\getsysin.prg(676): error #2121: Redeclaration of 'HMONITOR'.
Source\\Function\\getsysin.prg(679): error #2123: Redefinition of 'tagMONITORINFO' previously defined at R:\c_include\win\winuser.h(3811).
Source\\Function\\getsysin.prg(684): error #2121: Redeclaration of 'MONITORINFO'.
Source\\Function\\getsysin.prg(684): error #2121: Redeclaration of 'LPMONITORINFO'.

Type: C >>>Couldn't build: getsysin.obj<<<
Type: C >>>TMAKEOBJECT<<<
Type: C >>>TMAKEOBJECT:REFRESH<<<
Type: N >>> 1428<<<

best regards
kajot
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: problem in create fivehmx.lib

Post by Antonio Linares »

Please try it with this getsysin.prg version:

getsysin.prg

Code: Select all | Expand

#include "FiveWin.ch"

#define HORZRES             8
#define VERTRES            10
#Define BITSPIXEL          12
#define PLANES             14
#define LOGPIXELSX         88
#define LOGPIXELSY         90

#ifndef SM_DIGITIZER
#define SM_DIGITIZER            94

/*
 * GetSystemMetrics(SM_DIGITIZER) flag values
 */
#define NID_INTEGRATED_TOUCH  0x00000001
#define NID_EXTERNAL_TOUCH    0x00000002
#define NID_INTEGRATED_PEN    0x00000004
#define NID_EXTERNAL_PEN      0x00000008
#define NID_MULTI_INPUT       0x00000040
#define NID_READY             0x00000080


#endif

#ifndef SM_MAXIMUMTOUCHES
#define SM_MAXIMUMTOUCHES       95
#endif

#ifndef SM_CMOUSEBUTTONS
#define SM_CMOUSEBUTTONS        43
#endif

#define SM_XVIRTUALSCREEN       76
#define SM_YVIRTUALSCREEN       77
#define SM_CXVIRTUALSCREEN      78
#define SM_CYVIRTUALSCREEN      79
#define SM_CMONITORS            80

static lDarkTheme := .F.

//----------------------------------------------------------------------------//

function SetDarkTheme()

   lDarkTheme := .T.

   SetDlgGradient( { { 1, CLR_BLACK, CLR_BLACK } } )

return nil   

//----------------------------------------------------------------------------//

function IsDarkTheme()

return lDarkTheme

//----------------------------------------------------------------------------//

#pragma BEGINDUMP

#include <windows.h>
#include <stdio.h>

#include "hbapi.h"

HB_FUNC( FW_GETTHEMEMODE )
{
	HKEY hKey;
	DWORD dwValue;
	DWORD dwSize = sizeof(dwValue);
	LONG result = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", 0, KEY_READ, &hKey);

	if (result == ERROR_SUCCESS)
	{
		result = RegQueryValueEx(hKey, "SystemUsesLightTheme", NULL, NULL, (LPBYTE)&dwValue, &dwSize);
		if (result == ERROR_SUCCESS) {
			hb_retc( dwValue ? "Light" : "Dark" );
		}

		RegCloseKey(hKey);
	}
}

#pragma ENDDUMP

//----------------------------------------------------------------------------//

Function LargeFonts( nPixelX, nPixelY )

  Local hDC

  hDC     := CreateDC( "DISPLAY", "", "" )
  nPixelX := GetDeviceCaps( hDC, LOGPIXELSX )
  nPixelY := GetDeviceCaps( hDC, LOGPIXELSY )

  DeleteDC( hDC )

Return ( nPixelX >= 120 )

//----------------------------------------------------------------------------//

function DispFontPerSize()

   local hDC, nPixelX

   hDC     = CreateDC( "DISPLAY", "", "" )
   nPixelX = GetDeviceCaps( hDC, LOGPIXELSX )

   DeleteDC( hDC )

return ( nPixelX / 96 )

//----------------------------------------------------------------------------//

function ColorsQty()

   local hDC, nPlanes, nBitsPixel

   hDC        = CreateDC( "DISPLAY", "", "" )
   nPlanes    = GetDeviceCaps( hDC, PLANES )
   nBitsPixel = GetDeviceCaps( hDC, BITSPIXEL )

   DeleteDC( hDC )

return Int( 2 ^ ( nPlanes * nBitsPixel ) )

//----------------------------------------------------------------------------//

function ScrResolution( nWidth, nHeight )

   local hDC

   hDC     = CreateDC( "DISPLAY", "", "" )
   nWidth  = GetDeviceCaps( hDC, HORZRES )
   nHeight = GetDeviceCaps( hDC, VERTRES )

   DeleteDC( hDC )

return { nWidth, nHeight }

//----------------------------------------------------------------------------//

#define VER_PLATFORM_WIN32s         0
#define VER_PLATFORM_WIN32_WINDOWS  1
#define VER_PLATFORM_WIN32_NT       2

function cWinVersion()

   local aVersion := GetVersion()
   local cVersion := ""

   do case
      case aVersion[ 4 ] == VER_PLATFORM_WIN32_NT
           if aVersion[ 1 ] == 6
             if aVersion[ 2 ] == 0
                cVersion = "Vista"
             elseif aVersion[ 2 ] == 1
                cVersion = "7"
             elseif aVersion[ 2 ] == 2
                if IsWindows11()
                   cVersion = "11"
                elseif IsWindows10()
                   cVersion = "10"
                else
                   cVersion = "8"
                endif
             endif
           endif

       if aVersion[ 1 ] == 10 /* New manifest file correctly returns the value 10 for Windows 10 */
          cVersion = "10"
       endif

       if aVersion[ 1 ] == 5
          if aVersion[ 2 ] == 2
             cVersion = "Server 2003"
          elseif aVersion[ 2 ] == 1
             cVersion = "XP"
          elseif aVersion[ 2 ] == 0
             cVersion = "2000"
          endif
       endif

       if aVersion[ 1 ] <= 4
          cVersion = "NT"
       endif

  case aVersion[ 4 ] == VER_PLATFORM_WIN32_WINDOWS
       if aVersion[ 1 ] == 4
          if aVersion[ 2 ] == 90
             cVersion = "ME"
          elseif aVersion[ 2 ] == 10
             cVersion = "98"
          elseif aVersion[ 2 ] == 0
             cVersion = "95"
          endif
       endif
   endcase

   cVersion += IF( IsWin64(), " 64 ", " 32 " ) + "Bits"

return cVersion

//----------------------------------------------------------------------------//

function IsWinVista()

return ( "Vista" $ cWinVersion() )

//----------------------------------------------------------------------------//

function IsWinXP()

return ( "XP" $ cWinVersion() )

//----------------------------------------------------------------------------//

function IsWin2000()

return ( "2000" $ cWinVersion() )

//----------------------------------------------------------------------------//

function IsWin7()

return "7" $ cWinVersion()

//----------------------------------------------------------------------------//

function IsWin8()

return "8" == cWinVersion()

//----------------------------------------------------------------------------//

#define  HKEY_LOCAL_MACHINE  2147483650  // 0x80000002
#ifndef HKEY_CURRENT_USER
   #define  HKEY_CURRENT_USER       2147483649        // 0x80000001
#endif

function IsWindows11()

   local oReg := TReg32():New( HKEY_LOCAL_MACHINE,;
                               "SOFTWARE\Microsoft\Windows NT\CurrentVersion",;
                               .F. )
   local nCurrentBuild := Val( oReg:Get( "CurrentBuild" ) )

   oReg:Close()

return nCurrentBuild >= 22000

//----------------------------------------------------------------------------//

function IsWindows10()

   local oReg := TReg32():New( HKEY_LOCAL_MACHINE,;
                               "SOFTWARE\Microsoft\Windows NT\CurrentVersion",;
                               .F. )
   local cProductName := oReg:Get( "ProductName" )

   oReg:Close()

return "Windows 10" $ cProductName

//----------------------------------------------------------------------------//

function FW_IsTouchScreen()
return ( nAnd( GetSysMetrics( SM_DIGITIZER ), ;
               ( NID_INTEGRATED_TOUCH + NID_MULTI_INPUT ) ) > 0  .and. ;
         GetSysMetrics( SM_MAXIMUMTOUCHES ) > 0 )

//----------------------------------------------------------------------------//

function FW_IsMousePresent(); return ( GetSysMetrics( SM_CMOUSEBUTTONS ) > 0 )

//----------------------------------------------------------------------------//

function FW_IsTabletMode()


   local oReg, lTabletMode := .f.

   if IsWindows10()

  oReg:= TReg32():New( HKEY_CURRENT_USER,;
         "SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" )
  lTabletMode := ( oReg:Get( "TabletMode", 0 ) > 0 )

   endif

return lTabletMode

//----------------------------------------------------------------------------//

function GetCPUSpeed()

   local oReg := TReg32():New( HKEY_LOCAL_MACHINE,;
                       "HARDWARE\DESCRIPTION\System\CentralProcessor\0",;
                       .F. )
   local nCpuSpeed := oReg:Get( "~MHz", 0 )

   oReg:Close()

return nCpuSpeed

//----------------------------------------------------------------------------//

function GetSysFont()

   do case
      case ! IsWinNt() .and. ! IsWin95()  // Win 3.1
           return "System"
   endcase

return If( IsWindows10() .or. IsWin8(), "Segoe UI", "Ms Sans Serif" ) // Win NT, 9x

//----------------------------------------------------------------------------//

function BorlandVersion()

   #ifdef __XHARBOUR__
      local cHexVer := NumToHex( BorlandC() )
   #else
      local cHexVer := hb_NumToHex( BorlandC() )
   #endif

return SubStr( cHexVer, 1, 1 ) + "." + SubStr( cHexVer, 2 )

//----------------------------------------------------------------------------//

function SaveDesktop( cPngFileName )

   local o := TWindow()

   DestroyWindow( o:hWnd )
   o:hWnd = GetDesktopWindow()
//   o:SaveToPng( cPngFileName )
   o:SaveAsImage( cPngFileName )

return nil

//----------------------------------------------------------------------------//

#define SM_CXFULLSCREEN  16
#define SM_CYFULLSCREEN  17

function ScreenWidth()

return GetSysMetrics( SM_CXFULLSCREEN )

function ScreenHeight()

return GetSysMetrics( SM_CYFULLSCREEN )

function ScreenScaling()

return Round( ScreenSize_NoScaling()[ 1 ] / GetSysMetrics( 0 ),  2 )

function ScreenHeightMM()

   local hDC, nHeight

   hDC      := GetDC( 0 )
   nHeight  := GetDeviceCaps( hDC, 6 ) // VERTSIZE = 6
   ReleaseDC( 0, hDC )

return nHeight


function ScreenWidthMM()

   local hDC, nWidth

   hDC      := GetDC( 0 )
   nWidth   := GetDeviceCaps( hDC, 4 ) // HORZSIZE = 4
   ReleaseDC( 0, hDC )

return nWidth

function ScreenSize( lInches )

   local hDC, nWidth, nHeight, nDiag

   hDC      := GetDC( 0 )
   nWidth   := GetDeviceCaps( hDC, 4 ) // HORZSIZE = 4
   nHeight  := GetDeviceCaps( hDC, 6 ) // VERTSIZE = 6
   ReleaseDC( 0, hDC )

   nDiag    := SQRT( nWidth * nWidth + nHeight * nHeight )

return If( lInches == .t., nDiag / 25.4, nDiag )

//----------------------------------------------------------------------------//

function IsWin64()

return ! Empty( GetEnv( "ProgramFiles(x86)" ) )

//----------------------------------------------------------------------------//
/*
Usage: GetUsedClass()            --> Array of used ClassName(s)
       GetUsedClass( "MyClass" ) --> .t./.f. Check ClassName is already used
*/

function GetUsedClass( cClassName )
   
local n := 0, cClass, aClass := {}, lRet := .f.
while ! Empty( __ClassName( ++n ) ) cClass := Upper( __ClassName( n ) ) if cClassName != nil .and. Upper( cClassName ) == cClass lRet := .t. exit endif AAdd( aClass, cClass ) end
return if( cClassName == nil, aClass, lRet ) //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// // MULTIPLE MONITORS FUNCTIONS //----------------------------------------------------------------------------// function FW_ActiveMonitors() return GetSysMetrics( SM_CMONITORS ) //----------------------------------------------------------------------------// function FW_VirtualScreen() return TRect():New( GetSysMetrics( SM_YVIRTUALSCREEN ), GetSysMetrics( SM_XVIRTUALSCREEN ),,, ; GetSysMetrics( SM_CXVIRTUALSCREEN ), GetSysMetrics( SM_CYVIRTUALSCREEN ) ) //----------------------------------------------------------------------------// function FW_SetMonitor(...) static oMonitor local oRet oRet := oMonitor if PCOUNT() > 0 oMonitor := HB_ExecFromArray( "FW_GETMONITOR", HB_AParams() ) if oMonitor:lPrimary oMonitor := nil endif endif return oRet //----------------------------------------------------------------------------// function FW_GetMonitor( nRow, nCol ) // POINT r,c [OR] nMonitor, [or] oWnd/hWnd No params: primary monitor local aInfo, oMonitor, nMax if nRow == nil .and. nCol == nil oMonitor := TMonitor():New( MonitorInfoFromRC( 20, 20 ) ) elseif HB_ISNUMERIC( nRow ) .and. HB_ISNUMERIC( nCol ) aInfo := MonitorInfoFromRC( nRow, nCol ) if !Empty( aInfo ) oMonitor := TMonitor():New( aInfo ) endif elseif PCount() == 1 if HB_ISOBJECT( nRow ) .and. nRow:IsKindOf( "TWINDOW" ) nRow := nRow:hWnd endif if ValType( nRow ) != "N" nRow := 1 endif if IsWindow( nRow ) aInfo := MonitorInfoFromRC( nRow ) if aInfo != nil oMonitor := TMonitor():New( aInfo ) endif else nMax := Max( 1, Min( nRow, FW_ActiveMonitors() ) ) oMonitor := FW_GetAllMonitors()[ nMax ] endif endif return oMonitor //----------------------------------------------------------------------------// function FW_GetAllMonitors() static caRect static aMonitors := {} local aRect, nRow, nCol, aInfo, caInfo, nMonitors, c, nMonitor := 0 aRect := FW_VirtualScreen() if ( c := FW_ArrayAsList( aRect ) ) == caRect return aMonitors endif caRect := c aMonitors := {} nMonitors := FW_ActiveMonitors() for nRow := aRect[ 1 ] + 100 to aRect[ 3 ] step 100 for nCol := aRect[ 2 ] + 100 to aRect[ 4 ] step 100 aInfo := MonitorInfoFromRC( nRow, nCol ) IF HB_IsArray( aInfo ) caInfo := Str( aInfo[ 1 ] ) + ", " + Str( aInfo[ 2 ] ) + ", " + Str( aInfo[ 3 ] ) + ", " + Str( aInfo[ 4 ] ) IF AScan( aMonitors, { | x | x[ 2 ] == caInfo } ) == 0 nMonitor ++ AAdd( aMonitors, { nMonitor, caInfo, aInfo, TMonitor():New( aInfo ) } ) ENDIF ENDIF IF nMonitor >= nMonitors EXIT ENDIF next nCol IF nMonitor >= nMonitors EXIT ENDIF next nRow AEval( aMonitors, { |a,i| aMonitors[ i ] := a[ 4 ] } ) return aMonitors //----------------------------------------------------------------------------// function WndCenterEx( hWnd, hParent ) local aRect, oMonitor if HB_ISOBJECT( hParent ) .and. hParent:IsKindOf( "TWINDOW" ) hParent := hParent:hWnd endif if FW_ActiveMonitors() == 1 .or. ; ( !Empty( hParent ) .and. HB_ISNUMERIC( hParent ) .and. IsWindow( hParent ) ) return WndCenter( hWnd, If( IsWindow( hParent ), hParent, 0 ) ) endif if HB_ISNUMERIC( hParent ) .and. hParent >= 1 oMonitor := FW_GetMonitor( hParent ) elseif HB_ISOBJECT( hParent ) .and. hParent:IsKindOf( "TMONITOR" ) oMonitor := hParent elseif Empty( oMonitor := FW_SetMonitor() ) aRect := GetCoors( hWnd ) oMonitor := FW_GetMonitor( aRect[ 1 ], aRect[ 2 ] ) endif if oMonitor == nil .or. oMonitor:lPrimary WndCenter( hWnd ) else oMonitor:Center( hWnd ) endif return nil //----------------------------------------------------------------------------// CLASS TMonitor STATIC FROM TRect DATA ClientRect DATA lPrimary METHOD New( aInfo ) CONSTRUCTOR METHOD Move( oWnd ) METHOD Center( oWnd ) METHOD Row( r ) INLINE ( ::nTop + r ) METHOD Col( c ) INLINE ( ::nLeft + c ) ENDCLASS //----------------------------------------------------------------------------// METHOD New( aInfo ) CLASS TMonitor ::Super:New( aInfo[ 1 ], aInfo[ 2 ], aInfo[ 3 ], aInfo[ 4 ] ) ::ClientRect:= TRect():New( aInfo[ 5 ], aInfo[ 6 ], aInfo[ 7 ], aInfo[ 8 ] ) ::lPrimary := aInfo[ 9 ] return Self //----------------------------------------------------------------------------// METHOD Move( oWnd ) CLASS TMonitor local hWnd, nTop, nLeft, w, h, aRect local oMonitor if HB_ISOBJECT( oWnd ) .and. oWnd:IsKindOf( "TWINDOW" ) hWnd := oWnd:hWnd elseif HB_ISNUMERIC( oWnd ) hWnd := oWnd endif if Empty( hWnd ) .or. !IsWindow( hWnd ) return nil endif // aRect := GetCoors( hWnd ) // not correct for dialogs aRect := GetWndRect( hWnd ) nTop := aRect[ 1 ] nLeft := aRect[ 2 ] w := aRect[ 4 ] - aRect[ 2 ] h := aRect[ 3 ] - aRect[ 1 ] oMonitor := FW_GetMonitor( hWnd ) if !oMonitor:lPrimary nTop -= oMonitor:nTop nLeft -= oMonitor:nLeft endif nTop += ::nTop nLeft += ::nLeft MoveWindow( hWnd, nTop, nLeft, w, h, .t. ) return nil //----------------------------------------------------------------------------// METHOD Center( oWnd ) CLASS TMonitor local aPt := ::CenterPt local hWnd, w, h, aRect if HB_ISNUMERIC( oWnd ) .and. IsWindow( oWnd ) hWnd := oWnd aRect := GetCoors( hWnd ) w := aRect[ 4 ] - aRect[ 2 ] h := aRect[ 3 ] - aRect[ 1 ] aPt[ 1 ] := Max( ::nTop, aPt[ 1 ] - Int( h / 2 ) ) aPt[ 2 ] := Max( ::nLeft, aPt[ 2 ] - Int( w / 2 ) ) MoveWindow( hWnd, aPt[ 1 ], aPt[ 2 ], w, h, .t. ) elseif HB_ISOBJECT( oWnd ) .and. oWnd:IsKindOf( "TWINDOW" ) aPt[ 1 ] -= Int( oWnd:nHeight / 2 ) aPt[ 2 ] -= Int( oWnd:nWidth / 2 ) aPt[ 1 ] := Max( ::nTop, aPt[ 1 ] ) aPt[ 2 ] := Max( ::nLeft, aPt[ 2 ] ) oWnd:Move( aPt[ 1 ], aPt[ 2 ], nil, nil, .t. ) endif return aPt //----------------------------------------------------------------------------// #pragma BEGINDUMP #if ( defined( _MSC_VER ) && ( _MSC_VER < 1500 ) ) // VC98 #ifndef _WIN32_IE #define _WIN32_IE 0x0401 #endif #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 #endif #endif #define FKG_FORCED_USAGE #include <windows.h> #include <hbapi.h> #include <fwh.h> #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) #define VC98 #endif #if defined( VC98 ) && ( !defined( WINVER ) || ( WINVER < 0x0500 ) ) #ifndef MONITOR_DEFAULTTONULL #define MONITOR_DEFAULTTONULL 0x00000000 #endif #ifndef MONITOR_DEFAULTTOPRIMARY #define MONITOR_DEFAULTTOPRIMARY 0x00000001 #endif #ifndef MONITOR_DEFAULTTONEAREST #define MONITOR_DEFAULTTONEAREST 0x00000002 #endif #ifndef MONITORINFOF_PRIMARY #define MONITORINFOF_PRIMARY 0x00000001 #endif DECLARE_HANDLE(HMONITOR); typedef struct tagMONITORINFO { DWORD cbSize; RECT rcMonitor; RECT rcWork; DWORD dwFlags; } MONITORINFO, *LPMONITORINFO; #endif HB_FUNC_STATIC( MONITORINFOFROMRC ) // ( nRow,Col ) --> { t,l,b,r,t2,l2,b2,r2,lPrimary} { HWND hWnd = fw_parH( 1 ); HMONITOR hMonitor; POINT pt; MONITORINFO mi; mi.cbSize = sizeof( mi ); if ( hb_pcount() == 1 && IsWindow( hWnd ) ) { #ifdef VC98 hMonitor = ( HMONITOR ) MonitorFromWindow( hWnd, MONITOR_DEFAULTTONULL ); #else hMonitor = MonitorFromWindow( hWnd, MONITOR_DEFAULTTONULL ); #endif } else { pt.x = hb_parnl( 2 ); pt.y = hb_parnl( 1 ); #ifdef VC98 hMonitor = ( HMONITOR ) MonitorFromPoint( pt, MONITOR_DEFAULTTONULL ); #else hMonitor = MonitorFromPoint( pt, MONITOR_DEFAULTTONULL ); #endif } if ( hMonitor == NULL ) { hb_ret(); } else { GetMonitorInfo( hMonitor, &mi ); hb_reta( 9 ); #ifdef __XHARBOUR__ hb_stornl( mi.rcMonitor.top, -1, 1 ); hb_stornl( mi.rcMonitor.left, -1, 2 ); hb_stornl( mi.rcMonitor.bottom, -1, 3 ); hb_stornl( mi.rcMonitor.right, -1, 4 ); hb_stornl( mi.rcWork.top, -1, 5 ); hb_stornl( mi.rcWork.left, -1, 6 ); hb_stornl( mi.rcWork.bottom, -1, 7 ); hb_stornl( mi.rcWork.right, -1, 8 ); hb_storl( ( mi.dwFlags & MONITORINFOF_PRIMARY ) == MONITORINFOF_PRIMARY, -1, 9 ); #else hb_storvnl( mi.rcMonitor.top, -1, 1 ); hb_storvnl( mi.rcMonitor.left, -1, 2 ); hb_storvnl( mi.rcMonitor.bottom, -1, 3 ); hb_storvnl( mi.rcMonitor.right, -1, 4 ); hb_storvnl( mi.rcWork.top, -1, 5 ); hb_storvnl( mi.rcWork.left, -1, 6 ); hb_storvnl( mi.rcWork.bottom, -1, 7 ); hb_storvnl( mi.rcWork.right, -1, 8 ); hb_storvl( ( mi.dwFlags & MONITORINFOF_PRIMARY ) == MONITORINFOF_PRIMARY, -1, 9 ); #endif } } #ifndef VC98 #ifdef _MSC_VER #pragma warning( push ) #pragma warning( disable : 4996 ) /* GetVersionEx deprecated */ #endif HB_FUNC( WINDOWS ) { OSVERSIONINFOEX vi; SYSTEM_INFO si; vi.dwOSVersionInfoSize = sizeof( OSVERSIONINFOEX ); GetVersionEx( ( LPOSVERSIONINFO ) &vi ); GetSystemInfo( &si ); if( vi.dwMajorVersion == 10 && vi.dwMinorVersion == 0 ) { if( vi.wProductType == VER_NT_WORKSTATION ) hb_retc( "Windows 10" ); else hb_retc( "Windows Server 2016" ); } if( vi.dwMajorVersion == 6 && vi.dwMinorVersion == 3 ) { if( vi.wProductType == VER_NT_WORKSTATION ) hb_retc( "Windows 8.1" ); else hb_retc( "Windows Server 2012" ); } if( vi.dwMajorVersion == 6 && vi.dwMinorVersion == 2 ) { if( vi.wProductType == VER_NT_WORKSTATION ) hb_retc( "Windows 8" ); else hb_retc( "Windows Server 2012 R2" ); } if( vi.dwMajorVersion == 6 && vi.dwMinorVersion == 1 ) { if( vi.wProductType == VER_NT_WORKSTATION ) hb_retc( "Windows 7" ); else hb_retc( "Windows Server 2008 R2" ); } if( vi.dwMajorVersion == 6 && vi.dwMinorVersion == 0 ) { if( vi.wProductType == VER_NT_WORKSTATION ) hb_retc( "Windows Vista" ); else hb_retc( "Windows Server 2008" ); } if( vi.dwMajorVersion == 5 && vi.dwMinorVersion == 2 ) { if( GetSystemMetrics( SM_SERVERR2 ) != 0 ) hb_retc( "Windows Server 2003 R2" ); else if( vi.wSuiteMask & VER_SUITE_WH_SERVER ) hb_retc( "Windows Server 2003" ); else if( vi.wProductType == VER_NT_WORKSTATION && ( si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 ) ) hb_retc( "Windows XP Professional x64 Edition" ); } if( vi.dwMajorVersion == 5 && vi.dwMinorVersion == 1 ) hb_retc( "Windows XP" ); if( vi.dwMajorVersion == 5 && vi.dwMinorVersion == 0 ) hb_retc( "Windows 2000" ); } #ifdef _MSC_VER #pragma warning( pop ) #endif #else HB_FUNC( WINDOWS ) { } #endif #pragma ENDDUMP //----------------------------------------------------------------------------// #pragma BEGINDUMP #include <windows.h> #include <hbapi.h> // This function returns original [w,h] irrespective of the // screen scaling HB_FUNC( SCREENSIZE_NOSCALING ) { DEVMODE dm; DWORD w = 0; DWORD h = 0; ZeroMemory(&dm, sizeof(dm)); dm.dmSize = sizeof(dm); if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm) != 0) { w = dm.dmPelsWidth; h = dm.dmPelsHeight; } hb_reta(2); #ifdef __XHARBOUR__ hb_stornl( ( long ) w, -1, 1 ); hb_stornl( ( long ) h, -1, 2 ); #else hb_storvnl( ( long ) w, -1, 1 ); hb_storvnl( ( long ) h, -1, 2 ); #endif } #pragma ENDDUMP //----------------------------------------------------------------------------//
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
kajot
Posts: 375
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: problem in create fivehmx.lib

Post by kajot »

thanks
but now

Type: C >>>xhb.exe -o"testfld2.c" -m -n -p -q -gc0 -I"S:\include" -I"R:\include" -I"R:\include\w32" "testfld2.prg"<<<

xHarbour 1.2.3 Intl. (SimpLex) (Build 20190614)
Copyright 1999-2018, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'testfld2.obj'...

Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB -subsystem:windows -UNMANGLE -LIBPATH:"S:\lib" -LIBPATH:"R:\lib" -LIBPATH:"R:\c_lib" -LIBPATH:"R:\c_lib\win" "testfld2.obj" "mem32.lib" "send32.lib" "png.lib" "r:\c_lib\win\gdi32.lib" "r:\c_lib\win\gdiplus.lib" "r:\c_lib\win\uxtheme.lib" "xhbzip.lib" "xhbzipdll.lib" "xfw.lib" "FiveHCM.lib" "FiveHMX.lib" "OptG.lib" "xhb.lib" "dbf.lib" "nsx.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" "ct3comm.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib OleDlg.lib version.lib comctl32.lib comdlg32.lib gdi32.lib shell32.lib winmm.lib lz32.lib Netapi32.lib -out:"testfld2.exe"<<<

Creating object: testfld2.EXP
Creating library: testfld2.LIB
xLINK: error: Unresolved external symbol 'aullshr referenced from FiveHCM.lib(bmpdraw.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_ISWEBAPP referenced from Fivehmx.lib(dialog.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_WA_HEADER referenced from Fivehmx.lib(dialog.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_CTRLSHTML referenced from Fivehmx.lib(dialog.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_BUTTONHTML referenced from Fivehmx.lib(button.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_ISINLIST referenced from Fivehmx.lib(filename.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_GETFILE referenced from Fivehmx.lib(filename.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_GL referenced from Fivehmx.lib(filename.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_STATICHTML referenced from Fivehmx.lib(say.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_RTFBOX referenced from Fivehmx.lib(imgtxtio.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_FW_AT referenced from Fivehmx.lib(imgtxtio.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_FW_STRICMP referenced from Fivehmx.lib(imgtxtio.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_FWER_BARCODE referenced from Fivehmx.lib(imgtxtio.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_SYSWAIT referenced from Fivehmx.lib(imgtxtio.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_EDITHTML referenced from Fivehmx.lib(tget.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_FWMSWORDDOC referenced from Fivehmx.lib(printer.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_TIMAGEBASE64 referenced from Fivehmx.lib(valtostr.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_USEXLSXLIB referenced from Fivehmx.lib(adofuncs.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_USEDRXLSX referenced from Fivehmx.lib(adofuncs.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_XLSXOBJ referenced from Fivehmx.lib(adofuncs.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_CCALLSTACK referenced from Fivehmx.lib(xbrowse.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_FW_EXPRNASBLOCK referenced from Fivehmx.lib(tarrdata.obj)'.
xLINK: error: Unresolved external symbol 'HB_FUN_GETRECYCLEDREC referenced from Fivehmx.lib(dbffunc2.obj)'.
xLINK: error: Unresolved external symbol '_HB_FUN_CHECKBOXHTML referenced from Fivehmx.lib(checkbox.obj)'.
xLINK: error: Unresolved external symbol 'allshl referenced from FiveHCM.lib(color.obj)'.
xLINK: fatal error: 25 unresolved external(s).

Type: C >>>Couldn't build: testfld2.exe<<<
Type: C >>>TMAKEPROJECT<<<
Type: C >>>TMAKEPROJECT:REFRESH<<<
Type: N >>> 1428<<<

best regards
kajot
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: problem in create fivehmx.lib

Post by Antonio Linares »

What FWH version and build are you using ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
kajot
Posts: 375
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: problem in create fivehmx.lib

Post by kajot »

FWH 26.06

best regards
kajot
User avatar
kajot
Posts: 375
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: problem in create fivehmx.lib

Post by kajot »

Do You have the latest Fivehmx.lib.xbp to build Fivehmx.lib

best regards
kajot
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: problem in create fivehmx.lib

Post by Antonio Linares »

Fivehmx.lib.xbp

Code: Select all | Expand

CINI = xbuild.vc98.ini
C_OUTPUTFOLDER =
DEFFILE = lib\Fivehmx.def
INCLUDEFOLDERS = include;C:\xharbour\include;mysql\include32
LAUTORUN = .F.
LDEBUG = .F.
LGUI = .F.
LIBFOLDERS = C:\xharbour\lib
LMT = .F.
LNOAUTOFWH = .T.
LPRG_CLASSICDEBUG = .F.
LPRG_DEBUG = .F.
LUSEDLL = .F.
MAPFILE =
MYC_FLAGS =
MYDEFINES = WIN32;__WIN32__
MYLINK_FLAGS =
MYPRG_FLAGS =
MYRC_FLAGS =
MYSLY_FLAGS =
OUTPUTFOLDER = objhmx
PRG_OUTPUTFOLDER =
RC_OUTPUTFOLDER =
RUNARGUMENTS =
SLY_OUTPUTFOLDER =
STARTIN =
TARGETFOLDER = lib

#include "fivehmx.files.inc"

xbuild.vc98.ini

Code: Select all | Expand

[xHB]
Root      = C:\xharbour
LibFolder = C:\xharbour\lib
Flags     = -gc0 -m -n -p -q -w1
Exe       = harbour.exe
IncFolder = C:\xharbour\include\

[MSVC]
Root          = C:\vc98\
Compile Flags = -c -TP -Od -MT
Link Flags    = -FORCE:MULTIPLE -MAP

[FWH]
Root      = C:\fwh
LibFolder = C:\fwh\lib

[GUI]
Root      =
LibFolder =

lib\Fivehmx.def

Code: Select all | Expand

LIBRARY Fivehmx

DESCRIPTION 'FiveWin for xHarbour'

EXPORTS
           dummy      @1

fivehmx.files.inc

Code: Select all | Expand

[source\classes\TBackup.prg]
[source\classes\TRestore.prg]
[source\classes\TXmlWriter.prg]
[source\classes\Tlayman.prg]
[source\classes\activex.prg]
[source\classes\autoget.prg]
[source\classes\bar.prg]
[source\classes\bartabs.prg]
[source\classes\bitmap.prg]
[source\classes\block.prg]
[source\classes\brush.prg]
[source\classes\brushex.prg]
[source\classes\btnbmp.prg]
[source\classes\btnflat.prg]
[source\classes\button.prg]
[source\classes\buttonb.prg]
[source\classes\c5tooltp.prg]
[source\classes\calinfo.prg]
[source\classes\chatgpt.prg]
[source\classes\checkbox.prg]
[source\classes\clipbrd.prg]
[source\classes\combobox.prg]
[source\classes\combom.prg]
[source\classes\control.prg]
[source\classes\cursor.prg]
[source\classes\database.prg]
[source\classes\datarow.prg]
[source\classes\dbcombo.prg]
[source\classes\dde.prg]
[source\classes\ddeclien.prg]
[source\classes\dialog.prg]
[source\classes\dlgfind.prg]
[source\classes\edit.prg]
[source\classes\esreport.prg]
[source\classes\fget.prg]
[source\classes\fline.prg]
[source\classes\folder.prg]
[source\classes\font.prg]
[source\classes\fwbarcod.prg]
[source\classes\fwdbg.prg]
[source\classes\fwmsword.prg]
[source\classes\fworm.prg]
[source\classes\fwpdf.prg]
[source\classes\fwstack.prg]
[source\classes\gantt.prg]
[source\classes\gmail.prg]
[source\classes\group.prg]
[source\classes\hrzscrol.prg]
[source\classes\icon.prg]
[source\classes\iget.prg]
[source\classes\igroup.prg]
[source\classes\image.prg]
[source\classes\imageb64.prg]
[source\classes\ini.prg]
[source\classes\internet.prg]
[source\classes\linklist.prg]
[source\classes\listbox.prg]
[source\classes\mariarec.prg]
[source\classes\mdichild.prg]
[source\classes\mdiclien.prg]
[source\classes\mdiframe.prg]
[source\classes\menu.prg]
[source\classes\menuitem.prg]
[source\classes\meter.prg]
[source\classes\metrcirc.prg]
[source\classes\metropnl.prg]
[source\classes\mget.prg]
[source\classes\mru.prg]
[source\classes\msgbar.prg]
[source\classes\navpanels.prg]
[source\classes\oauth.prg]
[source\classes\objfile.prg]
[source\classes\outl2003.prg]
[source\classes\outl2010.prg]
[source\classes\outlook.prg]
[source\classes\outlookmail.prg]
[source\classes\pdmenu.prg]
[source\classes\pdreport.prg]
[source\classes\pen.prg]
[source\classes\printer.prg]
[source\classes\radio.prg]
[source\classes\radmenu.prg]
[source\classes\rcolumn.prg]
[source\classes\rebar.prg]
[source\classes\rect.prg]
[source\classes\reg32.prg]
[source\classes\report.prg]
[source\classes\rfile.prg]
[source\classes\rgroup.prg]
[source\classes\rline.prg]
[source\classes\rpreview.prg]
[source\classes\rtffile.prg]
[source\classes\say.prg]
[source\classes\scintila.prg]
[source\classes\scrllbar.prg]
[source\classes\scrlpanl.prg]
[source\classes\scrolimg.prg]
[source\classes\scrollex.prg]
[source\classes\scrollm.prg]
[source\classes\scrolmsg.prg]
[source\classes\selector.prg]
[source\classes\skin.prg]
[source\classes\slider.prg]
[source\classes\sliderm.prg]
[source\classes\splitter.prg]
[source\classes\sqlerror.prg]
[source\classes\statusba.prg]
[source\classes\tabs.prg]
[source\classes\tacctbl.prg]
[source\classes\tagcloud.prg]
[source\classes\tanimate.prg]
[source\classes\tarrdata.prg]
[source\classes\tbtnclr.prg]
[source\classes\tcalenda.prg]
[source\classes\tcalex.prg]
[source\classes\tcbrowse.prg]
[source\classes\tccolumn.prg]
[source\classes\tclipget.prg]
[source\classes\tcomobj.prg]
[source\classes\tcompone.prg]
[source\classes\tctrsock.prg]
[source\classes\tcvrflow.prg]
[source\classes\tdayv.prg]
[source\classes\tdbase.prg]
[source\classes\tdbasecomp.prg]
[source\classes\tdbfcomp.prg]
[source\classes\tdbodbc.prg]
[source\classes\tdbodbcd.prg]
[source\classes\tddemlcl.prg]
[source\classes\tddemlsv.prg]
[source\classes\tdeepseek.prg]
[source\classes\tdict.prg]
[source\classes\tdosprn.prg]
[source\classes\tdtpicke.prg]
[source\classes\tembeddings.prg]
[source\classes\tenhmeta.prg]
[source\classes\tereport.prg]
[source\classes\texplbar.prg]
[source\classes\texplist.prg]
[source\classes\texstruc.prg]
[source\classes\tfield.prg]
[source\classes\tfile.prg]
[source\classes\tfilegtf.prg]
[source\classes\tfoldex.prg]
[source\classes\tform.prg]
[source\classes\tftp.prg]
[source\classes\tftpcli.prg]
[source\classes\tftpfile.prg]
[source\classes\tftpserv.prg]
[source\classes\tftpsess.prg]
[source\classes\tgdiplus.prg]
[source\classes\tgemini.prg]
[source\classes\tget.prg]
[source\classes\tgif.prg]
[source\classes\tgit.prg]
[source\classes\tgraph.prg]
[source\classes\tgrok.prg]
[source\classes\tgroupex.prg]
[source\classes\tgselect.prg]
[source\classes\theader.prg]
[source\classes\thotkey.prg]
[source\classes\thtmlpag.prg]
[source\classes\timaglst.prg]
[source\classes\time.prg]
[source\classes\timer.prg]
[source\classes\tindex.prg]
[source\classes\tipaddr.prg]
[source\classes\tkimi.prg]
[source\classes\tknob.prg]
[source\classes\tlayout.prg]
[source\classes\tlex.prg]
[source\classes\tlib.prg]
[source\classes\tlistvie.prg]
[source\classes\tlocks.prg]
[source\classes\tmail.prg]
[source\classes\tmci.prg]
[source\classes\tmetafil.prg]
[source\classes\tmeterex.prg]
[source\classes\tmetro.prg]
[source\classes\tmnucomp.prg]
[source\classes\tmonthv.prg]
[source\classes\tmsgitem.prg]
[source\classes\tmybox.prg]
[source\classes\tmytitle.prg]
[source\classes\tneuralnet.prg]
[source\classes\tnewsins.prg]
[source\classes\tnewssrv.prg]
[source\classes\todbc.prg]
[source\classes\tollama.prg]
[source\classes\toolbar.prg]
[source\classes\topenai.prg]
[source\classes\tordinfo.prg]
[source\classes\tpager.prg]
[source\classes\tpages.prg]
[source\classes\tpanel.prg]
[source\classes\tparser.prg]
[source\classes\tpdf.prg]
[source\classes\tpop3.prg]
[source\classes\tprogres.prg]
[source\classes\tproxy.prg]
[source\classes\trackbar.prg]
[source\classes\transformer.prg]
[source\classes\hftokenizer.prg]
[source\classes\fwlangmodel.prg]
[source\classes\tsemanticindex.prg]
[source\classes\gpt2model.prg]
[source\classes\thftask.prg]
[source\classes\tchatagent.prg]
[source\classes\tc5imglst.prg]
[source\classes\twhispercpp.prg]
[source\classes\tras.prg]
[source\classes\trating.prg]
[source\classes\trbgroup.prg]
[source\classes\trbtn.prg]
[source\classes\trdd.prg]
[source\classes\trddodbc.prg]
[source\classes\trecset.prg]
[source\classes\treeitem.prg]
[source\classes\trees.prg]
[source\classes\tribbon.prg]
[source\classes\triched5.prg]
[source\classes\trichedi.prg]
[source\classes\trpanel.prg]
[source\classes\tsaybcod.prg]
[source\classes\tselex.prg]
[source\classes\tskinbtn.prg]
[source\classes\tsmtp.prg]
[source\classes\tsocket.prg]
[source\classes\tssh.prg]
[source\classes\tstruct.prg]
[source\classes\tswitch.prg]
[source\classes\tsyslink.prg]
[source\classes\ttabctrl.prg]
[source\classes\ttitle.prg]
[source\classes\ttmpicke.prg]
[source\classes\ttoast.prg]
[source\classes\ttray.prg]
[source\classes\ttreevie.prg]
[source\classes\ttvitem.prg]
[source\classes\ttxtedit.prg]
[source\classes\ttxtfile.prg]
[source\classes\tupdown.prg]
[source\classes\tview.prg]
[source\classes\twebcam.prg]
[source\classes\twebclie.prg]
[source\classes\twebserv.prg]
[source\classes\twebsock.prg]
[source\classes\twebview.prg]
[source\classes\twebview2.prg]
[source\classes\tweekv.prg]
[source\classes\twhatsapp.prg]
[source\classes\tyacc.prg]
[source\classes\urllink.prg]
[source\classes\video.prg]
[source\classes\vistamnu.prg]
[source\classes\VMenu.prg]
[source\classes\vitem.prg]
[source\classes\vrd.prg]
[source\classes\vrdbcode.prg]
[source\classes\vrdini.prg]
[source\classes\vrditem.prg]
[source\classes\wbrowse.prg]
[source\classes\window.prg]
[source\classes\xbrcode.prg]
[source\classes\xbrowse.prg]
[source\classes\ximage.prg]
[source\function\adofuncs.prg]
[source\function\alert.prg]
[source\function\browse.prg]
[source\function\c5lib.prg]
[source\function\callstac.prg]
[source\function\checkres.prg]
[source\function\clipmore.prg]
[source\function\dbffunc1.prg]
[source\function\dbffunc2.prg]
[source\function\dbgabout.prg]
[source\function\dbgalert.prg]
[source\function\dbgmemo.prg]
[source\function\dbgprint.prg]
[source\function\dbgtable.prg]
[source\function\dbgtrace.prg]
[source\function\dbtools.prg]
[source\function\dlgs32.prg]
[source\function\dostofwh.prg]
[source\function\drxl.prg]
[source\function\editcell.prg]
[source\function\epfunc.prg]
[source\function\ereport.prg]
[source\function\erfile.prg]
[source\function\eritems.prg]
[source\function\eritems2.prg]
[source\function\errsysw.prg]
[source\function\ertools.prg]
[source\function\etc.prg]
[source\function\expbuild.prg]
[source\function\fileedit.prg]
[source\function\filename.prg]
[source\function\fwdecode.prg]
[source\function\fwerror.prg]
[source\function\fwmulti.prg]
[source\function\fwxlsxlb.prg]
[source\function\fwzebra.prg]
[source\function\getsysin.prg]
[source\function\gettasks.prg]
[source\function\gtf.prg]
[source\function\harbour.prg]
[source\function\imgtxtio.prg]
[source\function\keys.prg]
[source\function\loadval.prg]
[source\function\longnam2.prg]
[source\function\math.prg]
[source\function\matrices.prg]
[source\function\mdirec.prg]
[source\function\memoedit.prg]
[source\function\memstat.prg]
[source\function\mimeclip.prg]
[source\function\msgcalc.prg]
[source\function\msgget.prg]
[source\function\msglist.prg]
[source\function\msglogo.prg]
[source\function\msgmeter.prg]
[source\function\msgrun.prg]
[source\function\msgtbar.prg]
[source\function\now.prg]
[source\function\num2word.prg]
[source\function\objects.prg]
[source\function\odata.prg]
[source\function\olefuncs.prg]
[source\function\pgsuport.prg]
[source\function\prv2pdf.prg]
[source\function\random.prg]
[source\function\readxlsx.prg]
[source\function\rtfbox.prg]
[source\function\strings.prg]
[source\function\valblank.prg]
[source\function\valtostr.prg]
[source\function\valtostt.prg]
[source\function\vstrfun1.prg]
[source\function\webapp.prg]
[source\function\wqout.prg]
[source\function\xbrgetdt.prg]
[source\function\xbrowser.prg]
[source\function\xmlview.prg]
[source\function\xpad.prg]
[source\internal\crcard.prg]
[source\internal\dbffunc9.prg]
[source\internal\dotnet_.prg]
[source\internal\fldex.prg]
[source\internal\ftranslate.prg]
[source\internal\fwmaria.prg]
[source\internal\fwrowset.prg]
[source\internal\skins.prg]
[source\internal\system.prg]
[source\internal\tblockchain.prg]
[source\internal\tdbfuncs.prg]
[source\internal\tdockpnel.prg]
[source\internal\uidialog.prg]
[source\internal\uiwindow.prg]
[source\internal\webserver.prg]
[source\internal\winrt.prg]
[source\internal\xcbrowse.prg]
[source\winapi\drawbmp.prg]
[source\winapi\getfiles.prg]
[source\winapi\help32.prg]
[source\winapi\helpchm.prg]
[source\winapi\netapi32.prg]
[source\winapi\odbc.prg]
[source\winapi\shellapi.prg]
[source\winapi\wininet.prg]
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
kajot
Posts: 375
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: problem in create fivehmx.lib

Post by kajot »

thanks a loty

in source
I don't have directory internal

[source\internal\crcard.prg]
[source\internal\dbffunc9.prg]
[source\internal\dotnet_.prg]
[source\internal\fldex.prg]
[source\internal\ftranslate.prg]
[source\internal\fwmaria.prg]
[source\internal\fwrowset.prg]
[source\internal\skins.prg]
[source\internal\system.prg]
[source\internal\tblockchain.prg]
[source\internal\tdbfuncs.prg]
[source\internal\tdockpnel.prg]
[source\internal\uidialog.prg]
[source\internal\uiwindow.prg]
[source\internal\webserver.prg]
[source\internal\winrt.prg]
[source\internal\xcbrowse.prg]

best regards
kajot
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: problem in create fivehmx.lib

Post by Antonio Linares »

We don't provide source code for them.

They are already inside the lib 👍🏻

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
kajot
Posts: 375
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: problem in create fivehmx.lib

Post by kajot »

when I create each app
I receive error

Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB -subsystem:windows -UNMANGLE -LIBPATH:"S:\lib" -LIBPATH:"R:\lib" -LIBPATH:"R:\c_lib" -LIBPATH:"R:\c_lib\win" "testfld2.obj" "mem32.lib" "send32.lib" "png.lib" "r:\c_lib\win\gdi32.lib" "r:\c_lib\win\gdiplus.lib" "r:\c_lib\win\uxtheme.lib" "xhbzip.lib" "xhbzipdll.lib" "xfw.lib" "FiveHCM.lib" "FiveHMX.lib" "OptG.lib" "xhb.lib" "dbf.lib" "nsx.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" "ct3comm.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib OleDlg.lib version.lib comctl32.lib comdlg32.lib gdi32.lib shell32.lib winmm.lib lz32.lib Netapi32.lib -out:"testfld2.exe"<<<

Creating object: testfld2.EXP

Creating library: testfld2.LIB

xLINK: error: Unresolved external symbol '__aullshr referenced from FiveHCM.lib(bmpdraw.obj)'.

xLINK: error: Unresolved external symbol '_HB_FUN_SYSWAIT referenced from Fivehmx.lib(imgtxtio.obj)'.

xLINK: error: Unresolved external symbol '_HB_FUN_GETRECYCLEDREC referenced from Fivehmx.lib(dbffunc2.obj)'.

xLINK: error: Unresolved external symbol '__allshl referenced from FiveHCM.lib(color.obj)'.

xLINK: fatal error: 4 unresolved external(s).

Type: C >>>Couldn't build: testfld2.exe<<<
Type: C >>>TMAKEPROJECT<<<
Type: C >>>TMAKEPROJECT:REFRESH<<<
Type: N >>> 1428<<<

best regards
kajot
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: problem in create fivehmx.lib

Post by Antonio Linares »

Summary of what to change in the link line

  1. Add c:\vc98\lib\libc.lib after crt.lib to resolve __allshl and __aullshr.

  2. Rebuild FiveHCM.lib / FiveHMX.lib from source so that system.c and dbffunc9.c (with SYSWAIT and GETRECYCLEDREC) are included.

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
kajot
Posts: 375
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: problem in create fivehmx.lib

Post by kajot »

thank You

where can I found
system.c
dbffunc9.c

best regards
kajot
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: problem in create fivehmx.lib

Post by Antonio Linares »

system.prg

Code: Select all | Expand

#include "FiveWin.ch"

//-------------------------------------------------------------------//

function SysWait( nLong )

   local nSeconds

   DEFAULT nLong := .1
   nSeconds := Seconds() + nLong

   while Seconds() < nSeconds
     SysRefresh()
   end

return .t.

//-------------------------------------------------------------------//

dbffunc9.prg

Code: Select all | Expand

#include "fivewin.ch"
#include "dbinfo.ch"

//----------------------------------------------------------------------------//

function GetRecycledRec()

//   static ptdata

   local nRecNo      := 0
   local lRecycle    := FW_SetRecycleDeleted()
   local cSaveOrder  := OrdSetFocus()
   local nSaveRec    := RECNO()
   local cRecycleTag, cDeleteTag, n, nOrders, c

   if lRecycle == .f. .or. LASTREC() == 0 .or. RDDNAME() != "DBFCDX" .or. DBINFO( DBI_ISREADONLY )
      return 0
   endif
/*
   DEFAULT ptdata    := HB_FUNCPTR( "TDATA" )
   if !Empty( ptdata )
      n     := 1
      do while !Empty( c := PROCNAME( n ) )
         if ":" $ c
            c     := BEFORATNUM( ":", c )
            p     := HB_FUNCPTR( c )
            if !Empty( p ) .and. HB_ISOBJECT( o := HB_ExecFromArray( p ) ) .and. o:IsKindOf( "TDATA" )
               return 0
            endif
         endif
         n++
      enddo
   endif
*/
   nOrders := OrdCount()
   for n := 1 to nOrders
      if Upper( OrdFor( n ) ) == "DELETED()"
         cRecycleTag := OrdName( n )
         EXIT
      endif
   next

   if lRecycle == .t. .and. cRecycleTag == nil
      for n := 1 to nOrders
         if Upper( OrdKey( n ) ) == "DELETED()"
            cDeleteTag := OrdName( n )
            EXIT
         endif
      next
   endif

   if lRecycle == .t. .and. cRecycleTag == nil .and. cDeleteTag == nil
      if DBINFO( DBI_SHARED )
         INDEX ON RECNO() TAG RECYCLE FOR DELETED() TO TMP MEMORY ADDITIVE
      else
         INDEX ON RECNO() TAG RECYCLE FOR DELETED()
      endif
      cRecycleTag := "RECYCLE"
   endif

   if !Empty( cRecycleTag )
      OrdSetFocus( cRecycleTag )
      DBGOTO( 1 )
      if !DELETED()
         OrdSkipRaw( 1 )
      endif
      do while !Eof()
         if DELETED() .and. DBRLOCK( RECNO() )
            nRecNo   := RECNO()
            DBRECALL()
            for n := 1 to FCount()
               if !( ( c := FieldType( n ) ) $ "+=@" .or. c == "I:+" )
                  FieldPut( n, uValBlank( FieldGet( n ) ) )
               endif
            next
            EXIT
         endif
         OrdSkipRaw( 1 )
      enddo
   elseif !Empty( cDeleteTag )
      OrdSetFocus( cDeleteTag )

  OrdSkipRaw( LASTREC() )
  OrdSkipRaw( -1 )

  do while !Bof() .and. OrdKeyVal() == .T.
     if DBRLOCK( RECNO() )
        nRecNo   := RECNO()
        DBRECALL()
        for n := 1 to FCount()
           if !( ( c := FieldType( n ) ) $ "+=@" .or. c == "I:+" )
              FieldPut( n, uValBlank( FieldGet( n ) ) )
           endif
        next
        EXIT
     endif
     OrdSkipRaw( -1 )
  enddo
   endif

   OrdSetFocus( If( Empty( cSaveOrder ), 0, cSaveOrder ) )
   if nRecNo == 0
      DBGOTO( nSaveRec )
   endif

return nRecNo

//----------------------------------------------------------------------------//
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
kajot
Posts: 375
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: problem in create fivehmx.lib

Post by kajot »

yet, when I REBUILD Fivehmx.lib.xbp

[\xHarbour.com\xHarbour-xBuild\xbuild.prg->MAIN] (511)
Type: C >>>LOADPROJECT<<<
Type: C >>>Could not load one or more files:;;
File not found: S:\source\classes\tc5imglst.prg;
File not found: S:\source\classes\VMenu.prg;
File not found: S:\source\classes\vitem.prg;<<<

best regards
kajot
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: problem in create fivehmx.lib

Post by Antonio Linares »

Please remove them from Fivehmx.lib.xbp

regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply