By default, the Microsoft VM assumes that the ANSI version of the MessageBox function is the one that is needed. If you import the MessageBox function using @dll.import (without a modifier) as follows:
/** @dll.import("USER32") */
static native int MessageBox(int hwnd, String text,
String title, int style);
The Microsoft VM will go through the following steps: