Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpcc05!hpyhde4!hpycla!hpcuhc!pjw From: pjw@hpcuhc.cup.hp.com (Pam Williams) Newsgroups: comp.protocols.ibm Subject: Passing by Reference in CPI-C Message-ID: <2110003@hpcuhc.cup.hp.com> Date: 6 May 91 18:26:47 GMT Organization: Hewlett Packard, Cupertino Lines: 47 Can anyone tell me the type for parameters to CPI-C calls in 'C'. Specifically, when passing integer values to a call. For example, the SAA CPI-C Manual specifies: Set_Deallocate_Type: cmdsdt( conv_id, deallocate_type, return_code) conv_id (input) deallocate_type(input) return_code(output) And the C Pseudonym File specifies: CM_ENTRY cmsdt (unsigned char CM_PTR, CM_INT32 CM_PTR, CM_INT32 CM_PTR) where CM_ENTRY is extern void and CM_PTR is *. I assume my call should then be for example: u_char *conv_id; int dealloc_type = CM_DEALLOCATE_CONFIRM; int rc; cmsdt ( conv_id, &dealloc_type, &rc); Bottom Line: Is my logic correct in that pointers are required? If so, Why was it designed to require passing the address for integer parameters. It seems much more obvious to do: cmsdt (conv_id, CM_DEALLOCATE_CONFIRM, &rc); Thanks for the advice, Pam Williams Hewlett-Packard Co pjw@cup.hp.com