FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour what does these BCC77 32 BIt Error mean ?
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 04:56 AM
hi,

i got these Error using BCC 77, but don´t understand what they mean
Code (fw): Select all Collapse
32  DLL FUNCTION Everything_GetBuildNumber() AS LONG PASCAL FROM "Everything_GetBuildNumber" LIB hDll
33  DLL FUNCTION Everything_SetSearchA( cSearch AS LPSTR ) AS VOID PASCAL FROM "Everything_SetSearchA" LIB hDll
34  DLL FUNCTION Everything_QueryA( lWait AS BOOL ) AS BOOL PASCAL FROM "Everything_QueryA" LIB hDll
35  DLL FUNCTION Everything_GetNumResults() AS LONG PASCAL FROM "Everything_GetNumResults" LIB hDll
36  // need to check Parameter Type
37  DLL FUNCTION Everything_SetRequestFlags( nFlag AS DWORD ) AS VOID PASCAL FROM "Everything_SetRequestFlags" LIB hDll
38  DLL FUNCTION Everything_GetResultFullPathNameA( nNum AS _INT, cBuffer AS LPSTR, nSize AS _INT ) AS VOID PASCAL FROM     "Everything_GetResultFullPathNameA" LIB hDll
Compiling 'EVERYTH.PRG'...
EVERYTH.PRG(32) Error E0030 Syntax error "syntax error at 'FUNCTION'"
EVERYTH.PRG(33) Error E0030 Syntax error "syntax error at 'FUNCTION'"
EVERYTH.PRG(34) Error E0030 Syntax error "syntax error at 'FUNCTION'"
EVERYTH.PRG(35) Error E0030 Syntax error "syntax error at 'FUNCTION'"
EVERYTH.PRG(37) Error E0030 Syntax error "syntax error at 'FUNCTION'"
EVERYTH.PRG(38) Error E0030 Syntax error "syntax error at 'FUNCTION'"
it work without Error using BCC 76 (32BIt) or MSVC (64 BIt)
what does these Errors mean :?:

under HMG i can use DLLCAll this Way
Code (fw): Select all Collapse
      nDll := "Everything32.dll"

      // set thesearch
#IFDEF CODE_ANSI
      nRet := DllCall( nDLL, ,"Everything_SetSearchA",cText)
#ELSE
      nRet := DllCall( nDLL, ,"Everything_SetSearchW",cText)
#ENDIF
      // request name and size
        nRet := DllCall( nDLL, ,"Everything_SetRequestFlags", bor(EVERYTHING_REQUEST_PATH, EVERYTHING_REQUEST_FILE_NAME ,    EVERYTHING_REQUEST_SIZE) )
      // sort it
      nRet := DllCall( nDLL, ,"Everything_SetSort",EVERYTHING_SORT_FILE_LIST_FILENAME_ASCENDING)

      // execute the query
#IFDEF CODE_ANSI
      nRet := DllCall( nDLL, ,"Everything_QueryA",.T.)
#ELSE
      nRet := DllCall( nDLL, ,"Everything_QueryW",.T.)
#ENDIF

      nNum := DllCall( nDLL,  HB_DYN_CTYPE_INT ,"Everything_GetNumResults")
      FOR n := 1 TO nNum
         buf := SPACE(bufsize)
#IFDEF CODE_ANSI
         nRet := DllCall( nDLL, ,"Everything_GetResultFullPathNameA",n, @buf, bufsize)
#ELSE
         nRet := DllCall( nDLL, ,"Everything_GetResultFullPathNameW",n, @buf, bufsize)
#ENDIF

         AADD(aResult, UPPER(TRIM(buf)) )
      NEXT
      // sort it here
      aResult := ASORT(aResult)

      nNum := LEN(aResult)
      FOR n := 1 TO nNum
         cItem := aResult[n]
         IF EMPTY(cItem)
            LOOP
         ENDIF

// add direct to Grid
       EVFORM.Grid_1.AddItem({cItem+"\nhello world"})
      NEXT

      IF EMPTY(EVFORM.Grid_1.Value)              // 1st Item is empty
         EVFORM.Grid_1.DeleteItem(1)             // delete it
      ENDIF

      EVFORM.Grid_1.EnableUpdate()
RETURN
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 05:43 AM

Dear Jimmy,

Are you using #include "dll.ch" at the top of your prg ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 06:46 AM
hi Antonio,
Antonio Linares wrote:Are you using #include "dll.ch" at the top of your prg ?
YES,is that wrong for BCC 77 :?:
Code (fw): Select all Collapse
17   #include "FiveWin.ch"
18   #include "DLL.CH"
---
32   DLL FUNCTION Everything_GetBuildNumber() AS LONG PASCAL FROM "Everything_GetBuildNumber" LIB hDll
33   DLL FUNCTION Everything_SetSearchA( cSearch AS LPSTR ) AS VOID PASCAL FROM "Everything_SetSearchA" LIB hDll
34   DLL FUNCTION Everything_QueryA( lWait AS BOOL ) AS BOOL PASCAL FROM "Everything_QueryA" LIB hDll
35   DLL FUNCTION Everything_GetNumResults() AS LONG PASCAL FROM "Everything_GetNumResults" LIB hDll
36   // need to check Parameter Type
37   DLL FUNCTION Everything_SetRequestFlags( nFlag AS DWORD ) AS VOID PASCAL FROM "Everything_SetRequestFlags" LIB hDll
38   DLL FUNCTION Everything_GetResultFullPathNameA( nNum AS _INT, cBuffer AS LPSTR, nSize AS _INT ) AS VOID PASCAL FROM "Everything_GetResultFullPathNameA" LIB hDll
greeting,

