Changeset 6709 for trunk/src/shell32/shellpath.c
- Timestamp:
- Sep 15, 2001, 11:26:26 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/shellpath.c
r6650 r6709 1 /* $Id: shellpath.c,v 1.6 2001-09-05 13:46:58 bird Exp $ */2 1 /* 3 2 * Path Functions … … 22 21 23 22 /* 24 23 ########## Combining and Constructing paths ########## 25 24 */ 26 25 27 26 /************************************************************************* 28 * PathAppendAW 27 * PathAppendAW [SHELL32.36] 29 28 */ 30 29 BOOL WINAPI PathAppendAW( 31 32 33 { 34 35 36 37 } 38 39 /************************************************************************* 40 * PathCombineAW 30 LPVOID lpszPath1, 31 LPCVOID lpszPath2) 32 { 33 if (SHELL_OsIsUnicode()) 34 return PathAppendW(lpszPath1, lpszPath2); 35 return PathAppendA(lpszPath1, lpszPath2); 36 } 37 38 /************************************************************************* 39 * PathCombineAW [SHELL32.37] 41 40 */ 42 41 LPVOID WINAPI PathCombineAW( 43 44 45 LPCVOID lpszFile) 46 { 47 48 49 50 } 51 52 /************************************************************************* 53 * PathAddBackslashAW 42 LPVOID szDest, 43 LPCVOID lpszDir, 44 LPCVOID lpszFile) 45 { 46 if (SHELL_OsIsUnicode()) 47 return PathCombineW( szDest, lpszDir, lpszFile ); 48 return PathCombineA( szDest, lpszDir, lpszFile ); 49 } 50 51 /************************************************************************* 52 * PathAddBackslashAW [SHELL32.32] 54 53 */ 55 54 LPVOID WINAPI PathAddBackslashAW(LPVOID lpszPath) 56 55 { 57 58 59 60 } 61 62 /************************************************************************* 63 * PathBuildRootAW 56 if(SHELL_OsIsUnicode()) 57 return PathAddBackslashW(lpszPath); 58 return PathAddBackslashA(lpszPath); 59 } 60 61 /************************************************************************* 62 * PathBuildRootAW [SHELL32.30] 64 63 */ 65 64 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive) 66 65 { 67 68 69 66 if(SHELL_OsIsUnicode()) 67 return PathBuildRootW(lpszPath, drive); 68 return PathBuildRootA(lpszPath, drive); 70 69 } 71 70 72 71 /* 73 72 Extracting Component Parts 74 73 */ 75 74 76 75 /************************************************************************* 77 * PathFindFileNameAW 76 * PathFindFileNameAW [SHELL32.34] 78 77 */ 79 78 LPVOID WINAPI PathFindFileNameAW(LPCVOID lpszPath) 80 79 { 81 82 83 84 } 85 86 /************************************************************************* 87 * PathFindExtensionAW 88 */ 89 LPVOID WINAPI PathFindExtensionAW(LPCVOID lpszPath) 90 { 91 92 93 94 95 } 96 97 /************************************************************************* 98 * PathGetExtensionA 80 if(SHELL_OsIsUnicode()) 81 return PathFindFileNameW(lpszPath); 82 return PathFindFileNameA(lpszPath); 83 } 84 85 /************************************************************************* 86 * PathFindExtensionAW [SHELL32.31] 87 */ 88 LPVOID WINAPI PathFindExtensionAW(LPCVOID lpszPath) 89 { 90 if (SHELL_OsIsUnicode()) 91 return PathFindExtensionW(lpszPath); 92 return PathFindExtensionA(lpszPath); 93 94 } 95 96 /************************************************************************* 97 * PathGetExtensionA [internal] 99 98 * 100 99 * NOTES … … 104 103 static LPSTR PathGetExtensionA(LPCSTR lpszPath) 105 104 { 106 107 108 109 110 } 111 112 /************************************************************************* 113 * PathGetExtensionW 105 TRACE("(%s)\n",lpszPath); 106 107 lpszPath = PathFindExtensionA(lpszPath); 108 return (LPSTR)(*lpszPath?(lpszPath+1):lpszPath); 109 } 110 111 /************************************************************************* 112 * PathGetExtensionW [internal] 114 113 */ 115 114 static LPWSTR PathGetExtensionW(LPCWSTR lpszPath) 116 115 { 117 118 119 120 121 } 122 123 /************************************************************************* 124 * PathGetExtensionAW 125 */ 126 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath) 127 { 128 129 130 131 } 132 133 /************************************************************************* 134 * PathGetArgsAW 135 */ 136 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath) 137 { 138 139 140 141 } 142 143 /************************************************************************* 144 * PathGetDriveNumber 145 */ 146 int WINAPI PathGetDriveNumberAW(LPVOID lpszPath) 147 { 148 149 150 116 TRACE("(%s)\n",debugstr_w(lpszPath)); 117 118 lpszPath = PathFindExtensionW(lpszPath); 119 return (LPWSTR)(*lpszPath?(lpszPath+1):lpszPath); 120 } 121 122 /************************************************************************* 123 * PathGetExtensionAW [SHELL32.158] 124 */ 125 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath) 126 { 127 if (SHELL_OsIsUnicode()) 128 return PathGetExtensionW(lpszPath); 129 return PathGetExtensionA(lpszPath); 130 } 131 132 /************************************************************************* 133 * PathGetArgsAW [SHELL32.52] 134 */ 135 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath) 136 { 137 if (SHELL_OsIsUnicode()) 138 return PathGetArgsW(lpszPath); 139 return PathGetArgsA(lpszPath); 140 } 141 142 /************************************************************************* 143 * PathGetDriveNumber [SHELL32.57] 144 */ 145 int WINAPI PathGetDriveNumberAW(LPVOID lpszPath) 146 { 147 if (SHELL_OsIsUnicode()) 148 return PathGetDriveNumberW(lpszPath); 149 return PathGetDriveNumberA(lpszPath); 151 150 } 152 151 … … 154 153 * PathRemoveFileSpec [SHELL32.35] 155 154 */ 156 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath) 157 { 158 159 160 161 } 162 163 /************************************************************************* 164 * PathStripPathAW 165 */ 166 void WINAPI PathStripPathAW(LPVOID lpszPath) 167 { 168 169 170 171 } 172 173 /************************************************************************* 174 * PathStripToRootAW 175 */ 176 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath) 177 { 178 179 180 181 } 182 183 /************************************************************************* 184 * PathRemoveArgsAW 185 */ 186 void WINAPI PathRemoveArgsAW(LPVOID lpszPath) 187 { 188 189 190 191 } 192 193 /************************************************************************* 194 * PathRemoveExtensionAW 195 */ 196 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath) 197 { 198 199 200 155 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath) 156 { 157 if (SHELL_OsIsUnicode()) 158 return PathRemoveFileSpecW(lpszPath); 159 return PathRemoveFileSpecA(lpszPath); 160 } 161 162 /************************************************************************* 163 * PathStripPathAW [SHELL32.38] 164 */ 165 void WINAPI PathStripPathAW(LPVOID lpszPath) 166 { 167 if (SHELL_OsIsUnicode()) 168 return PathStripPathW(lpszPath); 169 return PathStripPathA(lpszPath); 170 } 171 172 /************************************************************************* 173 * PathStripToRootAW [SHELL32.50] 174 */ 175 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath) 176 { 177 if (SHELL_OsIsUnicode()) 178 return PathStripToRootW(lpszPath); 179 return PathStripToRootA(lpszPath); 180 } 181 182 /************************************************************************* 183 * PathRemoveArgsAW [SHELL32.251] 184 */ 185 void WINAPI PathRemoveArgsAW(LPVOID lpszPath) 186 { 187 if (SHELL_OsIsUnicode()) 188 PathRemoveArgsW(lpszPath); 189 PathRemoveArgsA(lpszPath); 190 } 191 192 /************************************************************************* 193 * PathRemoveExtensionAW [SHELL32.250] 194 */ 195 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath) 196 { 197 if (SHELL_OsIsUnicode()) 198 return PathRemoveExtensionW(lpszPath); 199 return PathRemoveExtensionA(lpszPath); 201 200 } 202 201 203 202 204 203 /* 205 204 Path Manipulations 206 205 */ 207 206 … … 211 210 LPSTR WINAPI PathGetShortPathA(LPSTR lpszPath) 212 211 { 213 214 212 FIXME("%s stub\n", lpszPath); 213 return NULL; 215 214 } 216 215 … … 220 219 LPWSTR WINAPI PathGetShortPathW(LPWSTR lpszPath) 221 220 { 222 223 221 FIXME("%s stub\n", debugstr_w(lpszPath)); 222 return NULL; 224 223 } 225 224 … … 229 228 LPVOID WINAPI PathGetShortPathAW(LPVOID lpszPath) 230 229 { 231 232 233 230 if(SHELL_OsIsUnicode()) 231 return PathGetShortPathW(lpszPath); 232 return PathGetShortPathA(lpszPath); 234 233 } 235 234 … … 239 238 void WINAPI PathRemoveBlanksAW(LPVOID str) 240 239 { 241 242 243 240 if(SHELL_OsIsUnicode()) 241 PathRemoveBlanksW(str); 242 PathRemoveBlanksA(str); 244 243 } 245 244 … … 249 248 LPVOID WINAPI PathQuoteSpacesAW (LPVOID lpszPath) 250 249 { 251 252 253 250 if(SHELL_OsIsUnicode()) 251 return PathQuoteSpacesW(lpszPath); 252 return PathQuoteSpacesA(lpszPath); 254 253 } 255 254 … … 257 256 * PathUnquoteSpacesAW [SHELL32.56] 258 257 */ 259 VOID WINAPI PathUnquoteSpacesAW(LPVOID str) 260 { 261 262 263 264 265 } 266 267 /************************************************************************* 268 * PathParseIconLocationAW 258 VOID WINAPI PathUnquoteSpacesAW(LPVOID str) 259 { 260 if(SHELL_OsIsUnicode()) 261 PathUnquoteSpacesW(str); 262 else 263 PathUnquoteSpacesA(str); 264 } 265 266 /************************************************************************* 267 * PathParseIconLocationAW [SHELL32.249] 269 268 */ 270 269 int WINAPI PathParseIconLocationAW (LPVOID lpszPath) 271 270 { 272 273 274 271 if(SHELL_OsIsUnicode()) 272 return PathParseIconLocationW(lpszPath); 273 return PathParseIconLocationA(lpszPath); 275 274 } 276 275 277 276 /* 278 277 ########## Path Testing ########## 279 278 */ 280 279 /************************************************************************* 281 * PathIsUNCAW 280 * PathIsUNCAW [SHELL32.39] 282 281 */ 283 282 BOOL WINAPI PathIsUNCAW (LPCVOID lpszPath) 284 283 { 285 286 287 return PathIsUNCA( lpszPath ); 288 } 289 290 /************************************************************************* 291 * PathIsRelativeAW 284 if (SHELL_OsIsUnicode()) 285 return PathIsUNCW( lpszPath ); 286 return PathIsUNCA( lpszPath ); 287 } 288 289 /************************************************************************* 290 * PathIsRelativeAW [SHELL32.40] 292 291 */ 293 292 BOOL WINAPI PathIsRelativeAW (LPCVOID lpszPath) 294 293 { 295 296 297 return PathIsRelativeA( lpszPath ); 298 } 299 300 /************************************************************************* 301 * PathIsRootAW 302 */ 303 BOOL WINAPI PathIsRootAW(LPCVOID lpszPath) 304 { 305 306 307 308 } 309 310 /************************************************************************* 311 * PathIsExeA 294 if (SHELL_OsIsUnicode()) 295 return PathIsRelativeW( lpszPath ); 296 return PathIsRelativeA( lpszPath ); 297 } 298 299 /************************************************************************* 300 * PathIsRootAW [SHELL32.29] 301 */ 302 BOOL WINAPI PathIsRootAW(LPCVOID lpszPath) 303 { 304 if (SHELL_OsIsUnicode()) 305 return PathIsRootW(lpszPath); 306 return PathIsRootA(lpszPath); 307 } 308 309 /************************************************************************* 310 * PathIsExeA [internal] 312 311 */ 313 312 static BOOL PathIsExeA (LPCSTR lpszPath) 314 313 { 315 316 317 318 319 320 321 322 323 324 325 } 326 327 /************************************************************************* 328 * PathIsExeW 314 LPCSTR lpszExtension = PathGetExtensionA(lpszPath); 315 int i = 0; 316 static char * lpszExtensions[6] = {"exe", "com", "pid", "cmd", "bat", NULL }; 317 318 TRACE("path=%s\n",lpszPath); 319 320 for(i=0; lpszExtensions[i]; i++) 321 if (!strcasecmp(lpszExtension,lpszExtensions[i])) return TRUE; 322 323 return FALSE; 324 } 325 326 /************************************************************************* 327 * PathIsExeW [internal] 329 328 */ 330 329 static BOOL PathIsExeW (LPCWSTR lpszPath) 331 330 { 332 333 334 335 336 337 338 339 340 331 LPCWSTR lpszExtension = PathGetExtensionW(lpszPath); 332 int i = 0; 333 static WCHAR lpszExtensions[6][4] = 334 {{'e','x','e','\0'}, {'c','o','m','\0'}, {'p','i','d','\0'}, 335 {'c','m','d','\0'}, {'b','a','t','\0'}, {'\0'} }; 336 337 TRACE("path=%s\n",debugstr_w(lpszPath)); 338 339 for(i=0; lpszExtensions[i]; i++) 341 340 #ifdef __WIN32OS2__ 342 341 if (!lstrcmpiW(lpszExtension,lpszExtensions[i])) return TRUE; 343 342 #else 344 345 #endif 346 347 } 348 349 /************************************************************************* 350 * PathIsExeAW 343 if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE; 344 #endif 345 return FALSE; 346 } 347 348 /************************************************************************* 349 * PathIsExeAW [SHELL32.43] 351 350 */ 352 351 BOOL WINAPI PathIsExeAW (LPCVOID path) 353 352 { 354 355 356 357 } 358 359 /************************************************************************* 360 * PathIsDirectoryAW 353 if (SHELL_OsIsUnicode()) 354 return PathIsExeW (path); 355 return PathIsExeA(path); 356 } 357 358 /************************************************************************* 359 * PathIsDirectoryAW [SHELL32.159] 361 360 */ 362 361 BOOL WINAPI PathIsDirectoryAW (LPCVOID lpszPath) 363 362 { 364 365 366 367 } 368 369 /************************************************************************* 370 * PathFileExistsAW 371 */ 363 if (SHELL_OsIsUnicode()) 364 return PathIsDirectoryW (lpszPath); 365 return PathIsDirectoryA (lpszPath); 366 } 367 368 /************************************************************************* 369 * PathFileExistsAW [SHELL32.45] 370 */ 372 371 BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath) 373 372 { 374 375 376 377 } 378 379 /************************************************************************* 380 * PathMatchSpecAW 381 */ 382 BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask) 383 { 384 385 386 387 } 388 389 /************************************************************************* 390 * PathIsSameRootAW 373 if (SHELL_OsIsUnicode()) 374 return PathFileExistsW (lpszPath); 375 return PathFileExistsA (lpszPath); 376 } 377 378 /************************************************************************* 379 * PathMatchSpecAW [SHELL32.46] 380 */ 381 BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask) 382 { 383 if (SHELL_OsIsUnicode()) 384 return PathMatchSpecW( name, mask ); 385 return PathMatchSpecA( name, mask ); 386 } 387 388 /************************************************************************* 389 * PathIsSameRootAW [SHELL32.650] 391 390 */ 392 391 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2) 393 392 { 394 395 396 397 } 398 399 /************************************************************************* 400 * IsLFNDriveA 401 * 393 if (SHELL_OsIsUnicode()) 394 return PathIsSameRootW(lpszPath1, lpszPath2); 395 return PathIsSameRootA(lpszPath1, lpszPath2); 396 } 397 398 /************************************************************************* 399 * IsLFNDriveA [SHELL32.119] 400 * 402 401 * NOTES 403 402 * exported by ordinal Name 404 403 */ 405 BOOL WINAPI IsLFNDriveA(LPCSTR lpszPath) 406 { 407 DWORD 404 BOOL WINAPI IsLFNDriveA(LPCSTR lpszPath) 405 { 406 DWORD fnlen; 408 407 409 408 if (!GetVolumeInformationA(lpszPath,NULL,0,NULL,&fnlen,NULL,NULL,0)) 410 409 return FALSE; 411 410 return fnlen>12; 412 411 } 413 412 414 413 /* 415 414 ########## Creating Something Unique ########## 416 415 */ 417 416 /************************************************************************* 418 * PathMakeUniqueNameA 417 * PathMakeUniqueNameA [internal] 419 418 */ 420 419 BOOL WINAPI PathMakeUniqueNameA( 421 422 DWORD dwBuffSize, 423 424 425 426 { 427 428 429 430 431 } 432 433 /************************************************************************* 434 * PathMakeUniqueNameW 420 LPSTR lpszBuffer, 421 DWORD dwBuffSize, 422 LPCSTR lpszShortName, 423 LPCSTR lpszLongName, 424 LPCSTR lpszPathName) 425 { 426 FIXME("%p %lu %s %s %s stub\n", 427 lpszBuffer, dwBuffSize, debugstr_a(lpszShortName), 428 debugstr_a(lpszLongName), debugstr_a(lpszPathName)); 429 return TRUE; 430 } 431 432 /************************************************************************* 433 * PathMakeUniqueNameW [internal] 435 434 */ 436 435 BOOL WINAPI PathMakeUniqueNameW( 437 438 DWORD dwBuffSize, 439 440 441 442 { 443 444 445 446 447 } 448 449 /************************************************************************* 450 * PathMakeUniqueNameAW 436 LPWSTR lpszBuffer, 437 DWORD dwBuffSize, 438 LPCWSTR lpszShortName, 439 LPCWSTR lpszLongName, 440 LPCWSTR lpszPathName) 441 { 442 FIXME("%p %lu %s %s %s stub\n", 443 lpszBuffer, dwBuffSize, debugstr_w(lpszShortName), 444 debugstr_w(lpszLongName), debugstr_w(lpszPathName)); 445 return TRUE; 446 } 447 448 /************************************************************************* 449 * PathMakeUniqueNameAW [SHELL32.47] 451 450 */ 452 451 BOOL WINAPI PathMakeUniqueNameAW( 453 454 DWORD dwBuffSize, 455 456 457 458 { 459 460 461 452 LPVOID lpszBuffer, 453 DWORD dwBuffSize, 454 LPCVOID lpszShortName, 455 LPCVOID lpszLongName, 456 LPCVOID lpszPathName) 457 { 458 if (SHELL_OsIsUnicode()) 459 return PathMakeUniqueNameW(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName); 460 return PathMakeUniqueNameA(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName); 462 461 } 463 462 464 463 /************************************************************************* 465 464 * PathYetAnotherMakeUniqueNameA [SHELL32.75] 466 * 465 * 467 466 * NOTES 468 467 * exported by ordinal 469 468 */ 470 469 BOOL WINAPI PathYetAnotherMakeUniqueNameA( 471 472 473 474 470 LPSTR lpszBuffer, 471 LPCSTR lpszPathName, 472 LPCSTR lpszShortName, 473 LPCSTR lpszLongName) 475 474 { 476 475 FIXME("(%p,%p, %p ,%p):stub.\n", … … 482 481 483 482 BOOL WINAPI PathYetAnotherMakeUniqueNameW( 484 485 486 487 483 LPWSTR lpszBuffer, 484 LPCWSTR lpszPathName, 485 LPCWSTR lpszShortName, 486 LPCWSTR lpszLongName) 488 487 { 489 488 FIXME("PathYetAnotherMakeUniqueNameW (%p,%p, %p ,%p):stub.\n", … … 493 492 494 493 BOOL WINAPI PathYetAnotherMakeUniqueNameAW( 495 496 497 498 499 { 500 501 502 494 LPSTR lpszBuffer, 495 LPCSTR lpszPathName, 496 LPCSTR lpszShortName, 497 LPCSTR lpszLongName) 498 { 499 if (SHELL_OsIsUnicode()) 500 return PathYetAnotherMakeUniqueNameW((LPWSTR)lpszBuffer,(LPCWSTR)lpszPathName, (LPCWSTR)lpszShortName,(LPCWSTR)lpszLongName); 501 return PathYetAnotherMakeUniqueNameA(lpszBuffer, lpszPathName, lpszShortName,lpszLongName); 503 502 } 504 503 #endif … … 506 505 507 506 /* 508 509 */ 510 511 /************************************************************************* 512 * PathFindOnPathAW 507 ########## cleaning and resolving paths ########## 508 */ 509 510 /************************************************************************* 511 * PathFindOnPathAW [SHELL32] 513 512 */ 514 513 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs) 515 514 { 516 517 518 519 } 520 521 /************************************************************************* 522 * PathCleanupSpecAW 515 if (SHELL_OsIsUnicode()) 516 return PathFindOnPathW(sFile, sOtherDirs); 517 return PathFindOnPathA(sFile, sOtherDirs); 518 } 519 520 /************************************************************************* 521 * PathCleanupSpecAW [SHELL32] 523 522 */ 524 523 DWORD WINAPI PathCleanupSpecAW (LPCVOID x, LPVOID y) … … 529 528 530 529 /************************************************************************* 531 * PathQualifyA 532 */ 533 BOOL WINAPI PathQualifyA(LPCSTR pszPath) 534 { 535 536 537 } 538 539 /************************************************************************* 540 * PathQualifyW 541 */ 542 BOOL WINAPI PathQualifyW(LPCWSTR pszPath) 543 { 544 545 546 } 547 548 /************************************************************************* 549 * PathQualifyAW 550 */ 551 BOOL WINAPI PathQualifyAW(LPCVOID pszPath) 552 { 553 554 555 530 * PathQualifyA [SHELL32] 531 */ 532 BOOL WINAPI PathQualifyA(LPCSTR pszPath) 533 { 534 FIXME("%s\n",pszPath); 535 return 0; 536 } 537 538 /************************************************************************* 539 * PathQualifyW [SHELL32] 540 */ 541 BOOL WINAPI PathQualifyW(LPCWSTR pszPath) 542 { 543 FIXME("%s\n",debugstr_w(pszPath)); 544 return 0; 545 } 546 547 /************************************************************************* 548 * PathQualifyAW [SHELL32] 549 */ 550 BOOL WINAPI PathQualifyAW(LPCVOID pszPath) 551 { 552 if (SHELL_OsIsUnicode()) 553 return PathQualifyW(pszPath); 554 return PathQualifyA(pszPath); 556 555 } 557 556 … … 560 559 */ 561 560 BOOL WINAPI PathResolveA( 562 563 LPCSTR *alpszPaths, 564 565 { 566 567 568 561 LPSTR lpszPath, 562 LPCSTR *alpszPaths, 563 DWORD dwFlags) 564 { 565 FIXME("(%s,%p,0x%08lx),stub!\n", 566 lpszPath, *alpszPaths, dwFlags); 567 return 0; 569 568 } 570 569 … … 573 572 */ 574 573 BOOL WINAPI PathResolveW( 575 576 LPCWSTR *alpszPaths, 577 578 { 579 580 581 574 LPWSTR lpszPath, 575 LPCWSTR *alpszPaths, 576 DWORD dwFlags) 577 { 578 FIXME("(%s,%p,0x%08lx),stub!\n", 579 debugstr_w(lpszPath), debugstr_w(*alpszPaths), dwFlags); 580 return 0; 582 581 } 583 582 … … 586 585 */ 587 586 BOOL WINAPI PathResolveAW( 588 589 LPCVOID *alpszPaths, 590 591 { 592 593 594 595 } 596 597 /************************************************************************* 598 * PathProcessCommandA[SHELL32.653]587 LPVOID lpszPath, 588 LPCVOID *alpszPaths, 589 DWORD dwFlags) 590 { 591 if (SHELL_OsIsUnicode()) 592 return PathResolveW(lpszPath, (LPCWSTR*)alpszPaths, dwFlags); 593 return PathResolveA(lpszPath, (LPCSTR*)alpszPaths, dwFlags); 594 } 595 596 /************************************************************************* 597 * PathProcessCommandA [SHELL32.653] 599 598 */ 600 599 HRESULT WINAPI PathProcessCommandA ( 601 602 603 604 605 { 606 607 608 609 610 } 611 612 /************************************************************************* 613 * 600 LPCSTR lpszPath, 601 LPSTR lpszBuff, 602 DWORD dwBuffSize, 603 DWORD dwFlags) 604 { 605 FIXME("%s %p 0x%04lx 0x%04lx stub\n", 606 lpszPath, lpszBuff, dwBuffSize, dwFlags); 607 strcpy(lpszBuff, lpszPath); 608 return 0; 609 } 610 611 /************************************************************************* 612 * PathProcessCommandW 614 613 */ 615 614 HRESULT WINAPI PathProcessCommandW ( 616 617 618 619 620 { 621 622 623 624 625 } 626 627 /************************************************************************* 628 * 615 LPCWSTR lpszPath, 616 LPWSTR lpszBuff, 617 DWORD dwBuffSize, 618 DWORD dwFlags) 619 { 620 FIXME("(%s, %p, 0x%04lx, 0x%04lx) stub\n", 621 debugstr_w(lpszPath), lpszBuff, dwBuffSize, dwFlags); 622 strcpyW(lpszBuff, lpszPath); 623 return 0; 624 } 625 626 /************************************************************************* 627 * PathProcessCommandAW 629 628 */ 630 629 HRESULT WINAPI PathProcessCommandAW ( 631 632 633 634 635 { 636 637 638 630 LPCVOID lpszPath, 631 LPVOID lpszBuff, 632 DWORD dwBuffSize, 633 DWORD dwFlags) 634 { 635 if (SHELL_OsIsUnicode()) 636 return PathProcessCommandW(lpszPath, lpszBuff, dwBuffSize, dwFlags); 637 return PathProcessCommandA(lpszPath, lpszBuff, dwBuffSize, dwFlags); 639 638 } 640 639 641 640 /* 642 641 ########## special ########## 643 642 */ 644 643 … … 646 645 * PathSetDlgItemPathAW 647 646 */ 648 BOOL WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath) 649 { 650 651 647 BOOL WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath) 648 { if (SHELL_OsIsUnicode()) 649 return PathSetDlgItemPathW(hDlg, id, pszPath); 650 return PathSetDlgItemPathA(hDlg, id, pszPath); 652 651 } 653 652 … … 655 654 /************************************************************************* 656 655 * SHGetSpecialFolderPathA [SHELL32.175] 657 * 656 * 658 657 * converts csidl to path 659 658 */ 660 659 661 660 static const char * const szSHFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"; 662 661 static const char * const szSHUserFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"; … … 676 675 } CSIDL_DATA; 677 676 678 #define CSIDL_MYFLAG_SHFOLDER 679 #define CSIDL_MYFLAG_SETUP 680 #define CSIDL_MYFLAG_CURRVER 681 #define CSIDL_MYFLAG_RELATIVE 677 #define CSIDL_MYFLAG_SHFOLDER 1 678 #define CSIDL_MYFLAG_SETUP 2 679 #define CSIDL_MYFLAG_CURRVER 4 680 #define CSIDL_MYFLAG_RELATIVE 8 682 681 683 682 #define HKLM HKEY_LOCAL_MACHINE … … 686 685 { 687 686 { /* CSIDL_DESKTOP */ 688 689 690 687 9, HKCU, 688 "Desktop", 689 "Desktop" 691 690 }, 692 691 { /* CSIDL_INTERNET (??) */ 693 694 695 692 0, 1, /* FIXME */ 693 NULL, 694 NULL, 696 695 }, 697 696 { /* CSIDL_PROGRAMS */ 698 699 700 697 9, HKCU, 698 "Programs", 699 "Start Menu\\Programs" 701 700 }, 702 701 { /* CSIDL_CONTROLS (.CPL files) */ 703 704 705 702 10, HKLM, 703 "SysDir", 704 "SYSTEM" 706 705 }, 707 706 { /* CSIDL_PRINTERS */ 708 709 710 707 10, HKLM, 708 "SysDir", 709 "SYSTEM" 711 710 }, 712 711 { /* CSIDL_PERSONAL */ 713 714 715 712 1, HKCU, 713 "Personal", 714 "My Documents" 716 715 }, 717 716 { /* CSIDL_FAVORITES */ 718 719 720 717 9, HKCU, 718 "Favorites", 719 "Favorites" 721 720 }, 722 721 { /* CSIDL_STARTUP */ 723 724 725 722 9, HKCU, 723 "StartUp", 724 "Start Menu\\Programs\\StartUp" 726 725 }, 727 726 { /* CSIDL_RECENT */ 728 729 730 727 9, HKCU, 728 "Recent", 729 "Recent" 731 730 }, 732 731 { /* CSIDL_SENDTO */ 733 734 735 732 9, HKCU, 733 "SendTo", 734 "SendTo" 736 735 }, 737 736 { /* CSIDL_BITBUCKET (is this c:\recycled ?) */ 738 739 740 737 0, 1, /* FIXME */ 738 NULL, 739 "recycled" 741 740 }, 742 741 { /* CSIDL_STARTMENU */ 743 744 745 742 9, HKCU, 743 "Start Menu", 744 "Start Menu" 746 745 }, 747 746 { /* not known */ 748 749 750 747 0, 0, 748 NULL, 749 NULL, 751 750 }, 752 751 { /* not known */ 753 754 755 752 0, 0, 753 NULL, 754 NULL, 756 755 }, 757 756 { /* not known */ 758 759 760 757 0, 0, 758 NULL, 759 NULL, 761 760 }, 762 761 { /* not known */ 763 764 765 762 0, 0, 763 NULL, 764 NULL, 766 765 }, 767 766 { /* CSIDL_DESKTOPDIRECTORY */ 768 769 770 767 9, HKCU, 768 "Desktop", 769 "Desktop" 771 770 }, 772 771 { /* CSIDL_DRIVES */ 773 774 775 772 0, 1, /* FIXME */ 773 NULL, 774 "My Computer" 776 775 }, 777 776 { /* CSIDL_NETWORK */ 778 779 780 777 0, 1, /* FIXME */ 778 NULL, 779 "Network Neighborhood" 781 780 }, 782 781 { /* CSIDL_NETHOOD */ 783 784 785 782 9, HKCU, 783 "NetHood", 784 "NetHood" 786 785 }, 787 786 { /* CSIDL_FONTS */ 788 789 790 787 9, HKCU, 788 "Fonts", 789 "Fonts" 791 790 }, 792 791 { /* CSIDL_TEMPLATES */ 793 794 795 792 9, HKCU, 793 "Templates", 794 "ShellNew" 796 795 }, 797 796 { /* CSIDL_COMMON_STARTMENU */ 798 799 800 797 9, HKLM, 798 "Common Start Menu", 799 "Start Menu" 801 800 }, 802 801 { /* CSIDL_COMMON_PROGRAMS */ 803 804 805 802 9, HKLM, 803 "Common Programs", 804 "" 806 805 }, 807 806 { /* CSIDL_COMMON_STARTUP */ 808 809 810 807 9, HKLM, 808 "Common StartUp", 809 "All Users\\Start Menu\\Programs\\StartUp" 811 810 }, 812 811 { /* CSIDL_COMMON_DESKTOPDIRECTORY */ 813 814 815 812 9, HKLM, 813 "Common Desktop", 814 "Desktop" 816 815 }, 817 816 { /* CSIDL_APPDATA */ 818 819 820 817 9, HKCU, 818 "AppData", 819 "Application Data" 821 820 }, 822 821 { /* CSIDL_PRINTHOOD */ 823 824 825 822 9, HKCU, 823 "PrintHood", 824 "PrintHood" 826 825 }, 827 826 { /* not known */ 828 829 830 827 0, 0, 828 NULL, 829 NULL, 831 830 }, 832 831 { /* CSIDL_ALTSTARTUP */ 833 834 835 832 0, 1, /* FIXME */ 833 NULL, 834 NULL 836 835 }, 837 836 { /* CSIDL_COMMON_ALTSTARTUP */ 838 839 840 837 0, 1, /* FIXME */ 838 NULL, 839 NULL 841 840 }, 842 841 { /* CSIDL_COMMON_FAVORITES */ 843 844 845 842 9, HKCU, 843 "Favorites", 844 "Favorites" 846 845 }, 847 846 { /* CSIDL_INTERNET_CACHE */ 848 849 850 847 9, HKCU, 848 "Cache", 849 "Temporary Internet Files" 851 850 }, 852 851 { /* CSIDL_COOKIES */ 853 854 855 852 9, HKCU, 853 "Cookies", 854 "Cookies" 856 855 }, 857 856 { /* CSIDL_HISTORY */ 858 859 860 857 9, HKCU, 858 "History", 859 "History" 861 860 }, 862 861 { /* CSIDL_COMMON_APPDATA */ 863 864 865 862 9, HKLM, 863 "Common AppData", 864 "All Users\\Application Data" 866 865 }, 867 866 { /* CSIDL_WINDOWS */ 868 869 870 867 2, HKLM, 868 "WinDir", 869 "Windows" 871 870 }, 872 871 { /* CSIDL_SYSTEM */ 873 874 875 872 10, HKLM, 873 "SysDir", 874 "SYSTEM" 876 875 }, 877 876 { /* CSIDL_PROGRAM_FILES */ 878 879 880 877 4, HKLM, 878 "ProgramFilesDir", 879 "Program Files" 881 880 }, 882 881 { /* CSIDL_MYPICTURES */ 883 884 885 882 1, HKCU, 883 "My Pictures", 884 "My Documents\\My Pictures" 886 885 }, 887 886 { /* CSIDL_PROFILE */ 888 889 890 887 10, HKLM, 888 "WinDir", /* correct ? */ 889 "" 891 890 }, 892 891 { /* CSIDL_SYSTEMX86 */ 893 894 895 892 10, HKLM, 893 "SysDir", 894 "SYSTEM" 896 895 }, 897 896 { /* CSIDL_PROGRAM_FILESX86 */ 898 899 900 897 4, HKLM, 898 "ProgramFilesDir", 899 "Program Files" 901 900 }, 902 901 { /* CSIDL_PROGRAM_FILES_COMMON */ 903 904 "CommonFilesDir", 905 902 4, HKLM, 903 "CommonFilesDir", 904 "Program Files\\Common Files" /* ? */ 906 905 }, 907 906 { /* CSIDL_PROGRAM_FILES_COMMONX86 */ 908 909 910 907 4, HKLM, 908 "CommonFilesDir", 909 "Program Files\\Common Files" /* ? */ 911 910 }, 912 911 { /* CSIDL_COMMON_TEMPLATES */ 913 914 915 912 0, 1, /* FIXME */ 913 NULL, 914 NULL 916 915 }, 917 916 { /* CSIDL_COMMON_DOCUMENTS */ 918 919 920 917 0, 1, /* FIXME */ 918 NULL, 919 NULL 921 920 }, 922 921 { /* CSIDL_COMMON_ADMINTOOLS */ 923 924 925 922 0, 1, /* FIXME */ 923 NULL, 924 NULL 926 925 }, 927 926 { /* CSIDL_ADMINTOOLS */ 928 929 930 927 9, HKCU, 928 "Administrative Tools", 929 "Start Menu\\Programs\\Administrative Tools" 931 930 }, 932 931 { /* CSIDL_CONNECTIONS */ 933 934 935 932 0, 1, /* FIXME */ 933 NULL, 934 NULL 936 935 } 937 936 }; … … 942 941 943 942 BOOL WINAPI SHGetSpecialFolderPathA ( 944 HWND hwndOwner, 945 LPSTR szPath, 946 DWORD csidl, 947 BOOL bCreate) 948 { 949 CHAR szValueName[MAX_PATH], szDefaultPath[MAX_PATH], szBuildPath[MAX_PATH]; 950 HKEY hRootKey, hKey; 951 DWORD dwFlags; 952 DWORD dwType, dwDisp, dwPathLen = MAX_PATH; 953 DWORD folder = csidl & CSIDL_FOLDER_MASK; 954 CHAR *p; 955 956 TRACE("0x%04x,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate); 957 958 if ((folder > CSIDL_CONNECTIONS) || (CSIDL_Data[folder].hRootKey == 0)) 959 { 960 ERR("folder unknown or not allowed\n"); 961 return FALSE; 962 } 963 if (CSIDL_Data[folder].hRootKey == 1) 964 { 965 FIXME("folder unknown, please add.\n"); 966 return FALSE; 967 } 968 969 dwFlags = CSIDL_Data[folder].dwFlags; 970 hRootKey = CSIDL_Data[folder].hRootKey; 971 strcpy(szValueName, CSIDL_Data[folder].szValueName); 972 strcpy(szDefaultPath, CSIDL_Data[folder].szDefaultPath); 973 974 if (dwFlags & CSIDL_MYFLAG_SHFOLDER) 975 { 976 /* user shell folders */ 977 if (RegCreateKeyExA(hRootKey,szSHUserFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE; 978 979 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen)) 980 { 981 RegCloseKey(hKey); 982 983 /* shell folders */ 984 if (RegCreateKeyExA(hRootKey,szSHFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE; 985 986 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen)) 987 { 988 989 /* value not existing */ 990 if (dwFlags & CSIDL_MYFLAG_RELATIVE) 991 { 992 GetWindowsDirectoryA(szPath, MAX_PATH); 993 PathAddBackslashA(szPath); 994 strcat(szPath, szDefaultPath); 995 } 996 else 997 { 998 strcpy(szPath, "C:\\"); /* FIXME ??? */ 999 strcat(szPath, szDefaultPath); 1000 } 1001 RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1); 943 HWND hwndOwner, 944 LPSTR szPath, 945 DWORD csidl, 946 BOOL bCreate) 947 { 948 CHAR szValueName[MAX_PATH], szDefaultPath[MAX_PATH], szBuildPath[MAX_PATH]; 949 HKEY hRootKey, hKey; 950 DWORD dwFlags; 951 DWORD dwType, dwDisp, dwPathLen = MAX_PATH; 952 DWORD folder = csidl & CSIDL_FOLDER_MASK; 953 CHAR *p; 954 955 TRACE("0x%04x,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate); 956 957 if ((folder > CSIDL_CONNECTIONS) || (CSIDL_Data[folder].hRootKey == 0)) 958 { 959 ERR("folder unknown or not allowed\n"); 960 return FALSE; 961 } 962 if (CSIDL_Data[folder].hRootKey == 1) 963 { 964 FIXME("folder unknown, please add.\n"); 965 return FALSE; 966 } 967 968 dwFlags = CSIDL_Data[folder].dwFlags; 969 hRootKey = CSIDL_Data[folder].hRootKey; 970 strcpy(szValueName, CSIDL_Data[folder].szValueName); 971 strcpy(szDefaultPath, CSIDL_Data[folder].szDefaultPath); 972 973 if (dwFlags & CSIDL_MYFLAG_SHFOLDER) 974 { 975 /* user shell folders */ 976 if (RegCreateKeyExA(hRootKey,szSHUserFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE; 977 978 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen)) 979 { 980 RegCloseKey(hKey); 981 982 /* shell folders */ 983 if (RegCreateKeyExA(hRootKey,szSHFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE; 984 985 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen)) 986 { 987 988 /* value not existing */ 989 if (dwFlags & CSIDL_MYFLAG_RELATIVE) 990 { 991 GetWindowsDirectoryA(szPath, MAX_PATH); 992 PathAddBackslashA(szPath); 993 strcat(szPath, szDefaultPath); 994 } 995 else 996 { 997 strcpy(szPath, "C:\\"); /* FIXME ??? */ 998 strcat(szPath, szDefaultPath); 999 } 1000 RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1); 1001 } 1002 } 1003 RegCloseKey(hKey); 1002 1004 } 1003 } 1004 RegCloseKey(hKey); 1005 } 1006 else 1007 { 1008 LPCSTR pRegPath; 1009 1010 if (dwFlags & CSIDL_MYFLAG_SETUP) 1011 pRegPath = szSetup; 1012 else 1013 if (dwFlags & CSIDL_MYFLAG_CURRVER) 1014 pRegPath = szCurrentVersion; 1015 else 1016 { 1017 ERR("folder settings broken, please correct !\n"); 1018 return FALSE; 1019 } 1020 1021 if (RegCreateKeyExA(hRootKey,pRegPath,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE; 1022 1023 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen)) 1024 { 1025 /* value not existing */ 1026 if (dwFlags & CSIDL_MYFLAG_RELATIVE) 1027 { 1028 GetWindowsDirectoryA(szPath, MAX_PATH); 1029 PathAddBackslashA(szPath); 1030 strcat(szPath, szDefaultPath); 1031 } 1032 else 1033 { 1034 strcpy(szPath, "C:\\"); /* FIXME ??? */ 1035 strcat(szPath, szDefaultPath); 1036 } 1037 RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1); 1038 } 1039 RegCloseKey(hKey); 1040 } 1041 1042 /* expand paths like %USERPROFILE% */ 1043 if (dwType == REG_EXPAND_SZ) 1044 { 1045 ExpandEnvironmentStringsA(szPath, szDefaultPath, MAX_PATH); 1046 strcpy(szPath, szDefaultPath); 1047 } 1048 1049 /* if we don't care about existing directories we are ready */ 1050 if(csidl & CSIDL_FLAG_DONT_VERIFY) return TRUE; 1051 1052 if (PathFileExistsA(szPath)) return TRUE; 1053 1054 /* not existing but we are not allowed to create it */ 1055 if (!bCreate) return FALSE; 1056 1057 /* create directory/directories */ 1058 strcpy(szBuildPath, szPath); 1059 p = strchr(szBuildPath, '\\'); 1060 while (p) 1061 { 1062 *p = 0; 1063 if (!PathFileExistsA(szBuildPath)) 1064 { 1065 if (!CreateDirectoryA(szBuildPath,NULL)) 1066 { 1067 ERR("Failed to create directory '%s'.\n", szPath); 1068 return FALSE; 1069 } 1070 } 1071 *p = '\\'; 1072 p = strchr(p+1, '\\'); 1073 } 1074 1075 MESSAGE("Created not existing system directory '%s'\n", szPath); 1076 return TRUE; 1005 else 1006 { 1007 LPCSTR pRegPath; 1008 1009 if (dwFlags & CSIDL_MYFLAG_SETUP) 1010 pRegPath = szSetup; 1011 else 1012 if (dwFlags & CSIDL_MYFLAG_CURRVER) 1013 pRegPath = szCurrentVersion; 1014 else 1015 { 1016 ERR("folder settings broken, please correct !\n"); 1017 return FALSE; 1018 } 1019 1020 if (RegCreateKeyExA(hRootKey,pRegPath,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE; 1021 1022 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen)) 1023 { 1024 /* value not existing */ 1025 if (dwFlags & CSIDL_MYFLAG_RELATIVE) 1026 { 1027 GetWindowsDirectoryA(szPath, MAX_PATH); 1028 PathAddBackslashA(szPath); 1029 strcat(szPath, szDefaultPath); 1030 } 1031 else 1032 { 1033 strcpy(szPath, "C:\\"); /* FIXME ??? */ 1034 strcat(szPath, szDefaultPath); 1035 } 1036 RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1); 1037 } 1038 RegCloseKey(hKey); 1039 } 1040 1041 /* expand paths like %USERPROFILE% */ 1042 if (dwType == REG_EXPAND_SZ) 1043 { 1044 ExpandEnvironmentStringsA(szPath, szDefaultPath, MAX_PATH); 1045 strcpy(szPath, szDefaultPath); 1046 } 1047 1048 /* if we don't care about existing directories we are ready */ 1049 if(csidl & CSIDL_FLAG_DONT_VERIFY) return TRUE; 1050 1051 if (PathFileExistsA(szPath)) return TRUE; 1052 1053 /* not existing but we are not allowed to create it */ 1054 if (!bCreate) return FALSE; 1055 1056 /* create directory/directories */ 1057 strcpy(szBuildPath, szPath); 1058 p = strchr(szBuildPath, '\\'); 1059 while (p) 1060 { 1061 *p = 0; 1062 if (!PathFileExistsA(szBuildPath)) 1063 { 1064 if (!CreateDirectoryA(szBuildPath,NULL)) 1065 { 1066 ERR("Failed to create directory '%s'.\n", szPath); 1067 return FALSE; 1068 } 1069 } 1070 *p = '\\'; 1071 p = strchr(p+1, '\\'); 1072 } 1073 1074 MESSAGE("Created not existing system directory '%s'\n", szPath); 1075 return TRUE; 1077 1076 } 1078 1077 … … 1081 1080 */ 1082 1081 BOOL WINAPI SHGetSpecialFolderPathW ( 1083 1084 1085 1086 1087 { 1088 1089 1090 1091 1082 HWND hwndOwner, 1083 LPWSTR szPath, 1084 DWORD csidl, 1085 BOOL bCreate) 1086 { 1087 char szTemp[MAX_PATH]; 1088 1089 if (SHGetSpecialFolderPathA(hwndOwner, szTemp, csidl, bCreate)) 1090 { 1092 1091 if (!MultiByteToWideChar( CP_ACP, 0, szTemp, -1, szPath, MAX_PATH )) 1093 1092 szPath[MAX_PATH-1] = 0; 1094 1093 } 1095 1094 1096 1097 1098 1095 TRACE("0x%04x,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate); 1096 1097 return TRUE; 1099 1098 } 1100 1099 … … 1103 1102 */ 1104 1103 BOOL WINAPI SHGetSpecialFolderPathAW ( 1105 1106 1107 1108 1109 1110 { 1111 1112 1113 1114 } 1115 1116 /************************************************************************* 1117 * SHGetFolderPathA 1104 HWND hwndOwner, 1105 LPVOID szPath, 1106 DWORD csidl, 1107 BOOL bCreate) 1108 1109 { 1110 if (SHELL_OsIsUnicode()) 1111 return SHGetSpecialFolderPathW (hwndOwner, szPath, csidl, bCreate); 1112 return SHGetSpecialFolderPathA (hwndOwner, szPath, csidl, bCreate); 1113 } 1114 1115 /************************************************************************* 1116 * SHGetFolderPathA [SHFOLDER.@] 1118 1117 */ 1119 1118 HRESULT WINAPI SHGetFolderPathA( 1120 1121 1122 HANDLE hToken,/* [in] FIXME: get paths for specific user */1123 DWORD dwFlags,/* [in] FIXME: SHGFP_TYPE_CURRENT|SHGFP_TYPE_DEFAULT */1124 1125 { 1126 1127 1128 1129 1130 1131 } 1132 1133 /************************************************************************* 1134 * SHGetFolderPathW 1119 HWND hwndOwner, 1120 int nFolder, 1121 HANDLE hToken, /* [in] FIXME: get paths for specific user */ 1122 DWORD dwFlags, /* [in] FIXME: SHGFP_TYPE_CURRENT|SHGFP_TYPE_DEFAULT */ 1123 LPSTR pszPath) 1124 { 1125 return (SHGetSpecialFolderPathA( 1126 hwndOwner, 1127 pszPath, 1128 CSIDL_FOLDER_MASK & nFolder, 1129 CSIDL_FLAG_CREATE & nFolder )) ? S_OK : E_FAIL; 1130 } 1131 1132 /************************************************************************* 1133 * SHGetFolderPathW [SHFOLDER.@] 1135 1134 */ 1136 1135 HRESULT WINAPI SHGetFolderPathW( 1137 1138 1139 1140 1141 1142 { 1143 1144 1145 1146 1147 1148 } 1136 HWND hwndOwner, 1137 int nFolder, 1138 HANDLE hToken, 1139 DWORD dwFlags, 1140 LPWSTR pszPath) 1141 { 1142 return (SHGetSpecialFolderPathW( 1143 hwndOwner, 1144 pszPath, 1145 CSIDL_FOLDER_MASK & nFolder, 1146 CSIDL_FLAG_CREATE & nFolder )) ? S_OK : E_FAIL; 1147 }
Note:
See TracChangeset
for help on using the changeset viewer.