summaryrefslogtreecommitdiffstats
path: root/win/tclWinPipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinPipe.c')
-rw-r--r--win/tclWinPipe.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index a04d4e7..75f5034 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -466,14 +466,14 @@ TempFileName(
* gets stored. */
{
const WCHAR *prefix = L"TCL";
- if (GetTempPath(MAX_PATH, name) != 0) {
- if (GetTempFileName(name, prefix, 0, name) != 0) {
+ if (GetTempPathW(MAX_PATH, name) != 0) {
+ if (GetTempFileNameW(name, prefix, 0, name) != 0) {
return 1;
}
}
name[0] = '.';
name[1] = '\0';
- return GetTempFileName(name, prefix, 0, name);
+ return GetTempFileNameW(name, prefix, 0, name);
}
/*
@@ -586,7 +586,7 @@ TclpOpenFile(
flags = 0;
if (!(mode & O_CREAT)) {
- flags = GetFileAttributes(nativePath);
+ flags = GetFileAttributesW(nativePath);
if (flags == 0xFFFFFFFF) {
flags = 0;
}
@@ -602,7 +602,7 @@ TclpOpenFile(
* Now we get to create the file.
*/
- handle = CreateFile(nativePath, accessMode, shareMode,
+ handle = CreateFileW(nativePath, accessMode, shareMode,
NULL, createMode, flags, NULL);
Tcl_DStringFree(&ds);
@@ -659,7 +659,7 @@ TclpCreateTempFile(
return NULL;
}
- handle = CreateFile(name,
+ handle = CreateFileW(name,
GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_DELETE_ON_CLOSE, NULL);
if (handle == INVALID_HANDLE_VALUE) {
@@ -721,7 +721,7 @@ TclpCreateTempFile(
TclWinConvertError(GetLastError());
CloseHandle(handle);
- DeleteFile(name);
+ DeleteFileW(name);
return NULL;
}
@@ -937,7 +937,7 @@ TclpCreateProcess(
{
int result, applType, createFlags;
Tcl_DString cmdLine; /* Complete command line (WCHAR). */
- STARTUPINFO startInfo;
+ STARTUPINFOW startInfo;
PROCESS_INFORMATION procInfo;
SECURITY_ATTRIBUTES secAtts;
HANDLE hProcess, h, inputHandle, outputHandle, errorHandle;
@@ -1048,7 +1048,7 @@ TclpCreateProcess(
* sink.
*/
- startInfo.hStdOutput = CreateFile(L"NUL:", GENERIC_WRITE, 0,
+ startInfo.hStdOutput = CreateFileW(L"NUL:", GENERIC_WRITE, 0,
&secAtts, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
} else {
DuplicateHandle(hProcess, outputHandle, hProcess,
@@ -1068,7 +1068,7 @@ TclpCreateProcess(
* sink.
*/
- startInfo.hStdError = CreateFile(L"NUL:", GENERIC_WRITE, 0,
+ startInfo.hStdError = CreateFileW(L"NUL:", GENERIC_WRITE, 0,
&secAtts, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
} else {
DuplicateHandle(hProcess, errorHandle, hProcess, &startInfo.hStdError,
@@ -1134,7 +1134,7 @@ TclpCreateProcess(
BuildCommandLine(execPath, argc, argv, &cmdLine);
- if (CreateProcess(NULL, (WCHAR *) Tcl_DStringValue(&cmdLine),
+ if (CreateProcessW(NULL, (WCHAR *) Tcl_DStringValue(&cmdLine),
NULL, NULL, TRUE, (DWORD) createFlags, NULL, NULL, &startInfo,
&procInfo) == 0) {
TclWinConvertError(GetLastError());
@@ -1156,7 +1156,7 @@ TclpCreateProcess(
* will be created for each process but the previous instances may not be
* cleaned up. This results in a significant virtual memory loss each time
* the process is spawned. If there is a WaitForInputIdle() call between
- * CreateProcess() and CloseHandle(), the problem does not occur." PSS ID
+ * CreateProcessW() and CloseHandle(), the problem does not occur." PSS ID
* Number: Q124121
*/
@@ -1275,7 +1275,7 @@ ApplicationType(
* is, then try adding .com, .exe, .bat and .cmd, in that order, to the name,
* looking for an executable.
*
- * Using the raw SearchPath() function doesn't do quite what is necessary.
+ * Using the raw SearchPathW() function doesn't do quite what is necessary.
* If the name of the executable already contains a '.' character, it will
* not try appending the specified extension when searching (in other
* words, SearchPath will not find the program "a.b.exe" if the arguments
@@ -1294,7 +1294,7 @@ ApplicationType(
Tcl_DStringInit(&ds);
nativeName = Tcl_UtfToWCharDString(Tcl_DStringValue(&nameBuf),
Tcl_DStringLength(&nameBuf), &ds);
- found = SearchPath(NULL, nativeName, NULL, MAX_PATH,
+ found = SearchPathW(NULL, nativeName, NULL, MAX_PATH,
nativeFullPath, &rest);
Tcl_DStringFree(&ds);
if (found == 0) {
@@ -1306,7 +1306,7 @@ ApplicationType(
* known type.
*/
- attr = GetFileAttributes(nativeFullPath);
+ attr = GetFileAttributesW(nativeFullPath);
if ((attr == 0xffffffff) || (attr & FILE_ATTRIBUTE_DIRECTORY)) {
continue;
}
@@ -1321,7 +1321,7 @@ ApplicationType(
break;
}
- hFile = CreateFile(nativeFullPath,
+ hFile = CreateFileW(nativeFullPath,
GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE) {
@@ -1401,7 +1401,7 @@ ApplicationType(
* application name from the arguments.
*/
- GetShortPathName(nativeFullPath, nativeFullPath, MAX_PATH);
+ GetShortPathNameW(nativeFullPath, nativeFullPath, MAX_PATH);
Tcl_DStringInit(&ds);
strcpy(fullName, Tcl_WCharToUtfDString(nativeFullPath, -1, &ds));
Tcl_DStringFree(&ds);
@@ -1415,7 +1415,7 @@ ApplicationType(
* BuildCommandLine --
*
* The command line arguments are stored in linePtr separated by spaces,
- * in a form that CreateProcess() understands. Special characters in
+ * in a form that CreateProcessW() understands. Special characters in
* individual arguments from argv[] must be quoted when being stored in
* cmdLine.
*
@@ -3206,7 +3206,7 @@ TclpOpenTemporaryFile(
}
namePtr = (char *) name;
- length = GetTempPath(MAX_PATH, name);
+ length = GetTempPathW(MAX_PATH, name);
if (length == 0) {
goto gotError;
}
@@ -3241,7 +3241,7 @@ TclpOpenTemporaryFile(
memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf) + 1);
Tcl_DStringFree(&buf);
- handle = CreateFile(name,
+ handle = CreateFileW(name,
GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, flags, NULL);
} while (handle == INVALID_HANDLE_VALUE
&& --counter2 > 0