A easy question~

i want copy one PtLabel’s Pt_ARG_LABEL_IMAGE to another PtLabel,and i use this way:

PhImage_t temp; /Temp PhImage_t object/
PhImage_t *pImage_temp; /Temp PhImage_t pointer/

pImage_temp = &temp; /Initialize pointer/

PtGetResource(ABW_Lab01, /Source PtLabel/
Pt_ARG_LABEL_IMAGE,
&pImage_temp,
0);

PtSetResource(ABW_Lab02, /Destination PtLabel/
Pt_ARG_LABEL_IMAGE,
pImage_temp,
0);

but when the process goto PtSetResource(),it failed.And the errno is 22.What’s the meaning of “errno 22” and who can point the mistake of my program?Thanks very much for your answer~~i’ll wait online

Try strerror() to get a text explaination of the error.

i have used strerror(),and the error is “Invalid argument”.Who can tell me which is the Invalid argument in the function PtSetResource.