Tips

4D Open APIs - Part III:サーバー(sample code)に関する情報の表示

日付2001/07/20
ID01-659
バージョン6.7.x specific
プラットフォームWindows and Mac

void DisplayServerInfo(void)

{

ServerInfoRec sInfo;

Date4D d;

int4 l;

unsigned char b;

printf(" \n Press the Enter key to diplay information about the server \n");

getchar();

printf("szName : %s\n", PversCstring(szName));

Check(_4D_GetServerInfo(hConnect, &sInfo),"_4D_GetServerInfo\0");

printf("ServerCurVers : %X\n", ((sInfo.ServerCurVers & 0xfff) << 16) );

printf("InvertedData : %d\n", sInfo.ServerHasInvertedData);

Check(_4D_Server_CurrentTime(hConnect, &l),"_4D_Server_CurrentTime\0");

printf("Server_CurrentTime : %ld ticks\n", l);

Check(_4D_Server_CurrentDate(hConnect, &d),"_4D_Server_CurrentDate\0");

printf("Server_CurrentDate : %d/%d/%d\n", d.Day, d.Month, d.Year);

Check(_4D_IsConnectionAsync(hConnect, (unsigned char *) &b),"_4D_IsConnectionAsync\0");

printf("IsConnectionAsync ? : %d\n", b);

printf("\n");

}