18.08.2013 Views

System i: Programming i5/OS PASE - IBM

System i: Programming i5/OS PASE - IBM

System i: Programming i5/OS PASE - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

* copies to <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> storage */<br />

paseFunctionArglist.inputPasePtr =<br />

(QP2_ptr64_t)((offsetof(inputAndResultBuffer, inputValue))<br />

| QP2_ARG_PTR_T<strong>OS</strong>TACK);<br />

/* allocate memory from the <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> heap for an output<br />

* argument. Qp2malloc will also set the <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> address<br />

* of the allocated storage in the outputPasePtr<br />

* argument */<br />

outputILEPtr = Qp2malloc(10, &(paseFunctionArglist.outputPasePtr));<br />

/* Call the function in <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> */<br />

rc = call<strong>PASE</strong>(paseFunction_ptr,<br />

&paseFunctionArglist,<br />

signature,<br />

QP2_RESULT_DWORD,<br />

&inputAndResultBuffer,<br />

sizeof(inputAndResultBuffer));<br />

if (rc != 0) {<br />

printf("output from paseFunction = >%s%s

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!