FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error E2140
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Error E2140
Posted: Fri Dec 02, 2022 12:50 PM
hi,

i try to include some HMG HB_FUNC() but got
Error E2140 .\\HB_FUNC.PRG 880: Declaration is not allowed here in function HB_FUN_HMG_ISFUNCDLL
Code (fw): Select all Collapse
HB_FUNC ( HMG_ISFUNCDLL ) //        HMG_IsFuncDLL ( pLibDLL | cLibName, cFuncName ) ---> Boolean
{
   HMODULE hModule = NULL;
   BOOL bRelease;

   if ( HB_ISCHAR (1) )
   {  hModule = LoadLibrary ((TCHAR *) hb_parc (1));
      bRelease = TRUE;
   }
   else
   {  hModule = hb_libHandle (hb_param (1, HB_IT_ANY));
      bRelease = FALSE;
   }

   CHAR * cFuncName = (CHAR *) hb_parc (2);           // this Line

   hb_retl (GetProcAddress (hModule, cFuncName) ? TRUE : FALSE);

   if (bRelease && hModule)
      FreeLibrary (hModule);
}
i try to change Position but than all CODE behind does get Warning ...

any Idea how i can change it :?:
greeting,

Jimmy
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Error E2140
Posted: Fri Dec 02, 2022 01:02 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Error E2140
Posted: Fri Dec 02, 2022 02:10 PM
hi,
karinha wrote:http://www.hmgforum.com/viewtopic.php?t=4313&start=20
thx for Answer

i want to use HMG Code under Fivewin
greeting,

Jimmy

Continue the discussion