是否有 C# 的IntPtr.ZERO的 Java 等价物?如果没有,是否有任何方法可以在传递给 JNA 库接口调用时实现相同的行为?
我使用这个片段来表示IntPtr.ZERO:
private static final IntByReference ZERO = new IntByReference(0);
传递到此Kernel32 JNA 接口时,我会实现相同的行为吗?:
boolean CreateProcess(String lpApplicationName, String commandLine,
int processAttributes, int threadAttributes,
boolean inheritHandles, int creationFlags,
IntByReference environment, String currentDirectory,
STARTUPINFO startupInfo, PROCESS_INFORMATION processInformation);
如此:
CreateProcess(target, null, 0, 0, false, 4, ZERO, null, sInfo, pInfo)