FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Compiler error
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Compiler error
Posted: Thu Feb 16, 2017 04:52 PM
Guys:

As per Antonio's instructions I put this code at the end of my main PRG but I'm getting a compiler error:
Code (fw): Select all Collapse
#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>

HB_FUNC( GETCONSOLEWINDOW )
{
   hb_retnll( GetConsoleWindow() );
}

#pragma ENDDUMP


Code (fw): Select all Collapse
Generating C source output to 'obj\TEST.c'... Done.
        c:\bcc582\bin\bcc32 -c -tWM -Ic:\Harbour320\include -oobj\TEST obj\TEST.c
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
obj\TEST.c:
Error E2342 .\\TEST.PRG 2412: Type mismatch in parameter 'lNumber' (wanted '__int64', got 'HWND__ *') in function HB_FUN_GETCONSOLEWINDOW
*** 1 errors in Compile ***

** error 1 ** deleting .\obj\TEST.OBJ


Any ideas of what's wrong ?
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Compiler error
Posted: Thu Feb 16, 2017 05:25 PM
Try this:

Code (fw): Select all Collapse
hb_retnll( ( __int64 ) GetConsoleWindow() );


EMG

Continue the discussion