Among the tools I use frequently, tcl can do it:
dde services {} {}
returns all active service-topic pairs.
You can see the implementation in TCL source tree (win/tclWinDde.c). Basically, it's a lot of boring work with windows and messages. First, DDE client window is created. Then WM_DDE_INITIATE is sent to each window (using EnumWindows), passing the client window handle as WPARAM. The client window procedure handles WM_DDE_ACK, adding services and topics from atoms in LOWORD(lParam) and HIWORD(lParam).