typedef __gid_t | gid_t |
typedef __mode_t | mode_t |
typedef __uid_t | uid_t |
IMPORT_C key_t | ftok | ( | const char * | pathname, |
int | proj_id | |||
) |
The ftok function attempts to create a unique key suitable for use with the msgget , semget and shmget functions given the pathname of an existing file and a user-selectable id.
The specified pathname must specify an existing file that is accessible to the calling process or the call will fail. Also, note that links to files will return the same key, given the same id.
#include <sys/types.h> #include <sys/ipc.h> #include <stdio.h> int main(void) { char *pathame = "C:\XXX"; int proj_id = 100; key_t fkey; if ((fkey = ftok(pathame, proj_id)) == -1) { printf("ftok() failed "); } return 0; }
Capability | |
---|---|
Deferred | RFs::Entry(const TDesC16&, TEntry&) |