Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Trouble with GetActiveWindow

schulzey
New Contributor I
836 Views

I keep getting the following compiler error when trying to use the GetActiveWindow API.

Error 1 error #6423: This name has already been used as an external function name. [GETACTIVEWINDOW]

My code segment is as follows:

use user32
implicit none
integer(HANDLE) hWnd
hWnd = GetActiveWindow

I haven't declared, used or even mentioned GetActiveWindow anywhere else in my project. What am I doing wrong? Is the problem related to the fact that the function has no parameters passed into it?

0 Kudos
2 Replies
ZlamalJakub
New Contributor III
836 Views

Correct line should be:

hWnd = GetActiveWindow()

I think compiler supposes that GetActiveWindow without () is variable not function.

0 Kudos
Steven_L_Intel1
Employee
836 Views

Exactly.

0 Kudos
Reply