Compiler error

Post Reply
HunterEC
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Compiler error

Post 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 | Expand

#pragma BEGINDUMP

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

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

#pragma ENDDUMP


Code: Select all | Expand

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 ?
User avatar
Enrico Maria Giordano
Posts: 8734
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Been thanked: 1 time
Contact:

Re: Compiler error

Post by Enrico Maria Giordano »

Try this:

Code: Select all | Expand

hb_retnll( ( __int64 ) GetConsoleWindow() );


EMG
Post Reply