The StreetDeck development enviornment will let you load any standard COM object into it using VB Scripts CreateObject function.
Alternatively, you may prefer to create a COM addin that StreetDeck can use directly and does not require you to use the scripting engine at all. See
Building a .Net Addin for StreetDeck for more information.
This tutorial will show you how to use Microsoft Visual Studio 2003 to create a COM object that can be loaded by the StreetDeck scripting engine.
Once created and registered, you can simply load the COM object in StreetDeck by calling CreateObject with the registered name of the object you created and immediatly call methods in it.
For this tutorial, we will be writing the object in C++ using ATL. You can write this object using a variety of different methods, but for the purposes of this tutorial, we will only be using ATL which greatly simplfies reference counting and other mundane tasks required without it.
Creating a New Project
1. Create a new ATL Project in Visual Studio
2. Specify the application settings for the project
3. Switch to the class view, then right click on "SDCOMObject" and select
Add->Class, then select ATL COM+ 1.0 Component.
4. Call the object "ExampleObject"
5. Click finish and the class will be generate for you.
6. Make sure you can see the class view then, then...
- Right click on your IExampleObject interface.
- Choose Add->Add Method...
- Call the method "MsgBox"
- Add a BSTR input parameter called "Description"
- Add a second BSTR input parameter called "Caption"
- Click Finish to have the wizard generate the function stub for you
7. Implement the MsgBox method in
ExampleObject.cpp by adding the following code which will show a windows message box (BTW, this is a bad example since you should NEVER show a windows dialog in a real project made for use with StreetDeck

Its only being used here for ease of understanding)
Code:
STDMETHODIMP CExampleObject::MsgBox(BSTR Description, BSTR Caption)
{
MessageBox(NULL, CString(Description), CString(Caption), MB_OK);
return S_OK;
}
8. Notice the use of CString in the previous code, to use this class, we should include
#include <atlstr.h> in our
stdafx.h file.
9. Your object is now complete and ready for testing, compile the project.
10. Before starting up StreetDeck, we should first get the ProgId of our function that will be used in the CreateObject function called from the development enviornment. To find this id, look in the
ExampleObject.rgs file for a line called VersionIndependantProgID, it should look something like this:
Code:
VersionIndependentProgID = s 'SDCOMObject.ExampleObject'
SDCOMObject.ExampleObject is the ProgId to use in the call to CreateObject