If your program is about to use a handle that could not be obtained by GetStdHandle (the return value was INVALID_HANDLE_VALUE or NULL) then yes, the program should exit or, at least not use such a...
You did not define them. You only declared them.
Now you have to define them. Something like:
NavMeshLoader::dtNavMeshQuery* m_navQuery = NULL;
NavMeshLoader::dtStatus m_pathFindStatus;
...and so...
Please, edit your post changing the wrong written code tags to the correct ones (just use [] instead of <>)
If you want to keep your main window responsible while sending e-mail and waiting for...
Is the handle of "the running target window process" you are using in SendMessage call a correct one?
Did you try to call IsWindow() API to ensure it is correct?