User:Pgmurphy/PerlDotNet

From WolfTech
< User:Pgmurphy
Revision as of 16:28, 28 March 2007 by Pgmurphy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Based on http://www.perlmonks.org/?node_id=392275.

  1. Create strong name key.
    sn -k <name>.snk
  2. Add strong name key to project.
    1. Right click on the project in VS, choose Properties
    2. In Signing tab, enable signing and browse to .snk
    3. Close project and text edit the .csproj file.
      • Change the path to the SN key to the central copy (<AssemblyOriginatorKeyFile>).
  3. Build project
  4. Register .dll. Must be repeated every time the library is changed.
    gacutil /i <file>.dll
    regasm <file>.dll
  5. Call library in Perl
use Win32::OLE;

$hello = new Win32::OLE('HelloDot.HelloWorld') or die $!;
$hello->sayHello();