Community
Participate
Working Groups
With build 2020 of SWT, the SWT.getPlatform() method returns "unknown" on PocketPC, although the result should be "win32". The snippet below demonstrates this behaviour. On Windows NT it correctly returns "win32". import org.eclipse.swt.SWT; public class GetPlatformTest { public static void main(String[] args) { /* * SWT.getPlatform() should return Win32. * In this case it will return "unknown", */ System.out.println(SWT.getPlatform()); System.out.println(System.getProperty("os.name")); } }
Fix will be available in incoming build 2021. You'll need the new dll. Function will return "win32" as on Windows desktops Note: aside of this bug, we may want to discuss using SWT.getPlatform() to return more info (like: win32,ppc, or win32,ppc2002 or something like this?) Internal details: Callback.h: constant WIN32 not defined on WinCE, use _WIN32_WCE instead. Code for callbacks was working by 'accident' on default values. Fixed to use regular windows ones even if they end up being equivalent. LRESULT is defined as a LONG aka an int as is the default value. CALLBACK was defined to default "" instead of __stdcall which happens to be defined as the default cdecl on Windows CE anyway (see windef.h for PPC).