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