Check out the WorkSite SDK documentation on this. When you install the SDK it will also come with C#, VB.NET, VB6, C++ sample code
The SDK usually installs to %ProgramFiles%\Interwoven\Worksite\iToolkit. Within this directory the iHelp subfolder contains relevant documentation, and the iCommands subfolder contains the sample code