Page 1 of 2

what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 4:56 am
by Jimmy
hi,

i got these Error using BCC 77, but don´t understand what they mean

Code: Select all | Expand

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: Select all | Expand

      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

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 5:43 am
by Antonio Linares
Dear Jimmy,

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

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 6:46 am
by Jimmy
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: Select all | Expand

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

 

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 8:15 am
by Enrico Maria Giordano
Please provide a compilable sample showing the error.

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 12:27 pm
by Jimmy
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: Select all | Expand

    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: Select all | Expand

    -gui

DEMO.PRG

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

    -lfiveh
    -lfivehc
    -luxtheme

    hbct.hbc
    xhb.hbc
    hbziparc.hbc
here DEMO.PRG

Code: Select all | Expand

#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 :?:

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 12:46 pm
by karinha

Code: Select all | Expand

#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.

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 1:19 pm
by Enrico Maria Giordano
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.

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 1:20 pm
by Enrico Maria Giordano
Enrico Maria Giordano wrote:
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.
Ok, found! :-) Let me investigate...

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 1:21 pm
by Enrico Maria Giordano
I compiled this sample and got no compiler errors.

Code: Select all | Expand

#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

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 1:25 pm
by Jimmy
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 :?:

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 1:34 pm
by Enrico Maria Giordano
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.

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 1:45 pm
by Jimmy
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

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 2:07 pm
by Jimmy
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 ***

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 2:09 pm
by Jimmy
hi,
karinha wrote:

Code: Select all | Expand

// Always at the end of a FUNCTION 
YES, that seems to make a difference. THX

Re: what does these BCC77 32 BIt Error mean ?

Posted: Mon Sep 16, 2024 2:15 pm
by Enrico Maria Giordano
You can safely ignore that warning. You can even suppress it with

Code: Select all | Expand

 -w-inl