}
else
{
- StringCchCopyA(config_path, ARRAYSIZE(config_path), "C:\\ReactOS\\system32\\drivers\\etc\\ms-nfs41-idmap.conf");
+ status = GetLastError();
+ eprintf("GetSystemDirectoryA failed with %ld\n", GetLastError());
+ goto out;
}
#endif
}
else
{
- StringCchCopyA(config_path, ARRAYSIZE(config_path), "C:\\ReactOS\\system32\\drivers\\etc\\netconfig");
+ eprintf("GetSystemDirectoryA failed with error %ld\n", GetLastError());
+ return FALSE;
}
fd = fopen(config_path, "r");
}
else
{
- StringCchCopyA(cmd_path, ARRAYSIZE(cmd_path), "C:\\ReactOS\\system32\\cmd.exe");
+ ErrorExit("GetSystemDirectoryA failed\n");
}
}
return TRUE;
}
+#ifdef __REACTOS__
+char NETCONFIG[MAX_PATH] = "";
+#endif
BOOL WINAPI DllMain/*tirpc_main*/(HINSTANCE hinstDLL, // DLL module handle
DWORD fdwReason, // reason called
LPVOID lpvReserved) // reserved
// The DLL is loading due to process
// initialization or a call to LoadLibrary.
case DLL_PROCESS_ATTACH:
+#ifdef __REACTOS__
+ if (!GetSystemDirectoryA(NETCONFIG, ARRAYSIZE(NETCONFIG)))
+ return FALSE;
+
+ lstrcatA(NETCONFIG, "\\drivers\\etc\\netconfig");
+#endif
// Initialize socket library
if (winsock_init() == FALSE)
//#include <features.h>
+#ifdef __REACTOS__
+ #undef NETCONFIG
+ extern char NETCONFIG[];
+#else
// XXX Should be in, or come from, the registry!!!
#define NETCONFIG "C:\\ReactOS\\System32\\drivers\\etc\\netconfig"
+#endif
#define NETPATH "NETPATH"
struct netconfig {
rem []==[Config area]==[]
set MANED=edit
set MANMORE=cat
-set MAN=c:\ReactOS\man
+set MAN=%WINDIR%\man
rem []==[End of config area]==[]
goto chk_param