How to keep dot string and png picture in memory?

Hi All:

I am developing a program with C++ and MFC on Windows 7.
In my program, there is a graph data structure, and I want to use graphviz render these data into a png picture.
One way is using dot.exe. But in this way I should create a process for dot.exe with some argument, and then dot.exe will

read a dot file, write a png file. I think this may slow.
Another way which is faster is keeping dot string and png pitcure all in memory. In this way I should use gv library. But I

can not find any example codes to help me.
I have read codes of dot.exe, but its codes still call some gv function with argc and argv, and read dot from file on disk.
Is there any example can show me the way, that keep dot string and png picture in memory, then copy png memory to a gdi+

image object?

Help me!

Help me! Please!

Recent comments