I do not know where you found that code but the official documentation is different:
The Invocation API[
^].
Also why do you write:
mbstowcs(t, "C:\\Program Files (x86)\\Java\\jdk-16.0.1\\jre\\bin\\server\\jvm.dll", 400);
jvm_dll = LoadLibrary(t);
instead of:
jvm_dll = LoadLibrary(L"C:\\Program Files (x86)\\Java\\jdk-16.0.1\\jre\\bin\\server\\jvm.dll");
But looking at the documentation on the above link you do not need
LoadLibrary
.