Hi,
I’m trying (and failing) to pass an area
through the app_server. Per the BeBook It seems like cloning an area is the way to share it across apps/teams - but for some reason I just cannot get it to work, getting B_NOT_ALLOWED when I try to clone. This same type of code works fine in other contexts where I’ve tried it, so it’s making me think the app_server is a special team that doesn’t allow certain operations.
Thoughts?
The relevant snippet of my code looks like this:
area_id srcAreaID;
char* area_addr;
link.Read<area_id>(&srcAreaID);
area_id cloneAreaID = clone_area("my area",
(void **)&area_addr,
B_ANY_ADDRESS,
B_READ_AREA | B_WRITE_AREA,
srcAreaID);
if (cloneAreaID < B_OK) { // cloneAreaID == B_NOT_ALLOWED
fLink.StartMessage(cloneAreaID);
fLink.Flush();
break;
}
I didn’t see anything in the BeBook about any restrictions on particular teams, like the app server - is there some other magic I need to do?
Thanks!