XfsAPI { public WFSVersion wfsStartUp(final DWORD versionsRequired) throws IllegalArgumentException, WFSStartUpException { final String method = "wfsStartUp(DWORD)"; if (LOG.isDebugEnabled()) { LOG.debug(method, "versionsRequired=" + versionsRequired); } if (versionsRequired == null) { throw new IllegalArgumentException("versionsRequired cannot be null"); } final WFSVersion wfsVersion = new WFSVersion(); wfsVersion.allocate(); final int errorCode = wfsStartUp0(versionsRequired, wfsVersion); if (LOG.isDebugEnabled()) { LOG.debug(method, "errorCode=" + errorCode); } try { XfsException.throwFor(errorCode); } catch (XfsException e) { throw new WFSStartUpException(wfsVersion, e); } return wfsVersion; } private  XfsAPI(); final static XfsAPI getInstance(); void wfsCancelAsyncRequest(final HSERVICE hService, final RequestId requestId); WFSVersion wfsStartUp(final DWORD versionsRequired); void wfsCleanUp(); HAPP wfsCreateAppHandle(); RequestId wfsAsyncDeregister(final HSERVICE hService, final DWORD dwEventClass, final HWND hWndReg,
			final HWND hWnd); void wfsDestroyAppHandle(final HAPP hApp); RequestId wfsAsyncExecute(final HSERVICE hService, final DWORD dwCommand, final Type lpCmdData,
			final DWORD dwTimeOut, final HWND hWnd); void wfsFreeResult(final WFSResult wfsResult); WFSResult wfsGetInfo(final HSERVICE hService, final DWORD category, final Type queryDetails,
			final DWORD timeOut); RequestId wfsAsyncGetInfo(final HSERVICE hService, final DWORD dwCategory, final Type queryDetails,
			final DWORD dwTimeOut, final HWND hWnd); RequestId wfsAsyncOpen(final CharArray logicalName, final HAPP hApp, final CHAR lpszAppID,
			final DWORD dwTraceLevel, final DWORD dwTimeOut, final HSERVICE lphService, final HWND hWnd,
			final DWORD dwSrvcVersionsRequired, final WFSVersion lpSrvcVersion, final WFSVersion lpSPIVersion); RequestId wfsAsyncRegister(final HSERVICE hService, final DWORD dwEventClass, final HWND hWndReg,
			final HWND hWnd); RequestId wfsAsyncClose(final HSERVICE lphService, final HWND hWnd); static final long WFS_INDEFINITE_WAIT; }
@Test public void wfsStartUp() throws Exception { final XfsAPI xfsAPI = XfsAPI.getInstance(); final XFSVersionDWORD versionsRequired = new XFSVersionDWORD("2.00", "3.20"); try { final WFSVersion version = xfsAPI.wfsStartUp(versionsRequired); System.out.println(version); } catch (XfsException e) { e.printStackTrace(); throw e; } xfsAPI.wfsCleanUp(); }