OCILIB (C and C++ Driver for Oracle)  4.6.3
Oracle Rowids

OCILIB supports the Oracle ROWID type through C scalar string types (otext).

The maximum size of an ROWID buffer is defined by the constant OCI_SIZE_ROWID

Example
#include "ocilib.h"
/* requires script demo/products.sql */
void err_handler(OCI_Error *err)
{
printf("%s\n", OCI_ErrorGetString(err));
}
int main(void)
{
char rowid[OCI_SIZE_ROWID + 1] = "";
if (!OCI_Initialize(err_handler, NULL, OCI_ENV_DEFAULT))
{
return EXIT_FAILURE;
}
cn = OCI_ConnectionCreate("db", "usr", "pwd", OCI_SESSION_DEFAULT);
OCI_Immediate(cn, "select rowid from products where code = 1", OCI_ARG_TEXT, rowid);
OCI_Prepare(st, "select code, name, rowid from products where rowid = :id");
OCI_BindString(st, ":id", rowid, (unsigned int) strlen(rowid));
rs = OCI_GetResultset(st);
printf("code [%d], name [%s], rowid [%s]", OCI_GetInt(rs, 1), OCI_GetString(rs, 2), OCI_GetString(rs, 3));
return EXIT_SUCCESS;
}