Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currently running programs
Message
From
24/06/1999 15:08:58
 
 
To
24/06/1999 15:02:29
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00233644
Message ID:
00233650
Views:
27
>Christof,
>We are writing a utility to place in our app that helps our users understand that the app is Y2K compliant and also helps them to determine if their system is Y2K compliant. We know from past experiments that you do not want to change the system clock too far ahead if certain programs, such as Outlook, are running due to their purging functions. Is there a way in 2.6 to determine what progarms are running so that a list can be displayed to the user?
>
>Thanks,
>Mike

Sorry for butting in, but I'm pretty sure that George Tasker has written something that can do this.

Or if you have a Win9x machine, you might try the following:

FUNCTION GetProcessList
*-- Returns a cursor of running process
*-- Valid only for Win9x machines

LOCAL lnHandle, lsProcessEntry, lcCursName, lnOldArea

DECLARE INTEGER CreateToolhelp32Snapshot IN Win32Api INTEGER, INTEGER
DECLARE INTEGER Process32First IN Win32Api INTEGER, STRING @
DECLARE INTEGER Process32Next IN Win32Api INTEGER, STRING @
DECLARE INTEGER CloseHandle IN Win32Api INTEGER

lsProcessEntry = SPACE( ( 9 * 4) + 260)

lcCursName = SYS(2015)
lnOldArea = SELECT(0)
SELECT 0

CREATE CURSOR (lcCursName) (Process C( 254))

lnHandle = CreateToolhelp32Snapshot( 2, 0)
IF lnHandle > 0
lnProcess = Process32First( lnHandle, @lsProcessEntry)
DO WHILE lnProcess > 0
INSERT INTO (lcCursName) VALUES (STRTRAN((SUBSTR(lsProcessEntry, (9*4 + 1), 260)), CHR(0)))
lnProcess = Process32Next( lnHandle, @lsProcessEntry)
ENDDO
CloseHandle( lnHandle)
ELSE
*-- Error???
ENDIF

SELECT (lnOldArea)

RETURN lcCursName
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform