N
Nikolay Petrov
Can some please make this C# code to VB? Thanks.
[DllImport("msvcrt.dll", SetLastError=true)]
static extern int _mkdir(string path);
//this function should provide safe substitude for
Directory.CreateDirectory()
static DirectoryInfo CreateDirectory(string path)
{
int returnCode = _mkdir(path);
if (returnCode!=0)
{
throw new ApplicationException("Error calling [msvcrt.dll]:_wmkdir(" +
path + "), error code: " + returnCode.ToString());
}
return new DirectoryInfo(path);
}
[DllImport("msvcrt.dll", SetLastError=true)]
static extern int _mkdir(string path);
//this function should provide safe substitude for
Directory.CreateDirectory()
static DirectoryInfo CreateDirectory(string path)
{
int returnCode = _mkdir(path);
if (returnCode!=0)
{
throw new ApplicationException("Error calling [msvcrt.dll]:_wmkdir(" +
path + "), error code: " + returnCode.ToString());
}
return new DirectoryInfo(path);
}