home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / MSJV5-1.ZIP / ISAM.ARC / FIG17.C < prev    next >
Text File  |  1989-12-11  |  483b  |  23 lines

  1.  
  2. /* Function to terminate connection with server.
  3.  */
  4. int isdisconnect()
  5. {
  6.     int   iRetVal;
  7.  
  8.     iRetVal = SendMessage(hWndServer, wmTermISAM,
  9. hWndClient, 0L);
  10.     if (iRetVal != ISOK) {
  11.         /* Error terminating connection. */
  12.         if (iRetVal == 0L)
  13.             iserrno = ISNOSERVER;
  14.         else
  15.             iserrno = iRetVal;
  16.         return -1;
  17.     }
  18.     /* Successfully terminated connection with server. */
  19.     hWndServer = NULL;
  20.  
  21.     return 0;
  22. }
  23.