To use my routine, just supply it with a valid Document object. So to run it one the current drawing, it would be
(ListXref (vla-get-ActiveDocument (vlax-get-Acad-Object)))
To run it on a drawing that is opened with ObjectDBX (looking at your code) it would be...
Wait, you don't have the ObjectDBX part in the code as is. So you would need to get the folder, which it looks like you are doing. Then you need to get the drawing files. Then open it with ODBX, and pass the OBDX variable to the function (I usually call my dbxApp, so that is what I'm showing).
(ListXref dbxApp)
Does that make sense?