what does these BCC77 32 BIt Error mean ?

User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

what does these BCC77 32 BIt Error mean ?

Post 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
greeting,
Jimmy
User avatar
Antonio Linares
Site Admin
Posts: 42270
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: what does these BCC77 32 BIt Error mean ?

Post by Antonio Linares »

Dear Jimmy,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Post 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

 
greeting,
Jimmy
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Post 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 :?:
greeting,
Jimmy
User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: what does these BCC77 32 BIt Error mean ?

Post 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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: what does these BCC77 32 BIt Error mean ?

Post 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.
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: what does these BCC77 32 BIt Error mean ?

Post 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...
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: what does these BCC77 32 BIt Error mean ?

Post 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
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Post 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 :?:
greeting,
Jimmy
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: what does these BCC77 32 BIt Error mean ?

Post 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.
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Post 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
greeting,
Jimmy
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Post 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 ***
greeting,
Jimmy
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Post by Jimmy »

hi,
karinha wrote:

Code: Select all | Expand

// Always at the end of a FUNCTION 
YES, that seems to make a difference. THX
greeting,
Jimmy
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: what does these BCC77 32 BIt Error mean ?

Post by Enrico Maria Giordano »

You can safely ignore that warning. You can even suppress it with

Code: Select all | Expand

 -w-inl
Post Reply