Originally posted by mlewis
So there is no user logged on when you call it?

try this: use getlasterror (an API) and see what it returns, then look it up on MSDN
hmmm, 0. a very common error