Esempio n. 1
0
//
//		public static void CreateDirectory(string path)
//		{
//			Win32.SECURITY_ATTRIBUTES sa = new SECURITY_ATTRIBUTES();
//			Win32.Kernel.CreateDirectory(setUnicodePath(path), ref sa);
//			int error = Win32.Kernel.GetLastError();
//			// Win32API: CreateDirectory
//		}

		public static bool CreateDirectory(string path)
		{
			if (path != null)
			{
				string[] args = path.Split(':');

				string[] dirs = args[1].Replace(":", "").Split('/');
				string newpath = args[0]+":";
				for(int i=1; i<dirs.Length; i++)
				{
					newpath = newpath +"/" + dirs[i];
					SECURITY_ATTRIBUTES sa = new SECURITY_ATTRIBUTES();
					Kernel.CreateDirectory(setUnicodePath(newpath), ref sa);
					Console.WriteLine(Kernel.GetLastError());
				}

				return true;
			}
			return false;
		}
Esempio n. 2
0
 public static extern int CreatePipe(int phReadPipe, int phWritePipe, ref SECURITY_ATTRIBUTES lpPipeAttributes, int nSize);
Esempio n. 3
0
 public static extern int CreateNamedPipe(string lpName, int dwOpenMode, int dwPipeMode, int nMaxInstances, int nOutBufferSize, int nInBufferSize, int nDefaultTimeOut, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
Esempio n. 4
0
 public static extern int CreateMutex(ref SECURITY_ATTRIBUTES lpMutexAttributes, int bInitialOwner, string lpName);
Esempio n. 5
0
 public static extern int CreateMailslot(string lpName, int nMaxMessageSize, int lReadTimeout, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
Esempio n. 6
0
 public static extern int CreateFileMapping(HANDLE hFile, ref SECURITY_ATTRIBUTES lpFileMappigAttributes, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, string lpName);
Esempio n. 7
0
		[DllImport("kernel32", CharSet = CharSet.Unicode, EntryPoint="CreateDirectoryW")] public static extern int CreateDirectory(string lpPathName, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
Esempio n. 8
0
 public static extern int CreateThread(ref SECURITY_ATTRIBUTES lpThreadAttributes, int dwStackSize, ref int lpStartAddress, IntPtr lpParameter, int dwCreationFlags, ref int lpThreadId);
Esempio n. 9
0
 public static extern int CreateDirectoryEx(string lpTemplateDirectory, string lpNewDirectory, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
Esempio n. 10
0
 public static extern int CreateDirectory(string lpPathName, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
Esempio n. 11
0
 public static extern int CreateConsoleScreenBuffer(int dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int dwFlags, IntPtr lpScreenBufferData);
Esempio n. 12
0
 public static extern int RegSaveKey(HANDLE hKey, string lpFile, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
Esempio n. 13
0
 public static extern int RegCreateKeyEx(HANDLE hKey, string lpSubKey, int Reserved, string lpClass, int dwOptions, int samDesired, ref SECURITY_ATTRIBUTES lpSecurityAttributes, ref int phkResult, ref int lpdwDisposition);
Esempio n. 14
0
		[DllImport("kernel32", CharSet = CharSet.Unicode)] public static extern int CreateFileMapping(HANDLE hFile, ref SECURITY_ATTRIBUTES lpFileMappigAttributes, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, string lpName);
Esempio n. 15
0
		[DllImport("kernel32", CharSet = CharSet.Unicode)] public static extern int CreateDirectoryEx(string lpTemplateDirectory, string lpNewDirectory, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
Esempio n. 16
0
 public static extern int CreateProcess(string lpApplicationName, string lpCommandLine, ref SECURITY_ATTRIBUTES lpProcessAttributes, ref SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, int dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDriectory, ref STARTUPINFO lpStartupInfo, ref PROCESS_INFORMATION lpProcessInformation);
Esempio n. 17
0
 public static extern int CreateSemaphore(ref SECURITY_ATTRIBUTES lpSemaphoreAttributes, int lInitialCount, int lMaximumCount, string lpName);
Esempio n. 18
0
 public static extern int CreateEvent(ref SECURITY_ATTRIBUTES lpEventAttributes, int bManualReset, int bInitialState, string lpName);
Esempio n. 19
0
 public static extern int CreateDesktop(string lpszDesktop, string lpszDevice, ref DEVMODE pDevmode, int dwFlags, int dwDesiredAccess, ref SECURITY_ATTRIBUTES lpsa);
Esempio n. 20
0
 public static extern int CreateFile(string lpFileName, int dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, HANDLE hTemplateFile);