Page 1 of 1

Compiler error

Posted: Thu Feb 16, 2017 4:52 pm
by HunterEC
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

#pragma BEGINDUMP

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

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

#pragma ENDDUMP

Code: Select all

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 ?

Re: Compiler error

Posted: Thu Feb 16, 2017 5:25 pm
by Enrico Maria Giordano
Try this:

Code: Select all

hb_retnll( ( __int64 ) GetConsoleWindow() );
EMG