what does it return:
int rc = MessageBox(HWND_DESKTOP, L"License Failed", L"Get License", MB_YESNO);
Have you redefined MB_YESNO, IDYES or is MessageBox user func in your scope? (Don't do it!!!)
Read the
MessageBox documentation.
Write what was wrong.