KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: The 4D Open APIs - Part III: Displaying Information about the Server (sample cod
PRODUCT: 4D | VERSION: 6.7 | PLATFORM: Mac & Win
Published On: July 20, 2001

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");

}