Obtains basic context information.
DWORD ctaGetContextInfo ( CTAHD ctahd, CTA_CONTEXT_INFO * info, unsigned size)
|
Argument |
Description |
|
ctahd |
Context handle. |
|
info |
Pointer to the CTA_CONTEXT_INFO structure: typedef struct |
|
size |
Size of the CTA_CONTEXT_INFO structure. |
|
Return value |
Description |
|
SUCCESS |
|
|
CTAERR_BAD_ARGUMENT |
Invalid info, size, or ctahd parameter. |
|
CTAERR_NOT_INITIALIZED |
Natural Access is not initialized. Call ctaInitialize first. |
|
CTAERR_SVR_COMM |
Server communication error. |
ctaGetContextInfo obtains basic information for the context specified by the ctahd parameter.
int DemoContextInfo(CTAHD ctahd)
{
DWORD ret;
CTA_CONTEXT_INFO info;
ret = ctaGetContextInfo(ctahd,&info,sizeof(info));
if ( ret != SUCCESS )
return ret;
printf("Context name: %s \n", info.contextname);
return SUCCESS;
}