The DdeQueryNextServer function obtains the next conversation handle in the specified conversation list.
HCONV DdeQueryNextServer(
  HCONVLIST hConvList,  // handle to conversation list
  HCONV hConvPrev       // previous conversation handle
);
 If the list contains any more conversation handles, the return value is the next conversation handle in the list; otherwise, it is 0L.
  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in ddeml.h.
  Import Library: Use user32.lib.
Dynamic Data Exchange Management Library Overview, Dynamic Data Exchange Management Functions, DdeConnectList, DdeDisconnectList