Archive for 5月 3rd, 2013
-
Hello, Win32 API(Quercus) World!
Posted on 5月 3rd, 2013 by cx20
Win32 API(Quercus)
Win32 API は、Windows の機能にアクセスする為の API(Application Programming Interface)である。
以下は Quercus にて SWT の非公開 API を使用した Win32 API 呼出しの例となっている。ソースコード
<?php import org.eclipse.swt.internal.win32.OS; import org.eclipse.swt.internal.win32.TCHAR; $lpText = new TCHAR(0, "Hello, Win32 API World!", True); $lpCaption = new TCHAR(0, "Hello, World", True); OS::MessageBox(0, $lpText, $lpCaption, OS::MB_OK ); ?>
実行方法
C:¥> java -cp org.eclipse.swt.win32.win32.x86_3.6.1.v3655c.jar;resin.jar;. com.caucho.quercus.CliQuercus hello.php
実行結果
--------------------------- Hello, World! --------------------------- Hello, Win32 API World! --------------------------- OK ---------------------------