- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Correct line should be:
hWnd = GetActiveWindow()
I think compiler supposes that GetActiveWindow without () is variable not function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exactly.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page