2002-08-28 Dick Porter <dick@ximian.com>
[mono.git] / mono / os / win32 / util.c
1 /*
2  * util.c: Simple runtime tools for the Win32 platform
3  *
4  * Author:
5  *   Miguel de Icaza
6  *
7  * (C) 2002 Ximian, Inc. (http://www.ximian.com)
8  */
9 #include <config.h>
10 #include <windows.h>
11 #include <mono/metadata/metadata.h>
12 #include <mono/os/util.h>
13
14 /*
15  * mono_set_rootdir:
16  *
17  * Informs the runtime of the root directory for the Mono installation,
18  * the vm_file
19  */
20 void
21 mono_set_rootdir (void)
22 {
23         char moddir[MAXPATHLEN], *dir, *root;
24
25         GetModuleFileName (NULL, moddir, sizeof(moddir));
26         dir = g_path_get_dirname (moddir);
27         root = g_strconcat (dir, "/../lib", NULL);
28
29         mono_assembly_setrootdir (root);
30         g_free (root);
31         g_free (dir);
32 }
33
34