RhIsX64Process() public static method

public static RhIsX64Process ( Int32 InProcessId, System.Boolean &OutResult ) : void
InProcessId System.Int32
OutResult System.Boolean
return void
Beispiel #1
0
        /// <summary>
        /// Determines if the target process is 64-bit or not. This will work only
        /// if the current process has <c>PROCESS_QUERY_INFORMATION</c> access to the target.
        /// </summary>
        /// <remarks>
        /// A typical mistake is to enumerate processes under system privileges and
        /// calling this method later when required. This won't work in most cases because
        /// you'll also need system privileges to run this method on processes in other sessions!
        /// </remarks>
        /// <param name="InTargetPID">The PID of the target process.</param>
        /// <returns><c>true</c> if the given process is 64-bit, <c>false</c> otherwise.</returns>
        /// <exception cref="AccessViolationException">
        /// The given process is not accessible.
        /// </exception>
        /// <exception cref="ArgumentException">
        /// The given process does not exist.
        /// </exception>
        public static bool IsX64Process(Int32 InTargetPID)
        {
            Boolean Result;

            NativeAPI.RhIsX64Process(InTargetPID, out Result);

            return(Result);
        }