Update cookies preferences
Promotic

NetTestPC - method of the Pm object

Description:
Test whether the asked computer is accessible in the network.
Syntax:
Boolean NetTestPC(Long nType, String sAddress, Long nTimeout)
Parameters:
nType(Long) Specification of the test method
1 - Ping. The method is functional only if the PROMOTIC process is started within the user's account with the administration rights. If the current logged-in user (in Windows OS) has no administration rights, then it is possible to start the PROMOTIC process with the administration rights by means of the RunAs program (part of the Windows OS), for example, by creating shortcut in Windows OS. In this case entering the administration password is required on each starting the PROMOTIC process.
2 - Echo. It's accessible only if the operating system enables the installation of the Echo network service on the target computer. By default it's possible to install this service in Windows OS 2000 and higher as Simple TCP/IP services in the Microsoft network.
3 - Ping 2. The method is functional even if it is started in the context of the user account without administration rights. The implementation of the method is based on the icmp.dll library that is a part of the Windows OS.
sAddress(String) Network address of the tested computer set by the name (e.g. "\\ASRV\KAFA") or by the IP address (e.g. "128.0.0.1")
nTimeout(Long) Time in milliseconds for which it's waiting for the response of the target computer. If the response doesn't come during this time, then the method returns the false value.
Return value:
true - The response is returned in the time limit
false - The response isn't returned in the time limit
Note:
This method is not functional in Web panels.
Example:
JavaScriptVBScriptSelect and copy to clipboard

if (! Pm.NetTestPC(1, "\\\\ASRV\\KAFA", 5000))
{
// ...
}

History:
Pm8.02.15: Fixed bug: the nType=3 (Ping 2) parameter caused memory loss.
Pm8.02.12: Fixed bug: Returned true randomly even for unaccessible computer.
PROMOTIC 9.0.29 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- NetTestPC
 
 
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r.o.