A Utility Plugin for DXStudio -- Section: DXStudio Goodies --
The MiKo Utility Plugin is a small helper plugin for DXStudio. It can be added to DXStudio documents and exposes some functions that might be useful (and are not yet in the core engine).
Plugin Functions
getHDDSerial()
Returns the system's HDD C:\ serial number (or 0 if not found), retrieved from kernel32.dll's 'GetVolumeInformation()'. This will return a unique serial that is assigned by windows upon FORMATTING of the respective partition. Read: The number will change on HDD reformat.
getShaderVer()
Returns the gfx card's shader version, as reported by DirectX's 'GetDeviceCaps()'. A string of format 'major_ver.minor_ver' is returned. On error, it is '0.0'.
getProcInfo()
Returns the computer's processor info, retrieved from Window's registry. A string of format 'VendorIdentifier * ProcessorIdentifier * ProcessorNameString'. On error, it is 'n/a * n/a * n/a'.
getVideoMem()
Returns an estimate of the amount of available texture memory in MB, retrieved from DirectX's 'GetAvailableTextureMem()'. The value is rounded to the nearest MB integer value. Returns 0 on error.
getTotalMem()
Returns the size of the computer's total physical memory in (and rounded to) Kilobytes (KB). Will return 0 on error.
getFreeMem()
Returns the size of the computer's free physical memory in (and rounded to) Kilobytes (KB). Will return 0 on error.
saveScrnShot(sFilePathName,sFiletype)
Saves a screenshot of the current front buffer to disk. Pass in complete path and filename (e.g., 'C:\screenshot.png') as sFilePathName. sFiletype is the format to be saved (string) with possible values 'bmp', 'png', 'hdr' (lower case). Will return FALSE on error (Note that the call might return TRUE and fail afterwards, as it is executed async to the JS call.
getWindowsVer()
Returns a string, identifying the Windows version running. Possible values are: 'Windows7/Server2008R2','WindowsVista/Server2008','WindowsServer2003','WindowsXP','Windows2000'. On error, it is 'n/a'.
getEthMAC()
Returns a string, identifying the MAC address of the first ethernet adapter being found by Windows. Format like '123:12:23:34...' (numbers given as decimals). On error, it is 'n/a'.
getGfxName()
Returns a string, describing the primary graphics device (graphics card) registered to the system. On error, it is 'n/a'.
Example Output (from the demo doc)
Downloads
| Description |
File |
Filedate |
Size |
Remarks |
| MiKo UtilPlugin |
UtilPlugin.dxeffect |
5/22/2010 |
58 KB |
The plugin (DXEffect) v.1.0.3 |
| UtilPlugin Demo Doc |
UtilPluginDemo.dxstudio |
5/22/2010 |
331 KB |
A demo doc, showing the usage of the different functions |
|