Searches the given process's object directory for a given long name and returns the object handle, if found. The calling thread can wait for the object to be cataloged if not present at the time of the call.
Use LookupRtHandle 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.
Note: If the hProcess parameter refers to a reference object, then the returned handle will also be for a reference object. The reference object adds to the process' object count and should be deleted when finished with.
RTHANDLE LookupRtHandle(
RTHANDLE hProcess, // handle for RT process
LPSTR lpszLongName, // pointer to object's long catalog name
DWORD dwMilliseconds // time in milliseconds to wait for object to be cataloged with given name
);
hProcesslpszNamedwMillisecondsNO_WAIT |
The thread does not wait. |
WAIT_FOREVER |
The thread waits for its request to be fully satisfied. |
1-655349 |
Calling thread goes to sleep for this many milliseconds, after which it awakes.
Note: The kernel converts milliseconds to high-level ticks. |
BAD_RTHANDLEE_TIME 0x0001E_LIMIT 0x0004E_EXIST 0x0006E_TYPE 0x8002hProcess requires an RT handle for a process.E_PARAM 0x8004lpszName contains a string with a length of 0 (zero) or greater than 12.E_BAD_ADDR 0x800FlpszName is invalid.E_CONTEXTE_INVALID_ADDRESS 0x00E2| Versions | Defined in | Include | Link to |
|---|---|---|---|
| INtime 7.1 | intime/rt/include/rtbase.h | rt.h | rt.lib |