Search found 114 matches: dllcall

Return to advanced search

Re: Using Excel/FW under Remote Desktop

hi Ari,
Ari wrote: do you have any small examples for FiveWin and Harbor

i have no Fivewin / harbour CODE for it, only Xbase++ using OT4XB to build "wrapper" for DLLcall()

under \examples\c\ and \examples\delphi\ you will find CODE which can help to build a "Wrapper" for harbour
by Jimmy
Thu May 11, 2023 4:23 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Using Excel/FW under Remote Desktop
Replies: 7
Views: 403

Re: DLLCALL under Fivewin

Place it just before the final return: #include <windows.h>...if( ! bResult )   MessageBox( 0, "error", "can't ejec't the volume", 0 );return bResult; I would suggest to write a Harbour wrapper for it and there you can issue the warning or simply generate a ...
by Antonio Linares
Mon Dec 26, 2022 9:17 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: DLLCALL under Fivewin
Replies: 45
Views: 2634

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: 2634

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: 2634

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: 2634

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: 420

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: 2634

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: 2634

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: 2634

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: 2634

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: 2634

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: 2634

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: 2634

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: 2634

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: 2634
Next

Return to advanced search