Jimmy
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 08:15 AM

Please provide a compilable sample showing the error.

Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 12:27 PM
hi Enrico,

i have posted all CODE which is need.
i don´t have a Runtime Error, these 6 DLL Function simply don´t compile using BCC 7.7 and Error Message don´t explain what is going on.

here DEMO32.BAT
Code (fw): Select all Collapse
    set bcc=bcc770
    set path=c:\%bcc%\bin
    set HB_USER_CFLAGS=-Ic:\%bcc%\INCLUDE\windows\crtl -Ic:\%bcc%\INCLUDE\windows\sdk -Lc:\%bcc%\LIB
    set HB_USER_LDFLAGS=-Lc:\%bcc%\LIB;c:\%bcc%\LIB\psdk
    c:\harbour\bin\hbmk2.exe demo32.hbp -comp=bcc
here DEMO32.HBP
Code (fw): Select all Collapse
    -gui

DEMO.PRG

    -info
 
    -Ic:\fwh\include
    -Lc:\fwh\lib

    -lfiveh
    -lfivehc
    -luxtheme

    hbct.hbc
    xhb.hbc
    hbziparc.hbc
here DEMO.PRG
Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "DLL.CH"

STATIC hDLL


DLL FUNCTION Everything_GetBuildNumber() AS LONG PASCAL FROM "Everything_GetBuildNumber" LIB hDll
DLL FUNCTION Everything_SetSearchA( cSearch AS LPSTR ) AS VOID PASCAL FROM "Everything_SetSearchA" LIB hDll
DLL FUNCTION Everything_QueryA( lWait AS BOOL ) AS BOOL PASCAL FROM "Everything_QueryA" LIB hDll
DLL FUNCTION Everything_GetNumResults() AS LONG PASCAL FROM "Everything_GetNumResults" LIB hDll
// need to check Parameter Type
DLL FUNCTION Everything_SetRequestFlags( nFlag AS DWORD ) AS VOID PASCAL FROM "Everything_SetRequestFlags" LIB hDll
DLL FUNCTION Everything_GetResultFullPathNameA( nNum AS _INT, cBuffer AS LPSTR, nSize AS _INT ) AS VOID PASCAL FROM "Everything_GetResultFullPathNameA" LIB hDll

Procedure MAIN
MsgInfo("Demo")
RETURN
and this will be the Error Message
Copyright (c) 1999-2020, https://harbour.github.io/
Compiling 'DEMO.PRG'...
DEMO.PRG(7) Error E0030 Syntax error "syntax error at 'FUNCTION'"
DEMO.PRG(8) Error E0030 Syntax error "syntax error at 'FUNCTION'"
DEMO.PRG(9) Error E0030 Syntax error "syntax error at 'FUNCTION'"
DEMO.PRG(10) Error E0030 Syntax error "syntax error at 'FUNCTION'"
DEMO.PRG(12) Error E0030 Syntax error "syntax error at 'FUNCTION'"
DEMO.PRG(13) Error E0030 Syntax error "syntax error at 'FUNCTION'"
6 errors
what does the Syntax Error want to tell me :?:
greeting,

Jimmy
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 12:46 PM
Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "Dll.ch"  // ?? -> Never used.

STATIC hDll

FUNCTION Main()

   LOCAL nRet

// hDll := LoadLibrary( "JIMMYDLL.DLL" )

// nRet := Everything_GetBuildNumber()

// IF nRet != 0

//    MsgStop( "Error" )

// ELSE

      MsgInfo( "Do it right Jimmy" )

// ENDIF

RETURN NIL

// Always at the end of a FUNCTION
DLL FUNCTION Everything_GetBuildNumber() AS LONG PASCAL FROM "Everything_GetBuildNumber" LIB hDll
DLL FUNCTION Everything_SetSearchA( cSearch AS LPSTR ) AS VOID PASCAL FROM "Everything_SetSearchA" LIB hDll
DLL FUNCTION Everything_QueryA( lWait AS BOOL ) AS BOOL PASCAL FROM "Everything_QueryA" LIB hDll
DLL FUNCTION Everything_GetNumResults() AS LONG PASCAL FROM "Everything_GetNumResults" LIB hDll
// need to check Parameter Type
DLL FUNCTION Everything_SetRequestFlags( nFlag AS DWORD ) AS VOID PASCAL FROM "Everything_SetRequestFlags" LIB hDll
DLL FUNCTION Everything_GetResultFullPathNameA( nNum AS _INT, cBuffer AS LPSTR, nSize AS _INT ) AS VOID PASCAL FROM "Everything_GetResultFullPathNameA" LIB hDll

