Pls help, I'm stuck. NAS and C++

Hi there, I have to finish a small application programmed in c++ (ms visual c++ 6.0) which sends some xml documents to navision application server. I have imported the type libraries from the nscomcom2.dll and the socketbusadapter.dll. When I try to initialise the OutMsg with OutMsg = CC2.CreateOutMessage(Destination) and then try to access OutMsg (e.g. OutMessage.GetStream) the application always terminates with an instruction reference error. As I am not a c++ pro, I am afraid that I am doing something wrong when initializing the variables (create dispatch etc.). Can anybody send me a short example or a link of how to send a document (or a textstring) to nas using c++?