fwh11.5 - FWH\samples\shtest.prg - error

fwh11.5 - FWH\samples\shtest.prg - error

Postby MGA » Fri Jun 03, 2011 2:31 pm

FWH\samples\shtest.prg

error:

Lines 35, Functions/Procedures 1
Generating C source output to 'shtest.c'...
Done.
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
shtest.c:
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_SHEXITWINDOWS' referenced from C:\FWH\SAMPLES\SHTEST.OBJ
Error: Unresolved external '_HB_FUN_SHRESTARTWINDOWS' referenced from C:\FWH\SAMPLES\SHTEST.OBJ
Error: Unresolved external '_HB_FUN_SHABOUT' referenced from C:\FWH\SAMPLES\SHTEST.OBJ
Error: Unresolved external '_HB_FUN_SHFILEPROPERTY' referenced from C:\FWH\SAMPLES\SHTEST.OBJ
Error: Unresolved external '_HB_FUN_SHPRNPROPERTY' referenced from C:\FWH\SAMPLES\SHTEST.OBJ
* Linking errors *
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: fwh11.5 - FWH\samples\shtest.prg - error

Postby karinha » Fri Jun 03, 2011 2:40 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7805
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: fwh11.5 - FWH\samples\shtest.prg - error

Postby Antonio Linares » Sun Jun 05, 2011 11:14 am

Source code for some of those missing functions:

This line is required in samples\buildh.bat:
echo %bcdir%\lib\psdk\shell32.lib, >> b32.bc

Code: Select all  Expand view
#pragma BEGINDUMP

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

HB_FUNC( SHRESTARTWINDOWS )
{
   hb_retnl( RestartDialog( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ), hb_parnl( 3 ) ) );
}

#pragma ENDDUMP
regards, saludos

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

Re: fwh11.5 - FWH\samples\shtest.prg - error

Postby Antonio Linares » Sun Jun 05, 2011 4:16 pm

regards, saludos

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

Re: fwh11.5 - FWH\samples\shtest.prg - error

Postby MGA » Wed Jun 08, 2011 12:12 pm

Sr. Antonio,

Utilizo XHARBOUR:

buildx shtest

Lines 35, Functions/Procedures 1
Generating C source output to 'SHTEST.c'...

Done.
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
shtest.c:
Warning W8075 SHTEST.prg 45: Suspicious pointer conversion in function HB_FUN_SHRESTARTWINDOWS

Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_SHEXITWINDOWS' referenced from C:\FWH\SAMPLES\SHTEST.OBJ
Error: Unresolved external '_HB_FUN_SHABOUT' referenced from C:\FWH\SAMPLES\SHTEST.OBJ
Error: Unresolved external '_HB_FUN_SHFILEPROPERTY' referenced from C:\FWH\SAMPLES\SHTEST.OBJ
Error: Unresolved external '_HB_FUN_SHPRNPROPERTY' referenced from C:\FWH\SAMPLES\SHTEST.OBJ
* Linking errors *



buildx.bat:

@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for xHarbour 11.05 - May 2011 xHarbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2011 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

if "%FWDIR%" == "" set FWDIR=.\..\
if "%XHDIR%" == "" set XHDIR=c:\xharbour
rem if "%2" == "/b" set GT=gtwin
rem if not "%2" == "/b" set GT=gtgui
set GT=gtgui

set hdir=%XHDIR%
set hdirl=%hdir%\lib
set bcdir=c:\bcc582
set fwh=%FWDIR%

%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > comp.log
IF ERRORLEVEL 1 GOTO COMPILEERRORS
@type comp.log

echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -v @b32.bc
:ENDCOMPILE

IF EXIST %1.rc %bcdir%\bin\brc32 -r -I%bcdir%\include %1

echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo %fwh%\lib\Fivehx.lib %fwh%\lib\FiveHC.lib + >> b32.bc
echo %hdirl%\rtl.lib + >> b32.bc
echo %hdirl%\vm.lib + >> b32.bc
echo %hdirl%\%GT%.lib + >> b32.bc
echo %hdirl%\lang.lib + >> b32.bc
echo %hdirl%\macro.lib + >> b32.bc
echo %hdirl%\rdd.lib + >> b32.bc
echo %hdirl%\dbfntx.lib + >> b32.bc
echo %hdirl%\dbfcdx.lib + >> b32.bc
echo %hdirl%\dbffpt.lib + >> b32.bc
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\debug.lib + >> b32.bc
echo %hdirl%\common.lib + >> b32.bc
echo %hdirl%\pp.lib + >> b32.bc
echo %hdirl%\pcrepos.lib + >> b32.bc
echo %hdirl%\ct.lib + >> b32.bc
echo %hdirl%\zlib.lib + >> b32.bc
echo %hdirl%\hbzip.lib + >> b32.bc

rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo %hdir%\lib\Ace32.lib + >> b32.bc

echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\uuid.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\msimg32.lib + >> b32.bc
echo %bcdir%\lib\psdk\psapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\shell32.lib, >> b32.bc

