Ejemplo n.º 1
0
	// Check if the file at the given URL is a valid CAB file
	// If u16_LocalFile = ""  -> a temporary file will be created
	// A Cabfile will be written to disk ONLY if u32_Blocksize = 0 !!
	BOOL IsUrlCabinetW(const CStrW& sw_URL, DWORD u32_Blocksize, const CStrW& sw_LocalFile, PFDICABINETINFO pfdici = NULL)
	{
		if (!Initialize(sw_URL, sw_LocalFile, u32_Blocksize))
			return FALSE;

		// Pass it on to the base class
		return IsCabinetW(L"*CABINET\\*URL", pfdici);
	}
Ejemplo n.º 2
0
	// Check if the stream contains a valid cabinet file
	BOOL IsStreamCabinet(PFDICABINETINFO pfdici = NULL)
	{
		// Pass it on to the base class (the file name is a dummy which is not used)
		return IsCabinetW(L"*CABINET\\*STREAM", pfdici);
	}
 BOOL IsResourceCabinetW(const CStrW& sw_Module, const CStrW& sw_ResName, const CStrW& sw_ResType, PFDICABINETINFO pfdici = NULL)
 {
     mk_Resource.Set(sw_Module, sw_ResName, 0, sw_ResType, 0);
     return IsCabinetW(L"*CABINET\\*RESOURCE", pfdici);
 }
 // Check if the cabinet in the resources is valid
 // You can set sw_Module = "" if the cabinet is in the EXE file which created the process
 // Otherwise sw_Module must be the filename (without path) of the DLL which contains the CAB resource
 // To test this function with the file Test.cab included in this project
 // set sw_Module = "" and u32_ResID = ID_CAB_TEST and sw_ResType = "CABFILE"
 // because the file Cabinet.rc contains:
 // ID_CAB_TEST        CABFILE         "Res\\Test.cab"
 BOOL IsResourceCabinetW(const CStrW& sw_Module, UINT u32_ResID, UINT u32_ResType, PFDICABINETINFO pfdici = NULL)
 {
     mk_Resource.Set(sw_Module, L"", u32_ResID, L"", u32_ResType);
     return IsCabinetW(L"*CABINET\\*RESOURCE", pfdici);
 }