Component Initialisation from VB changed to C++
The code you posted is managed C++, not native C++. Try asking you question here.