 
 (defn execute
   [conv command]
-  (.execute conv command))
+  (doto conv (.execute command)))
 
 (defn get-service
   [conv]


(defn set-timeout
  [conv ms]
  (.setTimeout conv ms))

(defn get-timeout
  "returns timeout length in ms"


(defn set-event-listener
  [conv]
  (doto conv
    (.setEventListener
      (reify DDEClientEventListener
        (onItemChanged [this topic item data]
          (prn (str "Item Changed: " topic  " , " item  " , " data )))
        (onDisconnect [this]
          (prn (str "onDisconnect() called.")))))))

(defn listen
  [conv]
  (doto conv
    (.setEventListener
      (reify DDEClientEventListener
        (onItemChanged [this _ _ data]
          (data))
        (onDisconnect [this]
          (prn (str "onDisconnect() called.")))))))

(defn listen-and-print-data
  [conv]
  (doto conv
    (.setEventListener
      (reify DDEClientEventListener
        (onItemChanged [this _ _ data]
          (prn (str data)))
        (onDisconnect [this]
          (prn (str "onDisconnect() called.")))))))

;; instantiate a DDEClientConversation

