public WinProxyConfig readWindowsProxyConfig() { // Retrieve the Win proxy configuration. WinHttpProxyInfo winHttpProxyInfo = new WinHttpProxyInfo(); boolean result = WinHttp.INSTANCE.WinHttpGetDefaultProxyConfiguration(winHttpProxyInfo); if (!result) { return null; } // Create WinProxyConfig instance return new WinProxyConfig( winHttpProxyInfo.dwAccessType != null ? winHttpProxyInfo.dwAccessType.intValue() : null, winHttpProxyInfo.lpszProxy != null ? winHttpProxyInfo.lpszProxy.getValue() : null, winHttpProxyInfo.lpszProxyBypass != null ? winHttpProxyInfo.lpszProxyBypass.getValue() : null); }
/** * Return the path designated for temporary files. * @return * Path. */ public static String getTempPath() { DWORD nBufferLength = new DWORD(WinDef.MAX_PATH); char[] buffer = new char[nBufferLength.intValue()]; if (Kernel32.INSTANCE.GetTempPath(nBufferLength, buffer).intValue() == 0) { throw new Win32Exception(Kernel32.INSTANCE.GetLastError()); } return Native.toString(buffer); }
/** * Record length, with data. * * @return Number of bytes in the record including data. */ public int getLength() { return _record.Length.intValue(); }
/** * Record number of the record. This value can be used with the * EVENTLOG_SEEK_READ flag in the ReadEventLog function to begin reading * at a specified record. * * @return Integer. */ public int getRecordNumber() { return _record.RecordNumber.intValue(); }
/** * Event Id. * * @return Integer. */ public int getEventId() { return _record.EventID.intValue(); }
/** * @return The build number of the operating system. */ public int getBuildNumber() { return dwBuildNumber.intValue(); }
/** * @return The major version number of the operating system. */ public int getMajor() { return dwMajorVersion.intValue(); }
public int getProductVersionBuild() { return dwProductVersionLS.intValue() & 0xffff; } }
/** * Return the path designated for temporary files. * * @return Path. */ public static String getTempPath() { DWORD nBufferLength = new DWORD(WinDef.MAX_PATH); char[] buffer = new char[nBufferLength.intValue()]; if (Kernel32.INSTANCE.GetTempPath(nBufferLength, buffer).intValue() == 0) { throw new Win32Exception(Kernel32.INSTANCE.GetLastError()); } return Native.toString(buffer); }
public int getProductVersionRevision() { return dwProductVersionLS.intValue() >>> 16; }
public int getFileVersionMajor() { return dwFileVersionMS.intValue() >>> 16; }
/** * Record length, with data. * * @return Number of bytes in the record including data. */ public int getLength() { return _record.Length.intValue(); }
/** * Sets the value. * * @param value the new value */ public void setValue(DWORD value) { getPointer().setInt(0, value.intValue()); }
/** * Event Id. * * @return Integer. */ public int getEventId() { return _record.EventID.intValue(); }
/** * @return The operating system platform. This member can be VER_PLATFORM_WIN32_NT. */ public int getPlatformId() { return dwPlatformId.intValue(); }
public void initialize(int afCmd) throws DdemlException { WinDef.DWORDByReference pidInst = new WinDef.DWORDByReference(); Integer result = Ddeml.INSTANCE.DdeInitialize(pidInst, ddeAdapter, afCmd, 0); if(result != Ddeml.DMLERR_NO_ERROR) { throw DdemlException.create(result); } idInst = pidInst.getValue().intValue(); if(ddeAdapter instanceof DdeAdapter) { ddeAdapter.setInstanceIdentifier(idInst); } }
/** * Status code for the facility, part of the Event ID. * * @return Status code. */ public int getStatusCode() { return _record.EventID.intValue() & 0xFFFF; }
/** * @return The minor version number of the operating system. */ public int getMinor() { return dwMinorVersion.intValue(); }