2626// /////////////////////////////////////////////////////////////////////////////
2727HRESULT MakeEscapedURL ( LPWSTR pszInURL, LPWSTR *ppszOutURL )
2828{
29- if ( ( NULL == pszInURL ) || ( NULL == ppszOutURL ) )
29+ if ( ( nullptr == pszInURL ) || ( nullptr == ppszOutURL ) )
3030 {
3131 return ( E_INVALIDARG );
3232 }
@@ -46,7 +46,7 @@ HRESULT MakeEscapedURL( LPWSTR pszInURL, LPWSTR *ppszOutURL )
4646 {
4747 LPWSTR pchToEscape = wcspbrk ( pszTemp, L" #$%&\\ +,;=@[]^{}" );
4848
49- if ( NULL == pchToEscape )
49+ if ( nullptr == pchToEscape )
5050 {
5151 break ;
5252 }
@@ -68,7 +68,7 @@ HRESULT MakeEscapedURL( LPWSTR pszInURL, LPWSTR *ppszOutURL )
6868
6969 *ppszOutURL = new WCHAR[ cchNeeded ];
7070
71- if ( NULL == *ppszOutURL )
71+ if ( nullptr == *ppszOutURL )
7272 {
7373 return ( E_OUTOFMEMORY );
7474 }
@@ -90,7 +90,7 @@ HRESULT MakeEscapedURL( LPWSTR pszInURL, LPWSTR *ppszOutURL )
9090 {
9191 LPWSTR pchToEscape = wcspbrk ( pszTemp, L" #$%&\\ +,;=@[]^{}" );
9292
93- if ( NULL == pchToEscape )
93+ if ( nullptr == pchToEscape )
9494 {
9595 //
9696 // Copy the rest of the input string and get out
@@ -187,7 +187,7 @@ HRESULT GetShellOpenCommand( LPTSTR ptszShellOpenCommand, DWORD cbShellOpenComma
187187 //
188188 if ( !fFoundExtensionCommand )
189189 {
190- if ( NULL != hKey )
190+ if ( nullptr != hKey )
191191 {
192192 RegCloseKey ( hKey );
193193 }
@@ -211,12 +211,12 @@ HRESULT GetShellOpenCommand( LPTSTR ptszShellOpenCommand, DWORD cbShellOpenComma
211211 while ( FALSE );
212212 }
213213
214- if ( NULL != hKey )
214+ if ( nullptr != hKey )
215215 {
216216 RegCloseKey ( hKey );
217217 }
218218
219- if ( NULL != hFileKey )
219+ if ( nullptr != hFileKey )
220220 {
221221 RegCloseKey ( hFileKey );
222222 }
@@ -249,12 +249,12 @@ HRESULT LaunchURL( LPCWSTR pszURL )
249249
250250 LPTSTR pszParam = _tcsstr ( szShellOpenCommand, _T ( " \" %1\" " ) );
251251
252- if ( NULL == pszParam )
252+ if ( nullptr == pszParam )
253253 {
254254 pszParam = _tcsstr ( szShellOpenCommand, _T ( " \" %*\" " ) );
255255 }
256256
257- if ( NULL != pszParam )
257+ if ( nullptr != pszParam )
258258 {
259259 *pszParam = _T ( ' \0 ' ) ;
260260
@@ -288,7 +288,7 @@ HRESULT LaunchURL( LPCWSTR pszURL )
288288 pchNext = _tcschr ( pchFirst + 1 , _T ( ' ' ) );
289289 }
290290
291- if ( NULL == pchNext )
291+ if ( nullptr == pchNext )
292292 {
293293 pchNext = szShellOpenCommand + _tcslen ( szShellOpenCommand );
294294 }
@@ -313,8 +313,8 @@ HRESULT LaunchURL( LPCWSTR pszURL )
313313
314314 StartUp.cb = sizeof (STARTUPINFO);
315315
316- if ( !CreateProcess ( szExe, szLaunchCommand, nullptr , NULL ,
317- FALSE , 0 , nullptr , NULL , &StartUp, &ProcInfo) )
316+ if ( !CreateProcess ( szExe, szLaunchCommand, nullptr , nullptr ,
317+ FALSE , 0 , nullptr , nullptr , &StartUp, &ProcInfo) )
318318 {
319319 hr = HRESULT_FROM_WIN32 ( GetLastError () );
320320 }
@@ -324,12 +324,12 @@ HRESULT LaunchURL( LPCWSTR pszURL )
324324 // CreateProcess succeeded and we do not need the handles to the thread
325325 // or the process, so close them now.
326326 //
327- if ( NULL != ProcInfo.hThread )
327+ if ( nullptr != ProcInfo.hThread )
328328 {
329329 CloseHandle ( ProcInfo.hThread );
330330 }
331331
332- if ( NULL != ProcInfo.hProcess )
332+ if ( nullptr != ProcInfo.hProcess )
333333 {
334334 CloseHandle ( ProcInfo.hProcess );
335335 }
0 commit comments