Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista Tutorial - Can legacy code call .NET?

Reply
 
Old 03-13-2008   #1 (permalink)
clintonb
Guest


 
 

Can legacy code call .NET?

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.


My System SpecsSystem Spec
Old 03-13-2008   #2 (permalink)
Dick Grier
Guest


 
 

Re: Can legacy code call .NET?

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.


My System SpecsSystem Spec
Old 03-14-2008   #3 (permalink)
Cowboy \(Gregory A. Beamer\)
Guest


 
 

Re: Can legacy code call .NET?

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" <cbast2@xxxxxx> wrote in message
news:14a9e9f7-ae08-443a-bf5e-d160db63ac52@xxxxxx
Quote:

> 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.
>

My System SpecsSystem Spec
Old 03-14-2008   #4 (permalink)
Thomas Scheidegger
Guest


 
 

Re: Can legacy code call .NET?

> Is there perhaps another way that a legacy .dll
Quote:

> 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/

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
call to DllRegisterServer failed with error code 0x80020009 General Discussion
Loading .net assembly from VB6 code call .NET General
error code when I call someone (0x80ee000b) Live Messenger
Viasta sound interface breaks legacy code Vista General
call to DllRegisterServer failed with error code 0x80040200 Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46