Wrong forum.

Please post your question in the Managed C++ forum, as your code is not traditional C++.

Regards,

Paul McKenzie