Does gettask work with WINDOWS 7?
Thanks in advance
Otto
Does gettask work with WINDOWS 7?
Thanks in advance
Otto
Antonio,
Is it possible to give a summary of that Spanish topic. Many of us at the English forum don't understand a single word of Spanish.
Thank you in advance.
Regards,
Michel D.
Genk (Belgium)
I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773
#include "FiveWin.ch"
static aTasks
//----------------------------------------------------------------------------//
function GetTasks()
local aTask
aTasks = {}
EnumChildWindows( GetDesktopWindow(), { | hWnd | AddTask( hWnd ) } )
for each aTask in aTasks
aTask = aTask[ 1 ] + ", " + aTask[ 2 ]
next
return ASort( aTasks )
//----------------------------------------------------------------------------//
static function AddTask( hWnd )
local cTaskName := GetWindowModuleFileName( hWnd )
if AScan( aTasks, { | aTask | aTask[ 2 ] == cTaskName } ) == 0
AAdd( aTasks, { GetWindowText( hWnd ), cTaskName } )
endif
return nil
//----------------------------------------------------------------------------//
#pragma BEGINDUMP
#include <windows.h>
#include <psapi.h>
#include <hbapi.h>
HB_FUNC( GETWINDOWMODULEFILENAME )
{
HWND hWnd = ( HWND ) hb_parnl( 1 );
DWORD processId = 0;
DWORD dwLength = 1024;
char buffer[ 1024 ];
HMODULE hProcess;
GetWindowThreadProcessId( hWnd, &processId );
hProcess = ( HMODULE ) OpenProcess( 1040, 0, processId );
dwLength = GetModuleFileNameEx( hProcess, 0, buffer, dwLength );
CloseHandle( hProcess );
hb_retclen( buffer, dwLength );
}
#pragma ENDDUMP
//----------------------------------------------------------------------------//Antonio,
Thanks a lot for your answer.
It's all clear to me now.
Regards,
Michel D.
Genk (Belgium)
I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773