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 revisionBoth sides next revision
com_module_sample [2018/06/08 05:45] wolfgangriedmanncom_module_sample [2018/06/08 07:18] wolfgangriedmann
Line 3: Line 3:
  
   * Create a prg file for the interface\\   * Create a prg file for the interface\\
-<code>begin namespace COMTest+<code visualfoxpro>begin namespace COMTest
  
 using System.Runtime.InteropServices using System.Runtime.InteropServices
Line 20: Line 20:
 The GUID needs to be created with the GuidGen.exe tool.\\ The GUID needs to be created with the GuidGen.exe tool.\\
   * Create a prg file for the functionality itself:\\   * Create a prg file for the functionality itself:\\
-<code>using System.Runtime.InteropServices+<code visualfoxpro>using System.Runtime.InteropServices
  
 begin namespace COMTest begin namespace COMTest
Line 50: Line 50:
   * edit the Init() method of the created VO class adding the cProgId and the cClsId using the GUIDs from your library. The cClsId uses the GUID from your class, the cIID the one from your interface.   * edit the Init() method of the created VO class adding the cProgId and the cClsId using the GUIDs from your library. The cClsId uses the GUID from your class, the cIID the one from your interface.
  
-<code>METHOD Init(ObjID, fROTCHECK) CLASS ICOMTester+<code visualfoxpro>METHOD Init(ObjID, fROTCHECK) CLASS ICOMTester
  
 self:cProgID := "COMTest.COMTester" self:cProgID := "COMTest.COMTester"
Line 68: Line 68:
   * 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
   * hopefully your VO application has a manifest. Add a reference to your COM dll:   * hopefully your VO application has a manifest. Add a reference to your COM dll:
-<code>  <dependency>+<code xml>  <dependency>
   <dependentAssembly>   <dependentAssembly>
   <assemblyIdentity   <assemblyIdentity
com_module_sample.txt · Last modified: 2022/10/11 12:02 by wolfgangriedmann