0

I have an issue that ive been batteling with for a day or so now and im wondering if anyone might be able to help:

Im am trying to use the ActiveMQ-NMS to dequeue messages via COM in a C++ application. I have managed to build the source and override the 'ComVisible' flag in order to export all the types in the assembly via RegAsm (i did receive warnings about this and the 'Atomic' class but i dont think this is the issue i am facing at the moment).

As part of the RegAsm i have generated a .tlb file that i use in a #import in the C++ client. However, i then receive various errors whilst compiling. Things like:

error C2146: syntax error : missing ';' before identifier 'Keys'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 

Essentially, it looks like things like the ICollectionPtr (and various others) are unavailable. Can anyone help me as to resolving these issues? Essentially im looking to register the .net ActiveMQ-NMS assembly as a COM compliant component and then use it from C++...

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
Ian Harrigan
  • 836
  • 6
  • 14

1 Answers1

1

Unless there's some other reason to use COM and NMS, why not just use the ActiveMQ-CPP client? Then you can avoid all the complexity of COM. ActiveMQ-CPP is located here:

Tim Bish
  • 17,475
  • 4
  • 32
  • 42
  • Thanks for the response. Certainly, using ActiveMQ-CPP makes alot more sense. However, i need to use it in a client that is build on vs2003 and, as far as i could tell, it just cant be used as it uses language features that are not available. Suffice to say, i build activemq-cpp using vs2008 but the libraries are incompatible with the vs2003 client. An interim solution is to have a COM EXE (build via 2008) that uses activemq-cpp and exposes a COM object that can be used by all clients. This does add a layer of complexity however. – Ian Harrigan Apr 27 '11 at 17:12