Compiler error

Compiler error

Postby HunterEC » Thu Feb 16, 2017 4: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: Select all  Expand view
#pragma BEGINDUMP

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

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

#pragma ENDDUMP


Code: Select all  Expand view
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 ?
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Compiler error

Postby Enrico Maria Giordano » Thu Feb 16, 2017 5:25 pm

Try this:

Code: Select all  Expand view
hb_retnll( ( __int64 ) GetConsoleWindow() );


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

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