擴展SWT功能,實現了Windows下注冊表,磁盤,CPU,內存,目錄訪問,網絡,關機,系統特性等常用API功能?,F在可以通過CVS進行訪問該項目,直接下載:http://m.tkk7.com/Files/cnfree/swt-extension.zip
SWT Extension under Windows OS can be checked out through CVS now!?
User can access it from:
?
cvs -z3 -d:pserver anonymous@feeling.cvs.sourceforge.net:/cvsroot/feeling co -P org.eclipse.swt.extension ?
?
Add native method:?
public
?
static
?
final
?
native
?
boolean
?ShowCursor(
boolean
?bShow);
public
?
static
?
final
?
native
?
void
?GetDiskFreeSpace(String?drive,?DISKFREESPACE?diskFreeSpace);
public
?
static
?
final
?
native
?
void
?GetSystemInfo(SYSTEM_INFO?systemInfo);
public
?
static
?
final
?
native
?
void
?GlobalMemoryStatus(MEMORYSTATUS?memoryStatus);
public
?
static
?
final
?
native
?
int
?GetDriveType(String?drive);
public
?
static
?
final
?
native
?String[]?GetLogicalDrives();
public
?
static
?
final
?
native
?String?GetVolumeLabel(String?drive);
public
?
static
?
final
?
native
?
boolean
?SetVolumeLabel(String?drive,?String?label);
public
?
static
?
final
?
native
?String?GetCurrentDirectory();
public
?
static
?
final
?
native
?
boolean
?SetCurrentDirectory(String?directory);
public
?
static
?
final
?
native
?
boolean
?RegistryKeyIteratorHasNext(KeyIterator?iterator);
public
?
static
?
final
?
native
?
void
?DeleteRegistryKey(RegistryKey?key);
public
?
static
?
final
?
native
?
boolean
?RegistryKeyHasSubKeys(RegistryKey?key);
public
?
static
?
final
?
native
?
boolean
?RegistryKeyHasValue(RegistryKey?key,?String?name);
public
?
static
?
final
?
native
?String?RegistryKeyValueIteratorGetNext(ValueIterator?iterator);
public
?
static
?
final
?
native
?
boolean
?RegistryKeyHasValues(RegistryKey?key);
public
?
static
?
final
?
native
?RegistryValue?RegistryKeyGetValue(RegistryKey?key,?String?name);
public
?
static
?
final
?
native
?
void
?RegistryKeySetValue(RegistryKey?key,?RegistryValue?value);
public
?
static
?
final
?
native
?
void
?RegistryKeyDeleteValue(RegistryKey?key,?String?name);
public
?
static
?
final
?
native
?String?RegistryKeyIteratorGetNext(KeyIterator?iterator);
public
?
static
?
final
?
native
?
boolean
?ExistsRegistryKey(RegistryKey?key);
public
?
static
?
final
?
native
?
void
?CreateRegistryKey(RegistryKey?key);
public
?
static
?
final
?
native
?
boolean
?RegistryKeyValueIteratorHasNext(ValueIterator?iterator);
public
?
static
?
final
?
native
?
int
?CreateShortCut(String?sourceFile,?String?linkFile,String?linkDescriptor);
public
?
static
?
final
?
native
?
int
?SHFileOperationA(SHFILEOPSTRUCT?shFileOpStruct);
public
?
static
?
final
?
native
?
int
?SHFileOperationW(SHFILEOPSTRUCT?shFileOpStruct);
public
?
static
?
final
?
native
?
boolean
?FlashWindow(
int
?hwnd,?
boolean
?bInvert);
public
?
static
?
final
?
native
?
boolean
?SetLayeredWindowAttributes(
int
?hwnd,?
int
?color,?
byte
?alpha,?
int
?type);
public
?
static
?
final
?
native
?String?GetSystemDirectory();
public
?
static
?
final
?
native
?String?GetWindowsDirectory();
public
?
static
?
final
?
native
?String?GetTempPath();
public
?
static
?
final
?
native
?String?GetLongPathName(String?shortPathName);
public
?
static
?
final
?
native
?
boolean
?SetWallPaper(
char
[]?picturePath,
int
?style);
public
?
static
?
final
?
native
?
int
?Ping(?String?host?,?
int
?dateSize?);
public
?
static
?
final
?
native
?
int
[]?GetMACID(?);
public
?
static
?
final
?
native
?
int
[]?GetMACAddress(?
int
?MACID);
public
?
static
?
final
?
native
?
boolean
?Reboot(
boolean
?force);
public
?
static
?
final
?
native
?
boolean
?Shutdown(
boolean
?force);
public
?
static
?
final
?
native
?
boolean
?Logoff(
boolean
?force);
public
?
static
?
final
?
native
?
boolean
?LockWorkStation();
public
?
static
?
final
?
native
?
boolean
?SuspendWorkstation(
boolean
?suspend,
boolean
?force);
public
?
static
?
final
?
native
?
boolean
?InitiateShutdownA(
byte
[]?info,
int
?time,?
boolean
?force?,
boolean
?reboot);
public
?
static
?
final
?
native
?
boolean
?InitiateShutdownW(
char
[]?info,
int
?time,?
boolean
?force?,
boolean
?reboot);
snapshot: