Max 5 API Reference
00001 #ifndef _SYSPROCESS_H_ 00002 #define _SYSPROCESS_H_ 00003 00004 BEGIN_USING_C_LINKAGE 00005 00006 // returns non-zero if process is still running 00007 long sysprocess_isrunning(long id); 00008 00009 // returns process id or 0 on error 00010 long sysprocess_launch(const char *utf8path, const char *utf8commandline); 00011 00012 // returns 0 if successful 00013 long sysprocess_activate(long id); 00014 00015 // returns 0 if process isn't running 00016 long sysprocess_getid(const char *utf8path); // find the process id for a given app 00017 00018 // returns the id of the currently running process 00019 long sysprocess_getcurrentid(); 00020 00021 // given process ID returns path as utf8 string 00022 // note: you must free the returned memory with sysmem_freeptr() 00023 long sysprocess_getpath(long id, char **utf8path); 00024 00025 // sysprocesswatcher: monitors process with given id and if process quits calls given method with arg. 00026 // note: method is called on a separate thread so you can possibly free a stalled main thread. 00027 // If you are done then free the sysprocesswatcher with object_free() and the monitoring thread will be killed. 00028 t_object* sysprocesswatcher_new(long id, method m, void *arg); 00029 00030 END_USING_C_LINKAGE 00031 00032 #endif // _SYSPROCESS_H_
Copyright © 2008, Cycling '74