What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Interop.Call("user32.dll","GetActiveWindow") returns 0

Interop.Call("user32.dll","GetActiveWindow") returns 0
Author: Message:
Pinecone
New Member
*

Avatar
Coffee Powered

Posts: 9
34 / Male / Flag
Joined: Dec 2008
RE: Interop.Call("user32.dll","GetActiveWindow") returns 0
Untested... I think will work as is. GetWindowThreadProcessId was the function you were looking for. http://msdn.microsoft.com/en-us/library/ms633522.aspx

code:
var D = Interop.Allocate(4);
var hWnd = Interop.Call('User32.dll', 'GetForegroundWindow');
var hThread = Interop.Call('User32.dll', 'GetWindowThreadProcessId', hWnd, D.DataPtr);
var ProcessId = D.ReadDWORD(0);
D.Size = 0;

This post was edited on 12-23-2008 at 06:52 PM by Pinecone.
12-22-2008 04:12 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Interop.Call("user32.dll","GetActiveWindow") returns 0 - by V@no on 12-22-2008 at 02:01 AM
RE: Interop.Call("user32.dll","GetActiveWindow") returns 0 - by felipEx on 12-22-2008 at 03:01 AM
RE: Interop.Call("user32.dll","GetActiveWindow") returns 0 - by V@no on 12-22-2008 at 03:11 AM
RE: Interop.Call("user32.dll","GetActiveWindow") returns 0 - by Pinecone on 12-22-2008 at 04:12 AM
RE: Interop.Call("user32.dll","GetActiveWindow") returns 0 - by V@no on 12-22-2008 at 05:45 AM
RE: Interop.Call("user32.dll","GetActiveWindow") returns 0 - by Pinecone on 12-22-2008 at 06:31 AM
RE: Interop.Call("user32.dll","GetActiveWindow") returns 0 - by V@no on 12-22-2008 at 06:42 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On