@@ -138,7 +138,7 @@ void AwtDesktopProperties::GetSystemProperties() {
138
138
// Note that it uses malloc() and returns the pointer to allocated
139
139
// memory, so remember to use free() when you are done with its
140
140
// result.
141
- static LPTSTR resolveShellDialogFont (LPTSTR fontName, HKEY handle) {
141
+ static LPTSTR resolveShellDialogFont (LPCTSTR fontName, HKEY handle) {
142
142
DWORD valueType, valueSize;
143
143
if (RegQueryValueEx ((HKEY)handle, fontName, NULL ,
144
144
&valueType, NULL , &valueSize) != 0 ) {
@@ -164,7 +164,7 @@ static LPTSTR resolveShellDialogFont(LPTSTR fontName, HKEY handle) {
164
164
// memory, so remember to use free() when you are done with its
165
165
// result.
166
166
static LPTSTR resolveShellDialogFont () {
167
- LPTSTR subKey = TEXT (" Software\\ Microsoft\\ Windows NT\\ CurrentVersion\\ FontSubstitutes" );
167
+ LPCTSTR subKey = TEXT (" Software\\ Microsoft\\ Windows NT\\ CurrentVersion\\ FontSubstitutes" );
168
168
169
169
HKEY handle;
170
170
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, subKey, 0 , KEY_READ, &handle) != 0 ) {
@@ -183,7 +183,7 @@ static LPTSTR resolveShellDialogFont() {
183
183
// Note that it uses malloc() and returns the pointer to allocated
184
184
// memory, so remember to use free() when you are done with its
185
185
// result.
186
- static LPTSTR getWindowsPropFromReg (LPTSTR subKey, LPTSTR valueName, DWORD *valueType) {
186
+ static LPTSTR getWindowsPropFromReg (LPCTSTR subKey, LPCTSTR valueName, DWORD *valueType) {
187
187
HKEY handle;
188
188
if (RegOpenKeyEx (HKEY_CURRENT_USER, subKey, 0 , KEY_READ, &handle) != 0 ) {
189
189
return NULL ;
@@ -221,7 +221,7 @@ static LPTSTR getWindowsPropFromReg(LPTSTR subKey, LPTSTR valueName, DWORD *valu
221
221
}
222
222
}
223
223
224
- static LPTSTR getXPStylePropFromReg (LPTSTR valueName) {
224
+ static LPTSTR getXPStylePropFromReg (LPCTSTR valueName) {
225
225
DWORD valueType;
226
226
return getWindowsPropFromReg (TEXT (" Software\\ Microsoft\\ Windows\\ CurrentVersion\\ ThemeManager" ),
227
227
valueName, &valueType);
@@ -651,11 +651,11 @@ void AwtDesktopProperties::GetOtherParameters() {
651
651
throw ;
652
652
}
653
653
654
- LPTSTR valueName = TEXT (" PlaceN" );
654
+ LPCTSTR valueName = TEXT (" PlaceN" );
655
655
LPTSTR valueNameBuf = (LPTSTR)SAFE_SIZE_ARRAY_ALLOC (safe_Malloc, (lstrlen (valueName) + 1 ), sizeof (TCHAR));
656
656
lstrcpy (valueNameBuf, valueName);
657
657
658
- LPTSTR propKey = TEXT (" win.comdlg.placesBarPlaceN" );
658
+ LPCTSTR propKey = TEXT (" win.comdlg.placesBarPlaceN" );
659
659
660
660
LPTSTR propKeyBuf;
661
661
try {
@@ -672,7 +672,7 @@ void AwtDesktopProperties::GetOtherParameters() {
672
672
valueNameBuf[5 ] = _T (' 0' + i++);
673
673
propKeyBuf[25 ] = valueNameBuf[5 ];
674
674
675
- LPTSTR key = TEXT (" Software\\ Microsoft\\ Windows\\ CurrentVersion\\ Policies\\ comdlg32\\ PlacesBar" );
675
+ LPCTSTR key = TEXT (" Software\\ Microsoft\\ Windows\\ CurrentVersion\\ Policies\\ comdlg32\\ PlacesBar" );
676
676
try {
677
677
value = NULL ;
678
678
if ((value = getWindowsPropFromReg (key, valueNameBuf, &valueType)) != NULL ) {
0 commit comments