REI with VC++

Home Up Next

 

 

Accessing the REI with Visual C++

Below is a small example of how you can access the REI (Rose Extensibility Interface) using Microsoft Visual C++. The example is using the DTC (Direct To COM) feature of VC++.

// REI with 'Direct To COM' example

#include "stdafx.h"

#import "K:\Rose2000\rationalrose.tlb" no_namespace named_guids

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
CoInitialize(NULL);
{
IRoseApplicationPtr RoseApp;

RoseApp.CreateInstance(CLSID_RoseApplication);

_bstr_t url(L"http://www.rationalrose.com");
RoseApp->OpenURL(url);

}
CoUninitialize();
return 0;
}

This small application creates an instance of Rose and lets it open "The Unofficial Rose WebSite" in an internet browser.

Michael Moors.

 

All products mentioned are registered trademarks or trademarks of their respective companies.
Send mail to webmaster@rationalrose.com with questions or comments about this web site. 
Copyright © 1999-2000 Michael Moors
Last modified: May 12, 2000