Hi Rene,
You don't need a window structure for xFiles - so you can just make a simple source procedure that does the work you want. You certainly can pass it the p_web parameter if you want to (it's just a parameter like any other.)
I wouldn't call it on a new thread, rather I'd do it at the end of the WebHandler, at any point after the reply to the browser has been sent.
ie
p_web.replycomplete()
myWhatever(p_web)
cheers
Bruce