IF EXIST %1.res echo %1.res >> b32.bc

rem uncomment this line to use the debugger and comment the following one
if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
%1
GOTO EXIT
ECHO

rem delete temporary files
@del %1.c

:COMPILEERRORS
@type comp.log
ECHO * Compile errors *
GOTO EXIT

:LINKERROR
ECHO * Linking errors *
GOTO EXIT

:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT

:NOEXIST
ECHO The specified PRG %1 does not exist

:EXIT
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: fwh11.5 - FWH\samples\shtest.prg - error

Postby MGA » Thu Jun 16, 2011 11:45 am

Sr. Antonio ?
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: fwh11.5 - FWH\samples\shtest.prg - error

Postby Antonio Linares » Thu Jun 16, 2011 9:43 pm

Code: Select all  Expand view
HB_FUNC( SHEXITWINDOWS )
{
   hb_retl( ExitWindowsEx( hb_parnl( 1 ), hb_parnl( 2 ) ) );
}


function ShExitWindows( nFlags, nReason ) --> lSuccess

nFlags and nReason values are described here:
http://msdn.microsoft.com/en-us/library/aa376868(v=VS.85).aspx
regards, saludos

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

Re: fwh11.5 - FWH\samples\shtest.prg - error

Postby Antonio Linares » Thu Jun 16, 2011 9:56 pm

Code: Select all  Expand view
HB_FUNC( SHABOUT )
{
   hb_retnl( ShellAbout( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ), hb_parc( 3 ), ( HICON ) hb_parnl( 4 ) ) );
}
 

http://msdn.microsoft.com/en-us/library/bb762152(v=vs.85).aspx
regards, saludos

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

Re: fwh11.5 - FWH\samples\shtest.prg - error

Postby MGA » Fri Jun 17, 2011 11:42 am

Sr. Antonio:



Lines 35, Functions/Procedures 1
Generating C source output to 'shtest.c'...
Done.
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
shtest.c:
Warning W8075 shtest.prg 47: Suspicious pointer conversion in function HB_FUN_SHRESTARTWINDOWS
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Fatal: Too many commas on command line:
* Linking errors *





// Just for FW 32 bits

Code: Select all  Expand view
#include "FiveWin.ch"

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

function Main()

   local oDlg
   local cPrinter := GetProfString( "windows", "device", "" )

   cPrinter = SubStr( cPrinter, 1, At( ",", cPrinter ) - 1 )

   DEFINE DIALOG oDlg TITLE "Shell Common Dialogs" SIZE 300, 250 PIXEL

    @ 10, 25 BUTTON "&Exit Windows" ACTION SHExitWindows( oDlg:hWnd ) ;
             SIZE 100, 15 PIXEL

   @ 30, 25 BUTTON "&Restart Windows" ACTION SHRestartWindows( oDlg:hWnd, "FiveTech Software" + CRLF + CRLF ) ;
            SIZE 100, 15 PIXEL

    @ 50, 25 BUTTON "&Shell About" ACTION SHAbout( oDlg:hWnd, "FW/FWH/FW++/FWC3/FWPPC", "www.Fivetechsoft.com" ) ;
             SIZE 100, 15 PIXEL

    @ 70, 25 BUTTON "&File Property" ACTION SHFileProperty( oDlg:hWnd, "shtest.exe" ) ;
             SIZE 100, 15 PIXEL

    @ 90, 25 BUTTON "&Print Property" ACTION SHPrnProperty( oDlg:hWnd, cPrinter ) ;
             SIZE 100, 15 PIXEL

   ACTIVATE DIALOG oDlg CENTERED

return nil

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

#pragma BEGINDUMP

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

#define SHTDN_REASON_MAJOR_APPLICATION 0x00040000

HB_FUNC( SHRESTARTWINDOWS )
{
   hb_retnl( RestartDialog( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ), hb_parnl( 3 ) ) );
}

HB_FUNC( SHEXITWINDOWS )
{
   hb_retl( ExitWindowsEx( hb_parnl( 1 ), hb_parnl( 2 ) ) );
}

HB_FUNC( SHABOUT )
{
   hb_retnl( ShellAbout( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ), hb_parc( 3 ), ( HICON ) hb_parnl( 4 ) ) );
}

#pragma ENDDUMP
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: fwh11.5 - FWH\samples\shtest.prg - error

Postby Daniel Garcia-Gil » Fri Jun 17, 2011 1:09 pm

Hello

Code: Select all  Expand view

WCHAR * AnsiToWide( const char * );

HB_FUNC( SHRESTARTWINDOWS )
{
   WCHAR *pW = AnsiToWide( hb_parc( 2 ) ) ;
   hb_retnl( RestartDialog( ( HWND ) hb_parnl( 1 ), pW, hb_parnl( 3 ) ) );
   hb_xfree( pW );
}
 
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: fwh11.5 - FWH\samples\shtest.prg - error

Postby MGA » Sat Jun 18, 2011 11:20 am

Daniel,

Continua me gerando erro
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests