+ GetModuleFileNameA(NULL, base_dir, sizeof(base_dir)); + + slash = strrchr(base_dir, '\'); + if (slash) + *slash = 0; + + TRACE("setting base_dir: %s, config_path: %s\n", base_dir, config_pathA); + mono_domain_set_config(This->default_domain, base_dir, config_pathA);
Mono embedding api functions expect utf8-encoded paths. We need to use the W function and utf8-encode using WtoA.