Hi all,
I have developed a simple code, using the C API, which just tries to establish connection with the AR Server.The code compiles sucessfully, but it returns error msg:
RPC call failed : RPC: Can't encode arguments (ARERR 91)
Here is the main code:
int main(void)
{
ARControlStruct control;
ARNameList formNameList;
unsigned int i;
ARStatusList status;
strncpy(control.user, USER, AR_MAX_ACCESS_NAME_SIZE);
control.user[AR_MAX_ACCESS_NAME_SIZE] = '\0';
strcpy(control.password, PASSWD);
strcpy(control.localeInfo.locale, "");
//strcpy(control.language, "");
strncpy(control.server, ARSERVER, AR_MAX_SERVER_SIZE);
control.server[AR_MAX_SERVER_SIZE] = '\0';
printf("Server Name = %s\n", control.server);
if (ARInitialization(&control, &status) >= AR_RETURN_ERROR)
{
printStatusList(&status);
FreeARStatusList(&status, FALSE);
return 1;
}
FreeARStatusList(&status, FALSE);
if (ARGetListSchema(&control, 0,
AR_LIST_SCHEMA_ALL |AR_HIDDEN_INCREMENT,
NULL, NULL, NULL,
&formNameList, &status) >= AR_RETURN_ERROR)
{
printf("ARGetListScheme return ERROR!\n");
printStatusList(&status);
}
else
{
for (i = 0; i < formNameList.numItems; i++)
printf("%s\n", formNameList.nameList[i]);
}
FreeARStatusList(&status, FALSE);
FreeARNameList(&formNameList, FALSE);
if (ARTermination(&control, &status) >= AR_RETURN_ERROR)
printStatusList(&status);
FreeARStatusList(&status, FALSE);
return 0;
}
And another question:
If I use strcpy(control.language, "") like C-APIGuide-630 document,the compiler(VC++6.0) will give me an error msg saying that:
error C2039: 'language' : is not a member of 'ARControlStruct'
see declaration of 'ARControlStruct'
error C2168: 'strcpy' : too few actual parameters for intrinsic function
Why?
Thanks in advance.