PC Review


Reply
Thread Tools Rate Thread

Can legacy code call .NET?

 
 
clintonb
Guest
Posts: n/a
 
      13th Mar 2008
At our company we have some old code written using Powersoft's Power++
(a RAD C++ product). Power++ has been discontinued for quite a while
now so we don't want to use it for new projects.

We'd like to write a program in .NET that can be called by an old
program we wrote in Power++. I'm assuming it is impossible to do that
on the code level. Is there perhaps another way that a legacy .dll
or .exe can call functionality in a .NET assembly?

Usually all the stuff I see on the internet is about .NET code calling
legacy code. And even then, it seems like it is calling .COM stuff or
unmanaged Visual C++ code.

 
Reply With Quote
 
 
 
 
Dick Grier
Guest
Posts: n/a
 
      13th Mar 2008
You can expose .NET functions via COM, then call that COM code from your
legacy application.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.


 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      14th Mar 2008
There are two potential methods I can think of off hand:

1. If the legacy app can adhere to COM standards, you can make a COM
callable wrapper around the .NET assembly and call that way

2. If not, you can wrap the .NET funcationality in a service and call the
service (Not sure how with POWER++, of course, if no SOAP functionality, you
will end up with a socket call)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

*************************************************
| Think outside the box!
|
*************************************************
"clintonb" <(E-Mail Removed)> wrote in message
news:14a9e9f7-ae08-443a-bf5e-(E-Mail Removed)...
> At our company we have some old code written using Powersoft's Power++
> (a RAD C++ product). Power++ has been discontinued for quite a while
> now so we don't want to use it for new projects.
>
> We'd like to write a program in .NET that can be called by an old
> program we wrote in Power++. I'm assuming it is impossible to do that
> on the code level. Is there perhaps another way that a legacy .dll
> or .exe can call functionality in a .NET assembly?
>
> Usually all the stuff I see on the internet is about .NET code calling
> legacy code. And even then, it seems like it is calling .COM stuff or
> unmanaged Visual C++ code.
>



 
Reply With Quote
 
Thomas Scheidegger
Guest
Posts: n/a
 
      15th Mar 2008
> Is there perhaps another way that a legacy .dll
> or .exe can call functionality in a .NET assembly?



with C++/CLI (in VS2005+2008)
you can mix managed- & unmanaged C++,
or build an assembly exposing a native (C/C++/Win32) DLL API.

Or use it for building a native wrapper for C#/VB.NET assemblies.



--
Thomas Scheidegger - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What does it mean with legacy code Tony Johansson Microsoft C# .NET 2 27th Apr 2010 02:00 AM
Re: Using legacy C/C++ code with C# Kenneth Porter Microsoft C# .NET 0 13th Jun 2008 01:48 AM
How to call non-COM legacy dll from ASP.NET -OR- write COM wrapper in C# Chris Bordeman Microsoft ASP .NET 8 11th Apr 2008 02:37 AM
ASP.NET (c# code behind) will not load legacy C++ dll Andy Sutorius via DotNetMonster.com Microsoft ASP .NET 6 18th Jan 2006 04:07 PM
Call legacy program for vb.net application =?Utf-8?B?Q2FzbGFu?= Microsoft VB .NET 1 23rd Jan 2004 09:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:57 PM.