Porting from unmanaged to managed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?RGlwZXNoX1NoYXJtYQ==?=

    #1

    Porting from unmanaged to managed

    Hi all,
    I have a Dll code written in VC++ having lots of structures, classes etc and
    exporting 100s of APIs.
    I have to port it to VC.Net to make it managed. How can i port the whole
    code to make it managed. I have heard of IJW & wrapper. But please guide me
    how can i migrate to VC.Net.

    Thanks,
    Dipesh
  • Sheng Jiang[MVP]

    #2
    Re: Porting from unmanaged to managed

    You may want to look the Native and .NET Interoperabilit y section in Visual
    C++ Programming Guide
    msdn2.microsoft .com/en-us/library/zbz07712(VS.80) .aspx

    --
    Sheng Jiang
    Microsoft MVP in VC++
    "Dipesh_Sha rma" <DipeshSharma@d iscussions.micr osoft.comwrote in message
    news:AAA1CEC4-DCE2-4B61-A317-577FB28867B2@mi crosoft.com...
    Hi all,
    I have a Dll code written in VC++ having lots of structures, classes etc
    and
    exporting 100s of APIs.
    I have to port it to VC.Net to make it managed. How can i port the whole
    code to make it managed. I have heard of IJW & wrapper. But please guide
    me
    how can i migrate to VC.Net.
    >
    Thanks,
    Dipesh

    Comment

    • =?Utf-8?B?RGlwZXNoX1NoYXJtYQ==?=

      #3
      Re: Porting from unmanaged to managed

      Hi sheng thanks for this link. I am now trying to import my unmanaged dll &
      creating a managed wrapper on it as shown below:

      [DllImport("C:\\ New Folder\\unmanag ed.dll", EntryPoint = "testfuncti on"
      ,CallingConvent ion= CallingConventi on::Cdecl)]
      String * LonString( const teststructure& v, String * s, uint nb );

      public:
      String * LonNeuronIdStri ng( const TLonNeuronId& v, String * s, uint nb )
      {
      return ::NaCppLibLib:: LonNeuronIdStri ng( v, s, nb ); //passing to unmanaged
      }
      First of all can you please point out the mistake in it. I am no able to
      access the structure in VB.Net application. I have included the structure in
      namespace.

      Thanks.


      "Sheng Jiang[MVP]" wrote:
      You may want to look the Native and .NET Interoperabilit y section in Visual
      C++ Programming Guide
      msdn2.microsoft .com/en-us/library/zbz07712(VS.80) .aspx
      >
      --
      Sheng Jiang
      Microsoft MVP in VC++

      Comment

      Working...