what does these BCC77 32 BIt Error mean ?

what does these BCC77 32 BIt Error mean ?

Postby Jimmy » Mon Sep 16, 2024 4:56 am

hi,

i got these Error using BCC 77, but don´t understand what they mean
Code: Select all  Expand view  RUN

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 view  RUN
     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
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Postby Antonio Linares » Mon Sep 16, 2024 5:43 am

Dear Jimmy,

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

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

Re: what does these BCC77 32 BIt Error mean ?

Postby Jimmy » Mon Sep 16, 2024 6: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: Select all  Expand view  RUN
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: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Postby Enrico Maria Giordano » Mon Sep 16, 2024 8:15 am

Please provide a compilable sample showing the error.
User avatar
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: what does these BCC77 32 BIt Error mean ?

Postby Jimmy » 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: Select all  Expand view  RUN
   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 view  RUN
   -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 view  RUN
#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
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Postby karinha » Mon Sep 16, 2024 12:46 pm

Code: Select all  Expand view  RUN

#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
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: what does these BCC77 32 BIt Error mean ?

Postby Enrico Maria Giordano » Mon Sep 16, 2024 1: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.
User avatar
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: what does these BCC77 32 BIt Error mean ?

Postby Enrico Maria Giordano » Mon Sep 16, 2024 1:20 pm

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: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: what does these BCC77 32 BIt Error mean ?

Postby Enrico Maria Giordano » Mon Sep 16, 2024 1:21 pm

I compiled this sample and got no compiler errors.

Code: Select all  Expand view  RUN
#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
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: what does these BCC77 32 BIt Error mean ?

Postby Jimmy » Mon Sep 16, 2024 1: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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Postby Enrico Maria Giordano » Mon Sep 16, 2024 1: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.
User avatar
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: what does these BCC77 32 BIt Error mean ?

Postby Jimmy » Mon Sep 16, 2024 1: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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Postby Jimmy » Mon Sep 16, 2024 2: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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Postby Jimmy » Mon Sep 16, 2024 2:09 pm

hi,
karinha wrote:
Code: Select all  Expand view  RUN
// Always at the end of a FUNCTION 

YES, that seems to make a difference. THX
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what does these BCC77 32 BIt Error mean ?

Postby Enrico Maria Giordano » Mon Sep 16, 2024 2:15 pm

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

Code: Select all  Expand view  RUN
-w-inl
User avatar
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 63 guests