@Prompt( [ChooseDatabase]; ""; ""; ""; "");
/* Get the list of available servers. Setting the first parameter to NULL gets a list of known servers on all ports. */ sError = NSGetServerList( (char far *) NULL, &hServerList); if (sError != NOERROR) { return; } pServerList = (BYTE far *)OSLockObject(hServerList); wServerCount = (WORD) *pServerList; pwServerLength = (WORD *)(pServerList + sizeof(WORD)); pServerName = (BYTE far *) pServerList + sizeof(wServerCount) + ((wServerCount) * sizeof(WORD)); for (i=0; i<wServerCount; pServerName+=pwServerLength[i], i++) { memmove (szServerString, pServerName, pwServerLength[i]); szServerString[pwServerLength[i]] = '\0'; SendDlgItemMessage(hDlg, SERVLIST_LISTBOX, LB_ADDSTRING, (WORD) NULL, (LONG)(LPSTR) szServerString); } OSUnlockObject (hServerList); OSMemFree (hServerList);