locked
SWIG. How to create a new dll from an old one? RRS feed

  • Question

  • Hello,

    I have an unmanaged third party dll (only the actual dll and the header files -no source codes-) that I want to use in C#. I used SWIG (http://www.swig.org/) to generate the wrapper files. Swig created several cs files (which one can use directly in cs) and a cxx file (c++ file that "communicates" with the original unmanaged dll). My problem now is that I don't know how to "join" this cxx file to the original dll. My idea is to create a new dll that "encapsulates" both the cxx file and the original dll but I don´t know how. I've searched in the swig forums and tutorials with no success. I think this is more a Visual Studio issue than a SWIG issue. I´m using Visual Studio C++ 2008 Express Edition.

    Any idea is always welcomed! :)

    Thursday, April 8, 2010 2:43 PM

Answers

  • You will need to create a DLL out of the cxx file, and then distribute both DLL's to the target machine.

     

    Thursday, April 8, 2010 3:54 PM

All replies

  •       Ex:

            [DllImport("dllvc.dll")]
            public static extern void XXXFun();

            Using "IDA" to load the Dll file (dllvc.dll) ,and viewing Exports ...

            then use it .

            Ending!

    Thursday, April 8, 2010 3:30 PM
  • You will need to create a DLL out of the cxx file, and then distribute both DLL's to the target machine.

     

    Thursday, April 8, 2010 3:54 PM