// lib /def:msdelta.def /out:msdelta.lib /machine:amd64
// lib /def:CbsCore.def /out:CbsCore.lib /machine:amd64
// cl use_servicingstack.c msdelta.lib CbsCore.lib
// 1. should read external use_servicingstack.exe.manifest
// 2. should read DCM compressed manifest
// 3. should ignore manifest with versionScope="nonSxS"
#include <windows.h>
// The manifest below is DCM compressed and nonSxS
// <assemblyIdentity name="Microsoft-Windows-ServicingStack" version="10.0.19041.1220" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />
// C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.19041.1220_none_7e21bc567c7ed16b
// msdelta.dll::DeltaFree , in both WinSxS and System32
BOOL WINAPI DeltaFree(LPVOID lpMemory);
// CbsCore.dll::CbsCoreInitialize , only in WinSxS
void CbsCoreInitialize();
int main() {
printf("Please use ProcessHacker or SystemInformer to check loaded modules.\n");
CbsCoreInitialize();
DeltaFree(0);
return 0;
}
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity name="Microsoft-Windows-ServicingStack" version="10.0.19041.1220" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" />
</dependentAssembly>
</dependency>
</assembly>
LIBRARY msdelta.dll
EXPORTS
ApplyDeltaA
ApplyDeltaB
ApplyDeltaProvidedB
ApplyDeltaW
CreateDeltaA
CreateDeltaB
CreateDeltaW
DeltaFree
DeltaNormalizeProvidedB
GetDeltaInfoA
GetDeltaInfoB
GetDeltaInfoW
GetDeltaSignatureA
GetDeltaSignatureB
GetDeltaSignatureW
LIBRARY CbsCore.dll
EXPORTS
CbsCoreEnsureNoStartupProcessing
CbsCoreFinalizeShutdownProcessing
CbsCorePrepareShutdownProcessing
CbsCoreServiceIdleProcessing
CbsCoreShutdownProcessing
CbsCreateSessionNotify
CbsCreateSessionNotifyFinalize
CbsCreateSessionNotifyInitialize
CbsCoreFinalize
CbsCoreGetActiveOfflineSession
CbsCoreInitialize
CbsCoreInitializeDelayedPortion
CbsCoreIsExecutionEngineIdle
CbsCoreLoadComponentStore
CbsCoreSetCustomLogging
CbsCoreSetState
CbsCoreStartupProcessing
CbsCoreStopIdleProcessing
CbsSetCbsCorePathInOfflineImage
SetRebootInProgressFlag
SetTestMode