示例#1
0
 public void testSHGetDesktopFolder() {
   PointerByReference ppshf = new PointerByReference();
   WinNT.HRESULT hr = Shell32.INSTANCE.SHGetDesktopFolder(ppshf);
   assertTrue(W32Errors.SUCCEEDED(hr.intValue()));
   assertTrue(ppshf.getValue() != null);
   // should release the interface, but we need Com4JNA to do that.
 }
示例#2
0
 /**
  * New Win32 exception from an error code, usually obtained from GetLastError.
  *
  * @param code Error code.
  */
 public Win32Exception(int code) {
   this(W32Errors.HRESULT_FROM_WIN32(code));
 }