Registration-free COM with Manifest File


Registration-free COM is a mechanism available on the Microsoft Windows XP (SP2 for .NET-based components) and Microsoft Windows Server 2003 platforms. As the name suggests, the mechanism enables easy (for example, using XCOPY) deployment of COM components to a machine without the need to register them.

With Registration-free COM, you don't have to use "regsvr32" to register the dll as COM object, you also don't need to worry other version of this COM installed on the same machine overwrite your current version.

We strongly recommend that you use Registration-free COM to distribute EASendMail ActiveX Object with your standard exe application. ASP, VBScript or other script application is not suitable with this feature.

Using Manifest File

For standard exe application, you just need a manifest file like this: You can find latest manifest file in Installation path\Include\manifest\EASendMailObj.manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <file name="EASendMailObj.dll" hashalg="SHA1">
    <comClass clsid="{DF8A4FE2-221A-4504-987A-3FD4720DB929}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" description="Mail Class"></comClass>
    <comClass clsid="{FF80631D-E750-4C67-AFC3-5170AB72518B}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" description="FastSender Class"></comClass>
    <comClass clsid="{EAFC4EAA-9390-492A-8E53-E179527780F6}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" description="Certificate Class"></comClass>
    <comClass clsid="{036C2F8C-8D3C-4F4B-9B36-3B6F1D29C0B4}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" description="CertificateCollection Class"></comClass>
    <comClass clsid="{DD6B3C53-1871-4ADF-9C71-24B682012371}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" description="SimpleJsonParser Class"></comClass>
    <comClass clsid="{6C589C71-6FDC-4859-A9CD-F3A7EA2206D0}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" description="SimpleJsonArray Class"></comClass>
    <comClass clsid="{60534020-0887-486D-B6B7-0F177D43C00C}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" description="OAuthResponseParser Class"></comClass>
    <typelib tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" version="1.0" helpdir="" flags="HASDISKIMAGE"></typelib>
  </file>
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
    <requestedPrivileges>
    <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
    <comInterfaceExternalProxyStub name="IMail" iid="{1AD28FC9-0C71-4E89-85C9-CAECDE8BE3AB}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
    <comInterfaceExternalProxyStub name="ICertificate" iid="{A2809780-C98E-4C6D-A552-DAB146D4AD12}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
    <comInterfaceExternalProxyStub name="ICertificateCollection" iid="{DC8D5635-B8E7-441E-B550-CE1BF3BA5C55}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
    <comInterfaceExternalProxyStub name="IFastSender" iid="{92298BE3-ADEC-438F-800C-CF6311A7DF1D}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
    <comInterfaceExternalProxyStub name="ISimpleJsonArray" iid="{B62298B7-A091-4A42-8D50-B7F0194DE25A}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
    <comInterfaceExternalProxyStub name="ISimpleJsonParser" iid="{08088DBB-A031-4DCE-A4DF-7683CBE706AF}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
    <comInterfaceExternalProxyStub name="_IMailEvents" iid="{68CB8B02-D4AA-4A16-97A0-6B9488F98189}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" proxyStubClsid32="{00020420-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
    <comInterfaceExternalProxyStub name="_IFastSenderEvents" iid="{A1B45F08-67E7-4276-A7CA-7664C08F9EF7}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" proxyStubClsid32="{00020420-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
    <comInterfaceExternalProxyStub name="IOAuthResponseParser" iid="{2B8C75E2-9631-4834-9D3B-32C51C7FB962}" tlbid="{8B5A2BD0-5638-4CCA-A7FF-91B9E6768AC4}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
</assembly>
    

Then save it as yourappname.exe.manifest. For example, your application exe file is: myproject1.exe, then save it as myproject1.exe.manifest.

Finally, copy myproject1.exe, myproject1.exe.manifest and EASendMailObj.dll to the same folder on target machine, your application can use EASendMail ActiveX Object directly without COM-registration.


Now many modern programming tools support embedded manifest. Those tools compile a manifest resource to the exe file automatically. In this case, your external manifest (yourappname.exe.manifest) will be ignored. So if your tool supports embedded manifest, you can add above content to your embedded manifest or disable your embedded manifest in your tool and use external yourappname.exe.manifest.


Sample Projects

In Samples_VB6, Samples_VC and Samples_Delphi sample folder, all projects provide demo external manifest file or embedded manifest setting. To get the full samples of EASendMail, please refer to Samples section.


Using MT.exe to embed manifest to exe

If you have correct external manifest file existed on the same folder of your exe file, but it still doesn't work, then you can use MT.exe to embed manifest file to your exe file.

The Mt.exe file is a tool that generates signed files and catalogs. It is available in the Microsoft Windows Software Development Kit (SDK). Mt.exe requires that the file referenced in the manifest be present in the same directory as the manifest.

If you have Visual Studio installed on your machine, you can open Visual Studio Command Prompt and embed manifest like this:

input the following command and press enter:
mt -manifest "project1.exe.manifest" -outputresource:"project1.exe"

Then project1.exe.manifest will be embedded to project1.exe, and you no longer need external project1.exe.manifest file.

MT.exe can be used with any native exe application including exe compiled by Delphi or C++ Builder. If you don't have Visual Studio installed, you can download Windows Software Development Kit (SDK) from Microsoft Website and get this tool.

See Also

Using EASendMail ActiveX Object
User Authentication and SSL Connection
From, ReplyTo, Sender and Return-Path
Digital Signature and Email Encryption - S/MIME
DomainKeys Signature and DKIM Signature
Send Email without SMTP server(DNS lookup)
Work with EASendMail Service(Mail Queuing)
Programming with Asynchronous Mode
Programming with FastSender
Mail vs. FastSender
Bulk Email Sender Guidelines
Process Bounced Email (Non-Delivery Report) and Email Tracking
Work with RTF and Word
EASendMail ActiveX Object References
EASendMail SMTP Component Samples