Obvious thing is -- the values you need to pass NULL such as "UserName" or "pReserved" must be passed as NULL not as an empty string. Hence you need to define:
ByVal UserName As Long, .... ByVal pReserved As Long
and when calling pass 0.
I hope there are no other problems. Does not seem so on the first glance.