equal
deleted
inserted
replaced
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 * or visit www.oracle.com if you need additional information or have any |
22 * or visit www.oracle.com if you need additional information or have any |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
|
26 #define _JNI_IMPLEMENTATION_ |
|
27 |
26 #include "awt.h" |
28 #include "awt.h" |
27 #include <signal.h> |
29 #include <signal.h> |
28 #include <windowsx.h> |
30 #include <windowsx.h> |
29 #include <process.h> |
31 #include <process.h> |
30 |
|
31 //#if defined(_DEBUG) && defined(_MSC_VER) && _MSC_VER >= 1000 |
|
32 //#include <crtdbg.h> |
|
33 //#endif |
|
34 |
|
35 #define _JNI_IMPLEMENTATION_ |
|
36 |
32 |
37 #include "awt_DrawingSurface.h" |
33 #include "awt_DrawingSurface.h" |
38 #include "awt_AWTEvent.h" |
34 #include "awt_AWTEvent.h" |
39 #include "awt_Component.h" |
35 #include "awt_Component.h" |
40 #include "awt_Canvas.h" |
36 #include "awt_Canvas.h" |
2581 TRY; |
2577 TRY; |
2582 |
2578 |
2583 WCHAR szVer[128]; |
2579 WCHAR szVer[128]; |
2584 |
2580 |
2585 DWORD version = ::GetVersion(); |
2581 DWORD version = ::GetVersion(); |
2586 swprintf(szVer, L"0x%x = %ld", version, version); |
2582 swprintf(szVer, 128, L"0x%x = %ld", version, version); |
2587 int l = lstrlen(szVer); |
2583 int l = lstrlen(szVer); |
2588 |
2584 |
2589 if (IS_WIN2000) { |
2585 if (IS_WIN2000) { |
2590 if (IS_WINXP) { |
2586 if (IS_WINXP) { |
2591 if (IS_WINVISTA) { |
2587 if (IS_WINVISTA) { |
2592 swprintf(szVer + l, L" (Windows Vista)"); |
2588 swprintf(szVer + l, 128, L" (Windows Vista)"); |
2593 } else { |
2589 } else { |
2594 swprintf(szVer + l, L" (Windows XP)"); |
2590 swprintf(szVer + l, 128, L" (Windows XP)"); |
2595 } |
2591 } |
2596 } else { |
2592 } else { |
2597 swprintf(szVer + l, L" (Windows 2000)"); |
2593 swprintf(szVer + l, 128, L" (Windows 2000)"); |
2598 } |
2594 } |
2599 } else { |
2595 } else { |
2600 swprintf(szVer + l, L" (Unknown)"); |
2596 swprintf(szVer + l, 128, L" (Unknown)"); |
2601 } |
2597 } |
2602 |
2598 |
2603 return JNU_NewStringPlatform(env, szVer); |
2599 return JNU_NewStringPlatform(env, szVer); |
2604 |
2600 |
2605 CATCH_BAD_ALLOC_RET(NULL); |
2601 CATCH_BAD_ALLOC_RET(NULL); |