lrt_memcpy
| Buffer Manipulation Functions |
Copies the specified number of bytes from the source to the destination.
void lrt_memcpy( void *dest, const void *source, unsigned long count );
| dest | Destination for memory copy. |
| source | Copy specified number of bytes from this location. |
| count | Number of bytes to copy. |
The lrt_memcpy function copies the specified number of bytes from the source to the destination. The source is saved in a parameter before it is copied to the destination. This function is the same as the C function (memcpy). The lrt_memcpy function is provided in case the C function (memcpy) is not found on the user's machine. Since we use a C interpreter, we can't assume that the standard C library is found on each user's machine.
Return Values
The function is declared as void, so it does not return anything.
Parameterization
The following argument can be parameterized using standard parameterization: source
Example
In the following example, lrt_memcpy copies 41 bytes from the static buffer sbuf_1 into the first data buffer, data_0.
/* Request CARRAY buffer 1 */
lrt_memcpy(data_0, sbuf_1, 41);
lrt_display_buffer("sbuf_1", data_0, 41, 41);
data_1 = lrt_tpalloc("CARRAY", "", 8192);
tpresult_int = lrt_tpcall("GetCertificate",
data_0,
41,
&data_1,
&olen,
TPSIGRSTRT);
/* Reply CARRAY buffer 1 */
lrt_display_buffer("rbuf_1", data_1, olen, 51);
lrt_abort_on_error();
lrt_save_searched_string(data_1, olen, 0, "SCertRep", 9, 16, "cert1");

