How to compile it successfully in VC++6.0?

Hi, all:

I have found that there exists a sample code for VC++ (page 2-16) on training
slides named “Tamino DOM API for ActiveX”. I write down the same code and try
to compile it in VC++ 6.0, however, it is failed. The main problem seems to
the compiler cannot parse the following code


Could you give me some idea ?

Thank you very much


Part of the sample code is as following:

#include “atlbase.h”
#import “TaminoX.ocx”
#import “msxml3.dll”

using namespace MSXML2;
long rc,number=0;
VARIANT message;

IXMLDOMDocumentPtr doc;
IXMLDOMNodeListPtr nodeList;
IXMLDOMNodePtr item,node1,node2;

void read()
HRESULT hr=CoInitialize(0);
HRESULT hr=taminoX.CoCreateInstance(_uuidof(TaminoX));
} catch (_com_error e) { (void) fprintf(stderr,“com_error exception: %s\n”, e.ErrorMessage());}


The problem is that the imported TaminoX.ocx uses the namespace “TAMINOXLib”.

Try adding

using namespace TAMINOXLib;

(right after ‘using namespace MSXML2;’)

Hope this helps…

Puny Sen