Use WinGraphviz in Visual C++ |
|||
| Requirement | How to do | |||
Requirement
How to do
* Step1 : install WinGraphviz first
* Step2 : Download the WinGraphviz.h File
* Step3 : Copy the following code and save it in test.cpp
#include <atlbase.h>
#include <iostream.h>
#include "WinGraphviz.h"
const IID IID_IDOT = {0xA1080582,0xD33F,0x486E,{0xBD,0x5F,0x58,0x19,0x89,0xA3,0xC7,0xE9}};
const CLSID CLSID_DOT = {0x55811839,0x47B0,0x4854,{0x81,0xB5,0x0A,0x00,0x31,0xB8,0xAC,0xEC}};
int main(int argc, char* argv[])
{
USES_CONVERSION;
HRESULT hr;
IDOT * pIDOT;
CComBSTR result;
hr = CoInitialize(NULL);
if (FAILED(hr)) {
cout << "CoInitialize Failed: " << hr << "\n\n";
exit(1);
}
else {
cout << "CoInitialize succeeded\n";
}
hr = CoCreateInstance(CLSID_DOT, NULL, CLSCTX_ALL,
IID_IDOT, reinterpret_cast
|
* Step3 : Complie and test it
Submit bug reports or suggestions for the WinGraphviz ood Tsen.