473,782 Members | 2,498 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Delphi coded DLL, read by .NET Web Service?

Dear List,

We have a large application written in Delphi. I am writing a mobile app
written in .NET (C#) which reads and writes into the Delphi applications
Oracle database via a .NET Web Service. Much of the data centred
functionality on the application is quite involved, and to re-write all this
functionality in the .NET web service would be very time consuming. Our idea
is to perhaps develop a DLL written in Delphi, which copies across all
required code from the main application. The .NET web service would then load
and run this DLL as and when required, merely passing parameters in and out
etc...

Does anyone know if it is possible for a .NET Web Service to use a Delphi
written DLL?

Thanks for any tips,

D
Oct 29 '07 #1
4 4101
=?Utf-8?B?ZGF2ZWJ5dGh lc2Vh?= <da**********@d iscussions.micr osoft.com>
wrote in news:A8******** *************** ***********@mic rosoft.com:
Our idea is to perhaps develop a DLL written in
Delphi, which copies across all required code from the main
application. The .NET web service would then load and run this DLL as
and when required, merely passing parameters in and out etc...
Surely there must be an easier way?

Perhaps you can use RemObjects SDK?

http://www.remobjects. com/product/?id={5B241E66-7BAE-4D46-B2BA-
03EB9DC5229D}

Remobjects can expose your Delphi application as a remoting service or web
service. This would make communicating with .NET much easier.
Does anyone know if it is possible for a .NET Web Service to use a
Delphi written DLL?
I believe it is possible using DLLImports... but you'll get into a lot of
Interop and unmanaged code. Not something you want to consider lightly.

Or perhaps you can wrap the DLL as a COM object and it'll be much easier to
call in .NET.
Oct 30 '07 #2
Hi,

Thanks for the reply. I think its going to be a more tricky task than I
first thought, mmh, it might require a re-think. I'll definetly look into the
COM option. The RemObjects library looks good, its whether or not we want to
spend more cash on something. anyway, time will tell..

Cheers,
David

Our idea is to perhaps develop a DLL written in
Delphi, which copies across all required code from the main
application. The .NET web service would then load and run this DLL as
and when required, merely passing parameters in and out etc...

Surely there must be an easier way?

Perhaps you can use RemObjects SDK?

http://www.remobjects. com/product/?id={5B241E66-7BAE-4D46-B2BA-
03EB9DC5229D}

Remobjects can expose your Delphi application as a remoting service or web
service. This would make communicating with .NET much easier.
Does anyone know if it is possible for a .NET Web Service to use a
Delphi written DLL?

I believe it is possible using DLLImports... but you'll get into a lot of
Interop and unmanaged code. Not something you want to consider lightly.

Or perhaps you can wrap the DLL as a COM object and it'll be much easier to
call in .NET.
Oct 30 '07 #3
The .NET web service would then load and run this DLL as and when
required, merely passing parameters in and out etc...
Sure. There are several viable ways to get the functionality you want.

Delphi can create standard Win32 dlls. You can package your code in those
which C# can call fine. Check out http://www.pinvoke.net/. They have tons
of examples of calling win32 dlls from .Net. I haven't built a dll in
Delphi in years, but if I recall correctly, it was pretty easy. There
should be tons of examples online.

Delphi can also create COM objects. Once that is created it's pretty easy
to add it as a reference in c# and have visual studio create a wrapper
class for accessing the object. I built quite a few COM objects in Delphi a
few years back. It was a pretty painless process as Delphi 6 & 7 had
wizards to do the heavy lifting for you.

I probably shouldn't say this on a Microsoft newsgroup. If the majority of
your application is built in Delphi you should really consider building the
..Net piece in Delphi for .Net instead of C#. All .Net languages compile
down to the CIL so from a .Net standpoint it doesn't matter what language
you use. It should be noted that you'll still need to use one of the
methods I described above for the interop issue. I merely recommend it as
an option so that you can have consistency across your application. It will
make it easier to move team members around and ongoing maintenance.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com
"davebythes ea" <da**********@d iscussions.micr osoft.comwrote in message
news:A8******** *************** ***********@mic rosoft.com...
Dear List,

We have a large application written in Delphi. I am writing a mobile app
written in .NET (C#) which reads and writes into the Delphi applications
Oracle database via a .NET Web Service. Much of the data centred
functionality on the application is quite involved, and to re-write all
this
functionality in the .NET web service would be very time consuming. Our
idea
is to perhaps develop a DLL written in Delphi, which copies across all
required code from the main application. The .NET web service would then
load
and run this DLL as and when required, merely passing parameters in and
out
etc...

Does anyone know if it is possible for a .NET Web Service to use a Delphi
written DLL?

Thanks for any tips,

D
Oct 31 '07 #4
Hi Andrew,

Thanks for the information - that was all very useful!

I didnt realise you could code .NET Web Services in Delphi, that may provide
the solution for us. Interesting about the DLL's. I also suspected that
surely a Win32 DLL was independent of what programming language was used to
create it. I reckon I will try this out with a simple example and see how it
goes.

Thanks again,
David

The .NET web service would then load and run this DLL as and when
required, merely passing parameters in and out etc...

Sure. There are several viable ways to get the functionality you want.

Delphi can create standard Win32 dlls. You can package your code in those
which C# can call fine. Check out http://www.pinvoke.net/. They have tons
of examples of calling win32 dlls from .Net. I haven't built a dll in
Delphi in years, but if I recall correctly, it was pretty easy. There
should be tons of examples online.

Delphi can also create COM objects. Once that is created it's pretty easy
to add it as a reference in c# and have visual studio create a wrapper
class for accessing the object. I built quite a few COM objects in Delphi a
few years back. It was a pretty painless process as Delphi 6 & 7 had
wizards to do the heavy lifting for you.

I probably shouldn't say this on a Microsoft newsgroup. If the majority of
your application is built in Delphi you should really consider building the
.Net piece in Delphi for .Net instead of C#. All .Net languages compile
down to the CIL so from a .Net standpoint it doesn't matter what language
you use. It should be noted that you'll still need to use one of the
methods I described above for the interop issue. I merely recommend it as
an option so that you can have consistency across your application. It will
make it easier to move team members around and ongoing maintenance.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com
"davebythes ea" <da**********@d iscussions.micr osoft.comwrote in message
news:A8******** *************** ***********@mic rosoft.com...
Dear List,

We have a large application written in Delphi. I am writing a mobile app
written in .NET (C#) which reads and writes into the Delphi applications
Oracle database via a .NET Web Service. Much of the data centred
functionality on the application is quite involved, and to re-write all
this
functionality in the .NET web service would be very time consuming. Our
idea
is to perhaps develop a DLL written in Delphi, which copies across all
required code from the main application. The .NET web service would then
load
and run this DLL as and when required, merely passing parameters in and
out
etc...

Does anyone know if it is possible for a .NET Web Service to use a Delphi
written DLL?

Thanks for any tips,

D
Nov 1 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
2076
by: lukeharpin | last post by:
Hi World, We have been developing Engineering software in Delphi 3,4,5,6,7 for a few years now. This morning we had a discussion about OOP and re-programming the software to which the question came up, should we stay with Delphi and go with Delphi 2005 or not. I'm interested to here everyone's opinion. Here were a few points raised. Is the future .net and will every one have .net in 2 years time. Will Delphi be around in 5 years time....
0
355
by: Alex | last post by:
I have wse enabled service on a server and making Delphi application using SOAP to access this service. I stuck with WSE security...always getting error like System.Web.Services.Protocols.SoapExeption: Server was unable to process request --> System.NullReferenceException: Object reference not set to an instance of am object. at ....Web.NSNewsReader.CheckRequest(String&userName) at ....Web.NSNewsReader.CheckUser()
0
5243
by: Tomek | last post by:
Welcome. I`m trying to prepere some project that shows how to use Corba technology i heterogenic systems.I`d like to create CORBA server with Borland Delphi (or C#.NET) and few client applications taht comunicate with serwer: J2ME client for WindowsCE 5.0, c# or Delphi from WindowsXP, some Web application using Java and maybe something for Linux system. For few days i`m looking for some examples in internet but most of them using only...
5
2201
by: Dinesh Kumar | last post by:
Hi all I am using VB.NET for a Connector dll in Delphi client and some webservice . can you tell me how to handle pointers in Vb.net which are passed by delphi client as parameters in function all the information is returned on the basis of reference or pointers in functions. I can not change the client APIS so i have to handle then in VB.net dll
2
2015
by: xpanta | last post by:
Hi, I would like to know what (if possible) is the best way for a java-coded client to communicate with a Delphi-coded server. I am actually to create a JSP <-> JBean <->Delphi Server <-> DLL_API web-based application. Is this possible? Any suggestions on this?
0
1420
by: epoch | last post by:
hi. my problem is: there is a web service running on the network. i wrote a windows service in delphi. i want to call a dll or com+ from this windows service. and this windows service is going to call a function from the web service repeatedly. is it possible to call dll or com+ from windows service that i wrote??? if so. how can i do that. please help...
1
8082
by: Thomas Due | last post by:
Hi, I manage an rather old application in which we have some fairly complex (ugly) Delphi code. This is Delphi 6 we're talking about. Among all this Delphi code there is method for formating a print layout for slip printers. Pass a few parameters to this method and it returns a Delphi string which contains the entire slip, ready for sending to the slip printer. Now, we're slowly migrating to .NET and am in need of printing this slip...
11
2913
by: gnuist006 | last post by:
Is there a Delphi equivalent in the C world or Scheme/LISP world ? Recently, Delphi is in resurgence. In Russia people are using like crazy. For example, Bolega has written a free image processing program scankromsator in delphi because its easy to write a gui. In arabia people are using it also. Also delphi, I heard delphi allows visual programming and delphi programs run on:
0
1740
by: BornTOCode | last post by:
Hello, I am attempting to call a (Delphi) win32 DLL from a Delphi.Net webservice. I am using a slightly modified version of the hello world webservice that comes with Delphi 2006. The DLL works fine when called from a win32 app. The problem I am encountering is that the string being returned to the caller is in Chinese (No, I'm not kidding). (I need it to be in English). Background: The DLL uses 3 pchar parms, 2 in and one out. In...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10146
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10080
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9944
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6735
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.