Search found 142 matches: dllcall

Return to advanced search

Re: DLLCALL under Fivewin

hi Antonio, return bResult; YES :D next is to write the Harbour wrapper for it and then from there you can check the returned value and show a msg if desired, though usually it is a better practice to leave the developer warn about it in case of an error this is my HB_FUNC() Question               b...
by Jimmy
Mon Dec 26, 2022 9:10 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

Dear Jimmy,

Simply replace this:

return TRUE ;

with

return bResult;

next is to write the Harbour wrapper for it and then from there you can check the returned value and show a msg if desired,
though usually it is a better practice to leave the developer warn about it in case of an error
by Antonio Linares
Mon Dec 26, 2022 7:32 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

hi, i have re-write CODE this Way BOOL EjectVolume( TCHAR cDriveLetter ){   HANDLE hVolume;   BOOL bResult;//   BOOL fRemoveSafely = FALSE;//   BOOL fAutoEject = FALSE;   hVolume = OpenVolume(cDriveLetter);     if( hVolume != INVALID_HANDLE_VALUE )   {      bResult ...
by Jimmy
Mon Dec 26, 2022 4:35 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: different Warning using BCC7 32 Bit / MSVC 64 Bit

hi Enricon You have to fix the function EjectVolume() as it is not well written. while i had Problem with my DLLCALL Version i have search and found this Version in HMG Forum https://www.hmgforum.com/viewtopic.php?t=4524 but as i´m not a "C" Programmer ...
by Jimmy
Thu Dec 15, 2022 3:00 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: different Warning using BCC7 32 Bit / MSVC 64 Bit
Replies: 6
Views: 599

Re: DLLCALL under Fivewin

Try this:

Code: Select all  Expand view
HB_FUNC( OPENVOLUME)
{
    hb_retnl( ( HANDLE ) OpenVolume( ( TCHAR ) hb_parc( 1 ) ) );
}
by Enrico Maria Giordano
Fri Dec 09, 2022 3:54 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

hi Enrico, This is more correct: HB_FUNC( DISMOUNTVOLUME ){    hb_retl( DismountVolume( ( HANDLE ) hb_parnll( 1 ) ) );} ok, i change all void * to HANDLE ---    HB_FUNC( OPENVOLUME)    {       hb_retl( OpenVolume( ( TCHAR ...
by Jimmy
Fri Dec 09, 2022 3:41 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

but how with Prototype HANDLE OpenVolume(TCHAR cDriveLetter); HB_FUNC( OPENVOLUME){   hb_retl( OpenVolume(hb_parc( 1 )) );}  Error E2342 FWEJECT.prg 230: Type mismatch in parameter 'cDriveLetter' (wanted 'signed char', got 'const signed char *') HB_...
by Enrico Maria Giordano
Fri Dec 09, 2022 3:31 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

Dear Jimmy, HB_FUNC( DISMOUNTVOLUME ){    hb_retl( DismountVolume( ( void * ) hb_parnll( 1 ) ) );} This is more correct: HB_FUNC( DISMOUNTVOLUME ){    hb_retl( DismountVolume( ( HANDLE ) hb_parnll( 1 ) ) )...
by Enrico Maria Giordano
Fri Dec 09, 2022 3:28 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

hi Antonio, YES, this new CODE compile without Error,thx :) so i try "more" and use what chatGPT have answer HB_FUNC( LOCKVOLUME){   hb_retl( LockVolume( ( void * ) hb_parnll( 1 ) ) );}HB_FUNC( DISMOUNTVOLUME ){   hb_retl( ...
by Jimmy
Fri Dec 09, 2022 3:06 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

Dear Jimmy,

Code: Select all  Expand view
HB_FUNC( DISMOUNTVOLUME )
{
    hb_retl( DismountVolume( ( void * ) hb_parnll( 1 ) ) );
}
by Antonio Linares
Fri Dec 09, 2022 2:34 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

i have change CODE as you say but still got (same) Warnings Warning W8004 FWEJECT.prg 190: 'fAutoEject' is assigned a value that is never used in function EjectVolume Warning W8004 FWEJECT.prg 190: 'fRemoveSafely' is assigned a value that is never used in function EjectVolume You are assigning that...
by Enrico Maria Giordano
Fri Dec 09, 2022 2:12 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

hi Enrico, Try: BOOL fRemoveSafely; // = FALSE;BOOL fAutoEject; // = FALSE; hb_retl( EjectVolume( ( TCHAR ) *szDrive ) ); i have change CODE as you say but still got (same) Warnings Warning W8004 FWEJECT.prg 190: 'fAutoEject' is assigned a value that is never used in function...
by Jimmy
Fri Dec 09, 2022 1:32 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

What is DismountVolume()? It is not a Windows API.
by Enrico Maria Giordano
Fri Dec 09, 2022 1:25 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

hi Antonio, You have to write the Harbour wrappers for those C functions. In example for function BOOL DismountVolume( HANDLE hVolume ): i have done what you told me and add CODE    HB_FUNC( DISMOUNTVOLUME )    {       hb_retl( DismountVolume( hb_parnll( 1 ) ) );...
by Jimmy
Fri Dec 09, 2022 1:22 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382

Re: DLLCALL under Fivewin

who knows...

we will see :-)
by Antonio Linares
Fri Dec 09, 2022 8:23 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 4382
PreviousNext

Return to advanced search