508{
515
516 if (SourceCabinet ==
NULL)
517 {
518
519
521 L"SourceDisksFiles." INF_ARCH,
522 &pSetupData->DestinationPath);
524 {
525 DPRINT1(
"AddSectionToCopyQueue(%S) failed!\n",
L"SourceDisksFiles." INF_ARCH);
526 }
527
530 &pSetupData->DestinationPath);
532 {
533 DPRINT1(
"AddSectionToCopyQueue(%S) failed!\n",
L"SourceDisksFiles");
535 if (pSetupData->ErrorRoutine)
536 pSetupData->ErrorRoutine(pSetupData,
L"SourceDisksFiles");
538 }
539
540
541 {
546 ASSERT(pSetupData->ComputerType);
547
550 }
551
552 if (AdditionalSectionName &&
554 AdditionalSectionName,
555 &pSetupData->DestinationPath))
556 {
558 if (pSetupData->ErrorRoutine)
559 pSetupData->ErrorRoutine(pSetupData, AdditionalSectionName);
561 }
562 }
563 else
564 {
565
568 SourceCabinet,
569 &pSetupData->DestinationPath);
571 {
572 DPRINT1(
"AddSectionToCopyQueueCab(%S) failed!\n", SourceCabinet);
574 if (pSetupData->ErrorRoutine)
575 pSetupData->ErrorRoutine(pSetupData,
L"SourceFiles");
577 }
578 }
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
598 pSetupData->DestinationPath.Buffer);
599
600 DPRINT(
"FullPath(1): '%S'\n", PathBuffer);
601
602
605 {
606 DPRINT1(
"Creating directory '%S' failed: Status = 0x%08lx\n", PathBuffer,
Status);
608 if (pSetupData->ErrorRoutine)
609 pSetupData->ErrorRoutine(pSetupData, PathBuffer);
611 }
612
613
614
616 {
617
619 {
620 if (SourceCabinet)
622 else
624
625 if (pSetupData->ErrorRoutine)
626 pSetupData->ErrorRoutine(pSetupData,
L"Directories");
628 }
629 }
630
631
632 do
633 {
635 {
637 break;
638 }
639
641 pSetupData->InstallPath.Buffer,
642 DirKeyValue,
643 PathBuffer,
646 {
647 DPRINT1(
"Could not build the full path for '%S', skipping...\n", DirKeyValue);
649 continue;
650 }
651
653 {
654
655
656
657
658 }
659 else
660 {
661
664 {
666 DPRINT1(
"Creating directory '%S' failed: Status = 0x%08lx\n", PathBuffer,
Status);
668 if (pSetupData->ErrorRoutine)
669 pSetupData->ErrorRoutine(pSetupData, PathBuffer);
671 }
672 }
673
676
678}
static NTSTATUS BuildFullDirectoryPath(IN PCWSTR RootPath, IN PCWSTR BasePath, IN PCWSTR RelativePath, OUT PWSTR FullPath, IN SIZE_T cchFullPathSize)
static BOOLEAN AddSectionToCopyQueueCab(IN PUSETUP_DATA pSetupData, IN HINF InfFile, IN PCWSTR SectionName, IN PCWSTR SourceCabinet, IN PCUNICODE_STRING DestinationPath)
static BOOLEAN AddSectionToCopyQueue(IN PUSETUP_DATA pSetupData, IN HINF InfFile, IN PCWSTR SectionName, IN PCUNICODE_STRING DestinationPath)
BOOLEAN ProcessComputerFiles(_In_ HINF InfFile, _In_ PCWSTR ComputerType, _Out_ PWSTR *AdditionalSectionName)
struct _GENENTRY * PGENENTRY
@ ERROR_CREATE_INSTALL_DIR
NTSTATUS SetupCreateDirectory(_In_ PCWSTR PathName)
Create a new directory, specified by the given path. Any intermediate non-existing directory is creat...
PGENERIC_LIST_ENTRY GetCurrentListEntry(IN PGENERIC_LIST List)
PVOID GetListEntryData(IN PGENERIC_LIST_ENTRY Entry)
NTSTRSAFEAPI RtlStringCchCopyW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ NTSTRSAFE_PCWSTR pszSrc)
base of all file and directory entries
#define STATUS_OBJECT_NAME_COLLISION