INtime SDK Help
INtime SDK v7.1 > About INtime > Alternate APIs > INtimeDotNet > ntxLookupNtxHandle(INtimeDotNet)

Searches the given process's object directory for a given name and, if found, returns the object handle. The calling thread can wait for the object to be cataloged if not present at the time of the call.

Use ntxLookupNtxHandle to get an object's handle so a thread can access the object. You specify the handle of the process whose object directory you want to search, the name of the object, and the amount of time the thread can wait. If the object is not cataloged, the thread goes to sleep by waiting for the specified time or until the name is cataloged, whichever comes first.

Visual Basic:

Function ntxLookupNtxhandle(
  ByVal hRtProcess As Integer,
  ByVal lpszName As String,
  ByVal dwMilliseconds As Integer)
As Integer

Visual C#:

Int32 ntxLookupNtxhandle (
  Int32 hRtProcess,
  String lpszName,
  Int32 dwMilliseconds);


Handle to the RT process whose directory will be examined.
String that contains the name.
The number of milliseconds the calling thread waits:
NTX_NO_WAIT The thread does not wait.
NTX_INFINITE The thread waits for its request to be fully satisfied.
Any positive integer Calling thread goes to sleep for this many milliseconds, after which it awakes.

Note: The kernel converts milliseconds to high-level ticks.

Return Values

The handle associated with the specified name.

INtimeException Status

One of these is true:
  • No object was available during the waiting period specified in dwMilliseconds.
  • The thread was not willing to wait, and the entry indicated by lpszName is not in the specified object directory.
The specified object directory is full and the object being looked up is not yet cataloged.
The specified process has an object directory of size 0 (zero).
At least one of these is true:
  • hRtProcess (if not a null selector) is not a handle for an existing object.
  • The name was found, but the cataloged object has a null handle.
The process parameter is not a handle for a process.
lpszName contains a string with a length of 0 (zero) or greater than 12.
The pointer to lpszName is invalid.
The DLL could not contact the RT kernel to complete the request.


Versions Reference
INtime 3.0 INtimeDotNet

See Also

INtimeDotNet system calls, Object directory system calls