1) Please use code tags..go back and RE-READ the "BEfore you post" announcement if you have forgotten how.

2) The code does NOT look like (but it is hard to read without code tags!) C++/CLI [aka .NET] code. If it is NOT, then this is the WRONG forum, and need to ask a moderator to MOVE your thread (do NOT crate a duplicate, it simply creates more work for the moderator, who is already VOLUNTEERING (like the rest of us) his valuable time.