i need sample codes

i need a simple 2d plot in vc++.net and i must do it like that:
-write matlab m file
-convert it to a com object
-use the resulting classes in visual c++

i finished the first two steps but i cannot do the last step since i am not familiar with vc++ . can anyone give sample code?

this is the -m file

function TwoDPlot(x,y)
%x and y are vectors
plot(x,y)
xlabel('x');
ylabel('y');
[458 byte] By [alptek] at [2007-11-19 10:49:23]