Hello,
I have a couple of doubts and want to check if someone here can help me.
I was wandering if it is possible to use the same declaration of a function
in 32 bits and 64 bits even that the size of the parameter is variable. For
pointers I think I can just use pointers, but if it is an int, that will be
32 bits in a 32 bits platform and 64 bits in a 64 bits platform.
In the page I saw "Native long support (32- or 64-bit as appropriate) " but
not sure if it is this, or how to use this as couldn't find an example.
I also have been calling window api function and I found that I am not able
to get the last error code when a function fails , GetLastError() is always
returning 0. I am testing in Windows XP professional and sun java 1.5 .0_07.
At least it is happening for function CreateProcessA, I think I also got the
same behaviour with SetParent function. In VB and in the same happens when
you call this kind of function because the code internally might call some
other windows function that might set last error to 0, so they provide
LastDllError property in Err object to get the last error after calling a
native function, instead of GetLastError(). For .Net seem to be the same
(need to use SetLastError field in method signature and then use
Marshal.GetLastWin32Error ).Is it happening the same here? Is there any way
to get the last error?
Thanks in advance.
Regards,
Daniel