TestCase3: assembly name is longger than 40 characters - viruscamp/Dependencies GitHub Wiki

// lib /def:sxsoaps.def /out:sxsoaps.lib /machine:amd64
// cl use_sxsoaps.c sxsoaps.lib
// mt.exe -manifest use_sxsoaps.exe.embed.manifest -outputresource:"use_sxsoaps.exe;#1"

// 1. should read embed manifest of exe
// 2. should loads dll from winsxs whose assembly name is longger than 40 characters.

#include <windows.h>

// <assemblyIdentity name="Microsoft.Windows.IsolationAutomation.ProxyStub" version="1.0.19041.3636" processorArchitecture="amd64" publicKeyToken="6595b64144ccf1df" type="win32" />
// C:\Windows\WinSxS\amd64_microsoft.windows.i..utomation.proxystub_6595b64144ccf1df_1.0.19041.3636_none_bbb9a0f0ff4b8f11\sxsoaps.dll
__declspec(dllimport) HRESULT DllUnregisterServer();

int main() {
    printf("Please use ProcessHacker or SystemInformer to check loaded modules.\n");
    printf("loaded WinSxS\\1.0\\sxsoaps.dll \n");
    getchar();

    DllUnregisterServer();
    return 0;
}
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
    <dependentAssembly>
        <assemblyIdentity name="Microsoft.Windows.IsolationAutomation.ProxyStub" version="1.0.19041.3636" processorArchitecture="amd64" publicKeyToken="6595b64144ccf1df" type="win32" />
    </dependentAssembly>
</dependency>
</assembly>
LIBRARY sxsoaps.dll
EXPORTS
	DllCanUnloadNow
	DllGetClassObject
	DllRegisterServer
	DllUnregisterServer
	GetProxyDllInfo
⚠️ **GitHub.com Fallback** ⚠️