Ignore:
Timestamp:
Oct 7, 2014, 4:25:50 PM (11 years ago)
Author:
Alex Taylor
Message:

Sys2QueryProcess now accepts a PID of 0 for the current process. Version number increased to 0.1.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rxutilex/trunk/rxutilex.c

    r18 r20  
    7373#define SZ_LIBRARY_NAME         "RXUTILEX"  // Name of this library
    7474#define SZ_ERROR_NAME           "SYS2ERR"   // REXX variable used to store error codes
    75 #define SZ_VERSION              "0.0.5"     // Current version of this library
     75#define SZ_VERSION              "0.1.0"     // Current version of this library
    7676
    7777// Maximum string lengths...
     
    19561956    CHAR   szName[ CCHMAXPATH ]  = {0}, // Fully-qualified name of process
    19571957           szNoExt[ CCHMAXPATH ] = {0}; // Program name without extension
     1958    PPIB   ppib;                        // pointer to current process info block
    19581959    PSZ    pszCurrent,                  // Program name of a queried process
    19591960           c;                           // Pointer to substring
     
    19641965    APIRET rc;                          // Return code
    19651966
     1967
     1968    // Use current process when PID is 0 and program name is not specified
     1969    if (( pszProgram == NULL ) && ( *pulPID == 0 )) {
     1970        rc = DosGetInfoBlocks( NULL, &ppib );
     1971        if ( rc != NO_ERROR ) {
     1972            WriteErrorCode( rc, "DosGetInfoBlocks");
     1973            return ( rc );
     1974        }
     1975        *pulPID = ppib->pib_ulpid;
     1976    }
    19661977
    19671978#ifdef USE_DQPS
Note: See TracChangeset for help on using the changeset viewer.