***VERY*** evil >:-D
It is :-D
Is int the same size as pointer on your system? On windows in particular int can be 32 bit and pointer 64 bit.
With both ways (int, long) I can't achieve result. Seems that this is not actual doc pointer or something. Without native binding can't imagine how to do that.
-- Best regards, Pavel Roschin aka RPG