#include <sys/types.h>
|
#include <sys/ipc.h>
|
key_t
ftok (const char *path, int id); |
The specified path 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:\XX"; int proj_id = 100; key_t fkey; if ((fkey = ftok(pathame, proj_id)) == -1) { printf("ftok() failed\n"); } return 0; }
© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |