Difference between revisions of "User:Pgmurphy/PerlDotNet"
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
# Register .dll<pre>gacutil /i <file>.dll</pre><pre>regasm <file>.dll</pre> | # Register .dll<pre>gacutil /i <file>.dll</pre><pre>regasm <file>.dll</pre> | ||
− | |||
# Call library in Perl | # Call library in Perl | ||
use Win32::OLE;<BR> | use Win32::OLE;<BR> | ||
$hello = new Win32::OLE('HelloDot.HelloWorld') or die $!; | $hello = new Win32::OLE('HelloDot.HelloWorld') or die $!; | ||
$hello->sayHello(); | $hello->sayHello(); |
Revision as of 15:24, 28 March 2007
- Create strong name key.
sn -k <name>.snk
- Add strong name key to project.
- Right click on the project in VS, choose Properties
- In Signing tab, enable signing and browse to .snk
- Close project and text edit the .csproj file.
- Change the path to the SN key to the central copy (<AssemblyOriginatorKeyFile>).
- Build project
- Register .dll
gacutil /i <file>.dll
regasm <file>.dll
- Call library in Perl
use Win32::OLE;
$hello = new Win32::OLE('HelloDot.HelloWorld') or die $!; $hello->sayHello();