// FIN / END
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 01:19 PM
Jimmy wrote:i have posted all CODE which is need.
I can't find it, sorry. If you mean the one that starts with nDll := "Everything32.dll", it is NOT compilable.
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 01:20 PM
Enrico Maria Giordano wrote:
i have posted all CODE which is need.
I can't find it, sorry. If you mean the one that starts with nDll := "Everything32.dll", it is NOT compilable.
Ok, found! :-) Let me investigate...
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 01:21 PM
I compiled this sample and got no compiler errors.
Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "DLL.CH"

STATIC hDLL


DLL FUNCTION Everything_GetBuildNumber() AS LONG PASCAL FROM "Everything_GetBuildNumber" LIB hDll
DLL FUNCTION Everything_SetSearchA( cSearch AS LPSTR ) AS VOID PASCAL FROM "Everything_SetSearchA" LIB hDll
DLL FUNCTION Everything_QueryA( lWait AS BOOL ) AS BOOL PASCAL FROM "Everything_QueryA" LIB hDll
DLL FUNCTION Everything_GetNumResults() AS LONG PASCAL FROM "Everything_GetNumResults" LIB hDll
// need to check Parameter Type
DLL FUNCTION Everything_SetRequestFlags( nFlag AS DWORD ) AS VOID PASCAL FROM "Everything_SetRequestFlags" LIB hDll
DLL FUNCTION Everything_GetResultFullPathNameA( nNum AS _INT, cBuffer AS LPSTR, nSize AS _INT ) AS VOID PASCAL FROM "Everything_GetResultFullPathNameA" LIB hDll

Procedure MAIN
MsgInfo("Demo")
RETURN
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 01:25 PM
hi Enrico,
Enrico Maria Giordano wrote:I compiled this sample and got no compiler errors.
funny. i got these 6 Errors
DEMO.PRG(7) Error E0030 Syntax error "syntax error at 'FUNCTION'"
DEMO.PRG(8) Error E0030 Syntax error "syntax error at 'FUNCTION'"
DEMO.PRG(9) Error E0030 Syntax error "syntax error at 'FUNCTION'"
DEMO.PRG(10) Error E0030 Syntax error "syntax error at 'FUNCTION'"
DEMO.PRG(12) Error E0030 Syntax error "syntax error at 'FUNCTION'"
DEMO.PRG(13) Error E0030 Syntax error "syntax error at 'FUNCTION'"
6 errors
do you use my DEMO32.BAT/ DEMO32.HBP under 32 Bit Environment :?:
greeting,

Jimmy
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 01:34 PM
Jimmy wrote:do you use my DEMO32.BAT/ DEMO32.HBP under 32 Bit Environment :?:
Of course not. I'm using my compile batch. Are you sure you are including the correct dll.ch? It looks like not.
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 01:45 PM
hi Enrico,
Enrico Maria Giordano wrote:Are you sure you are including the correct dll.ch?
you might be right that i use different DLL.CH (from Xbase++). i will check it, THX
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 02:07 PM
hi Enrico,

you are right, it was the wrong DLL.CH (from Xbase++) which was in Front of PATH.

Now it compile allmost under 32 Bit, but still get a Error, about ShlObj.h, which i do´nt understand
Warning W8027 c:\bcc770\INCLUDE\windows\sdk\shobjidl_core.h 18147: Functions containing for are not expanded inline
+ Full parser context
+ HB_FUNC.PRG, line 50: #include c:\bcc770\INCLUDE\windows\sdk\ShlObj.h
+ c:\bcc770\INCLUDE\windows\sdk\ShlObj.h, line 111: #include c:\bcc770\INCLUDE\windows\sdk\shobjidl.h
+ c:\bcc770\INCLUDE\windows\sdk\shobjidl.h, line 776: #include c:\bcc770\INCLUDE\windows\sdk\shobjidl_core.h
Warning W8027 c:\bcc770\INCLUDE\windows\sdk\shlobj_core.h 3503: Functions containing while are not expanded inline
+ Full parser context
+ HB_FUNC.PRG, line 50: #include c:\bcc770\INCLUDE\windows\sdk\ShlObj.h
+ c:\bcc770\INCLUDE\windows\sdk\ShlObj.h, line 113: #include c:\bcc770\INCLUDE\windows\sdk\shlobj_core.h
*** 1 errors in Compile ***
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 02:09 PM
hi,
karinha wrote:
Code (fw): Select all Collapse
// Always at the end of a FUNCTION
YES, that seems to make a difference. THX
greeting,

Jimmy
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: what does these BCC77 32 BIt Error mean ?
Posted: Mon Sep 16, 2024 02:15 PM
You can safely ignore that warning. You can even suppress it with
Code (fw): Select all Collapse
 -w-inl