Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #227 from dawgfoto/fix8132

fix issue 8132 - LPTSTR always aliases to LPSTR
  • Loading branch information...
commit 4b59883ba4b4b4f9e80a9c9a26aa7b4dc412657b 2 parents 1827a50 + a9bbb65
@complexmath complexmath authored
Showing with 11 additions and 2 deletions.
  1. +11 −2 src/core/sys/windows/windows.d
View
13 src/core/sys/windows/windows.d
@@ -14,6 +14,7 @@
*/
module core.sys.windows.windows;
+version=UNICODE;
extern (Windows) nothrow:
@@ -37,8 +38,16 @@ extern (Windows) nothrow:
alias WCHAR* LPWCH, LPWSTR, PWCH, PWSTR;
alias const(WCHAR)* LPCWCH, LPCWSTR, PCWCH, PCWSTR;
+version (UNICODE)
+{
+ alias WCHAR* LPTCH, LPTSTR, PTCH, PTSTR;
+ alias const(WCHAR)* LPCTCH, LPCTSTR, PCTCH, PCTSTR;
+}
+else
+{
alias CHAR* LPTCH, LPTSTR, PTCH, PTSTR;
alias const(CHAR)* LPCTCH, LPCTSTR, PCTCH, PCTSTR;
+}
alias uint DWORD;
alias ulong DWORD64;
@@ -3071,8 +3080,8 @@ enum : uint
WAIT_FAILED = uint.max,
}
-export HANDLE CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCTSTR lpName);
-export HANDLE OpenSemaphoreA(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCTSTR lpName);
+export HANDLE CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCSTR lpName);
+export HANDLE OpenSemaphoreA(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName);
export BOOL ReleaseSemaphore(HANDLE hSemaphore, LONG lReleaseCount, LPLONG lpPreviousCount);
struct COORD {
Please sign in to comment.
Something went wrong with that request. Please try again.