User Tools

Site Tools


com_module_sample

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
com_module_sample [2018/06/08 07:18] wolfgangriedmanncom_module_sample [2022/10/11 12:02] (current) wolfgangriedmann
Line 64: Line 64:
   * move this manifest in the resources subfolder of your application directory (XIDE)   * move this manifest in the resources subfolder of your application directory (XIDE)
   * create there a file "Manifest.CREATEPROCESS_MANIFEST_RESOURCE_ID.rc" with the content   * create there a file "Manifest.CREATEPROCESS_MANIFEST_RESOURCE_ID.rc" with the content
-<code>CREATEPROCESS_MANIFEST_RESOURCE_ID RC_RT_MANIFEST "COMTest.dll.manifest"</code>+<code>#define RC_RT_MANIFEST 24 
 +#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 
 +CREATEPROCESS_MANIFEST_RESOURCE_ID RC_RT_MANIFEST "COMTest.dll.manifest"</code>
   * add this file to XIDE with Add Existing - Add Native Resources   * add this file to XIDE with Add Existing - Add Native Resources
   * build your DLL and check with a manifest viewer if your binary contains that manifest   * build your DLL and check with a manifest viewer if your binary contains that manifest
Line 95: Line 97:
   * to display the manifest in an application you can use this manifest viewer: [[https://weblogs.asp.net/kennykerr/manifest-view-1-0|weblogs.asp.net/kennykerr/manifest-view-1-0]]   * to display the manifest in an application you can use this manifest viewer: [[https://weblogs.asp.net/kennykerr/manifest-view-1-0|weblogs.asp.net/kennykerr/manifest-view-1-0]]
   * Using the DispId attribute in the interface for every method makes sure that every version of your COM dll has the same DispId in the COM interface and you don't need to recreate the TLB file and the automation server in VO after every change. In fact, most of the time you should be able to adjust the automation server in VO manually if you change the interface of the COM library   * Using the DispId attribute in the interface for every method makes sure that every version of your COM dll has the same DispId in the COM interface and you don't need to recreate the TLB file and the automation server in VO after every change. In fact, most of the time you should be able to adjust the automation server in VO manually if you change the interface of the COM library
 +  * in many cases, the definition of the RT_MANIFEST constant in VO inhibits the correct loading of the COM assembly. In these cases, simply add the definition of the constant in your own program. Please see here: [[rt_manifest_constant|RT_MANIFEST constant]]
  
  
com_module_sample.1528442284.txt.gz · Last modified: 2018/06/08 07:18 by wolfgangriedmann