help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions] Reference for unit 'ipc' (#rtl)

ftok

Create token from filename

Declaration

Source position: ipc.pp line 104

function ftok(

  Path: pchar;

  ID: cint

):TKey;

Description

ftok returns a key that can be used in a semgetshmget or msgget call to access a new or existing IPC resource.

Path is the name of a file in the file system, ID is a character of your choice. The ftok call does the same as it's C couterpart, so a pascal program and a C program will access the same resource if they use the same Path and ID

For an example, see msgctl, semctl or shmctl.

Errors

ftok returns -1 if the file in Path doesn't exist.

See also

semget

  

Return the ID of a semaphore set, possibly creating the set

shmget

  

Return the ID of a shared memory block, possibly creating it

msgget

  

Return message queue ID, possibly creating the queue

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505