Enables a large Windows image (.wim) file to be split into smaller parts for replication or storage on smaller forms of media.

	HANDLE		 hWim,
	PWSTR		pszPartPath,
	LARGE_INTEGER  pliPartSize,
	DWORD		dwFlags



[in] A handle to a .wim file returned by WIMCreateFile.


[in] A pointer to a null-terminated string containing the path of the first file piece of the spanned set.


[in out] A pointer to a LARGE_INTEGER, specifying the size of the initial piece of the spanned set. This value will also be the default size used for subsequent pieces, unless altered by a response to the WIM_MSG_SPLIT message. If the size specified is insufficient to create the first part of the spanned .wim file, the value is filled in with the minimum space required. See Remarks.


[in] Reserved. Must be zero.

Return Value

If the function succeeds, then the return value is nonzero.

If the function fails, then the return value is zero. To obtain extended error information, call GetLastError.


To obtain the minimum space required for the initial .wim file, set the contents of the pliPartSize parameter to zero and call the WIMSplitFile function. The function will return FALSE and set the LastError function to ERROR_MORE_DATA, and the contents of the pliPartSize parameter will be set to the minimum space required.

This function creates many parts that are required to contain the resources of the original .wim file. The calling application may alter the path and size of subsequent pieces by responding to the WIM_MSG_SPLIT message.

See Also