version 1.2, 2011/04/30 21:35:21
|
version 1.4, 2012/02/28 13:00:24
|
Line 4
|
Line 4
|
|
|
int main() |
int main() |
{ |
{ |
tagSess *n = NULL; | ait_sess_t *n = NULL; |
int i = 255; |
int i = 255; |
char *dat, szVal[256]; |
char *dat, szVal[256]; |
|
|
Line 34 int main()
|
Line 34 int main()
|
freeSession(NULL, &n); |
freeSession(NULL, &n); |
*/ |
*/ |
|
|
ipc_createSession("/tmp/abra-kadabra-123", 1003, 4096, &n); | sess_initSession(SHARED_MAP, "/tmp/abra-kadabra-123", &n); |
| ALLOC_MEMORY(1003, 4096, n); |
if (sess_GetErrno()) { |
if (sess_GetErrno()) { |
printf("Error:: #%d - %s\n", sess_GetErrno(), sess_GetError()); |
printf("Error:: #%d - %s\n", sess_GetErrno(), sess_GetError()); |
return 2; |
return 2; |
} |
} |
ipc_attachSession(n, NULL); | ATTACH_MEMORY(n); |
if (!dat) |
if (!dat) |
return 1; |
return 1; |
// sess_SetValue(n, "piuk_gniah++", "mryyynnnnn"); |
// sess_SetValue(n, "piuk_gniah++", "mryyynnnnn"); |
Line 64 int main()
|
Line 65 int main()
|
sess_DelValue(n, "szUser"); |
sess_DelValue(n, "szUser"); |
getchar(); |
getchar(); |
printf("end %p>>> String=%s\n", n->addr, n->addr); |
printf("end %p>>> String=%s\n", n->addr, n->addr); |
ipc_detachSession(n); | DETACH_MEMORY(n); |
getchar(); |
getchar(); |
ipc_destroySession("/tmp/abra-kadabra-123", &n); | FREE_MEMORY(n); |
| sess_freeSession(&n); |
return 0; |
return 0; |
} |
} |