Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1269 dpurdie 1
#-------------------------------------------------------------------------------
2
#   Documentation
3
#
4
 
5
=pod
6
 
7
=for htmltoc    FAQ::Windows CSharp::Creating Interop DLLs
8
 
9
=head1 NAME
10
 
11
How to create C# Interop DLLs
12
 
13
=head1 SYNOPSIS
14
 
15
In your build.pl file use either LinkPkgArchive or BuildPkgArchive to include
16
the package containing the DLL to import. LinkPkgArchive is preferred.
17
 
18
In your makefile.pl ...
19
 
20
    # Create Interop DLL
21
    #..
22
    Src ('*', 'lib.win32/COM_LIBRARY_NAME.dll', '--FromPackage' );
23
 
24
    GenerateFiles ('*', 'TlbImp', '/nologo',
25
                   '--Prerequisite(COM_LIBRARY_NAME.dll)',
26
                   '/out:--Generated(Interop.COM_LIBRARY_NAME.dll)',
27
                   '/namespace:COM_LIBRARY_NAME' );
28
 
29
    # Install - for local use only
30
    InstallLib ('*', 'Interop.COM_LIBRARY_NAME.dll' );
31
 
32
    # Package for all to use
33
    PackageLib ('*', 'Interop.COM_LIBRARY_NAME.dll' );
34
 
35
=head2 Points of Interest
36
 
37
=over 4
38
 
39
=item *
40
 
41
The DLL can be sourced from an package, or locally. The example shows the DLL
42
being sourced from a package.
43
 
44
=item *
45
 
46
The TlbImp utility is a part of the SDK - and is available to JATS.
47
 
48
=item *
49
 
50
If the DLL is to be used within the same project, then it need to be installed
51
with the InstallLib directive.
52
 
53
=item *
54
 
55
The same library is built for both Debug and Production.
56
 
57
=back    
58