Posts Tagged ‘undocumented’

WHS DevKit 2 updated

August 26, 2010

Version 1.1 of the WHS DevKit 2 has been published.
This Kit is an all-in-one package on how to create/build/install and addin for Vail, so if you want to have a go at it take the kit and have fun!

This new version has been updated to support the latest version of Windows Home Server: build 7659.
It contains a lot more information with regards to the first version of the kit; on the various aspects of developing an addin for Vail and now also has a section on how to build an installer too.

You can find it here.
The Vail SDK can be found here.

If you have comments, remarks, ideas, tips,¬†additions,… don’t hesitate to contact me at contact (at) asoft-ware.com.

Advertisements

Undocumented WHS Classes: NetworkUtils

October 8, 2009

Another small class, in the series of undocumented API’s in Windows Home Server.

This new article describes the undocumented functions in the NetworkUtils class which is located in WHSCommon.dll.
This class contains 2 handy functions to get IP/Mac address of the server & the IP of the router.

void GetRouterIPAndServerMAC(out string ip, out string mac)
Get the IP address of the router and mac address of the server.

Sample code
string ip, mac;
NetworkUtils.GetRouterIPAndServerMAC(out ip, out mac);

Sample output
IP: 172.19.3.1
MAC:00-19-DB-7B-6D-35

string GetServerIP()
Get the IP address of the server.
Sample code
string serverIp = NetworkUtils.GetServerIP();

Sample output
IP: 172.19.3.10

So as you see, two very easy to use functions, that a very handy!
You can follow ASoft @Twitter: http://twitter.com/asoftware

Have fun!

Undocumented WHS classes: QShutdown / ShutdownDialog

September 7, 2009

A new article in the series of undocumented API’s in Windows Home Server is here.

This new article describes the undocumented functions in the QShutdown & ShutdownDialog class which is located in HomeServerControls.dll.

This class is a very tiny and simple one that can be used to shut down / reboot / log off the server.
It is also responsible for showing the shutdown dialog when shutting down the server via the settings dialog in the Windows Home Server console itself.

You can find it here.

You can follow ASoft @Twitter: http://twitter.com/asoftware

Have fun!

Undocumented WHS classes: MiscUtils

July 22, 2009

A new article in the series of undocumented API’s in Windows Home Server.

This new article describes the undocumented functions in the MiscUtils class which is located in HomeServerControls.dll.
This class is a handy little helper.
You can find it here.

The following functions are explained:
string DropSecondsFromTimeFormat(string timeFormat)
string FormatDescriptionToFixedWidth(string description, int maxChars)
uint GetPercentage(long value, long total)
bool IsCorrectLogonName(string name)
bool IsLetterOrDigit(string name)
bool IsValidHelpFile(string helpFileName)
string LastPieceOfThePathName(string name)
string LegibleDateTime(DateTime dateTime)
string LegibleDuration(TimeSpan duration)
string LegibleExcludedFolderName(string name)
string LegibleFolderNameSize(string name, long size)
string LegibleLocalDateTime(DateTime dateTime)
string LegibleSize(long lSizeInBytes)
string LegibleSize(long lSizeInBytes, int decimalPlaces)
string LegibleSize(long lSizeInBytes, int decimalPlaces, int maxLength)
string LegibleVolumeName(string volumeName, string mountPoint)
DateTime LocalTime(DateTime timeUTC)
string NameFromFriendlyPieces(string volumeFriendlyName, string folderName)
string PathNameWithoutLastPiece(string name)
bool SafeCharacters(string name)
bool SafeCharactersSafeEnding(string name)
bool SafeNameCharacters(string name)
void SetEnabled(Control control, bool enabled)
void SetImage(PictureBox control, System.Drawing.Image image)
void SetText(Control control, string text)
void SetValue(ProgressBar control, int value)
void SetVisible(Control control, bool visible)
void AddLineToTextbox(TextBox control, string line)
string StripDriveLetter(string s)
string StripMnemonicChar(string text)