.net app using Delphi DLL

Is anyone using a Delphi DLL from .NET 4.0 successfully?

I get sporadic failures in the DLL if called from a 4.0
app.  Called from a 2.0/3.5 app, everything works fine.

Anyone else seen this?

DLL is compiled with D2007.  Reviewed calling conventions
and everything seems to be StdCall as appropriate.

Thanks,
Brad.

-- 
 


C++: an octopus made by nailing extra legs onto a dog 
  --  unknown
0
Brad
12/3/2010 6:09:48 PM
embarcadero.delphi.win32 2183 articles. 0 followers. Follow

2 Replies
940 Views

Similar Articles

[PageSpeed] 0

"Brad White" <bwhiteDONTINCLUDE@inebraska.com> wrote in message 
news:310851@forums.embarcadero.com...
> Is anyone using a Delphi DLL from .NET 4.0 successfully?

FWIW, I am, but it is not a plain DLL. It is a COM server (just a 
wrapper around some Delphi classes) and it works just fine.
I am using Delphi 2009.

> I get sporadic failures in the DLL if called from a 4.0
> app.  Called from a 2.0/3.5 app, everything works fine.
>
> Anyone else seen this?

Nope sorry.

> DLL is compiled with D2007.  Reviewed calling conventions
> and everything seems to be StdCall as appropriate.
> Thanks,
> Brad.

Regards,
Raghu
0
Raghavendra
12/9/2010 12:49:19 PM
> Is anyone using a Delphi DLL from .NET 4.0 successfully?
Yes

> DLL is compiled with D2007.  Reviewed calling conventions
> and everything seems to be StdCall as appropriate.

D2009. Have you made sure that you are not passing around strings and dynamic arrays?

Regards 
Espen Harlinn
0
Espen
12/12/2010 9:14:44 PM
Reply:

Similar Artilces:

delphi Win32 using delphi .NET dll
Hi, I'm trying to use a delphi.NET dll in delphi.WIN32. I am currently using CodeGear Delphi 2007 with version2(base version) of .NET I can get the dll to import into the WIN32 application the only problem is when i include things such as: "using Classes,DateUtils, SysUtils" in the .NET dll the win32 application will instantly hang when any of the dll functions are called. Any help would be great thanks. Also I have tried this example and it also crashes for me? http://cc.embarcadero.com/Item/22688 -Braden I also found this.. "The problem is that, wehn you instal...

revisited: .NET app using Delphi DLL
I was blaming the VS .NET 4.0 debugger because that was what changed when the error surfaced. But consider this code: {code:C#} static void Main() { for (int i = 30; i < 50; i++) { AddToList(i); } } {code} Full code at the bottom of the message. Depending on how I assign the value of StrArray, I may or may not get the error, but on LrgStr, not StrArray. {code:Delphi} procedure AddToList(value: int64); stdcall; var TempStr, LrgStr: String; begin TempStr := IntToStr(value); Str :=...

reprise: problems with .NET app using Delphi DLL
We reproduced the problem with a simple test case. The following program generates 0,1,2,3,4,5,6,7,8,9 under 2.0/3.5, but 0,-1,-1,-1,-1,-1,-1,-1,-1 under .NET 4.0. Same results whether compiled with Delphi 2007 or 2010. using System; using System.Runtime.InteropServices; namespace TestNet4interop { static class Program { [DllImport("TestSimpleLibrary.dll", PreserveSig=true, CallingConvention = CallingConvention.StdCall)] public static extern void AddToList(long value); [DllImport("TestSimpleLibrary.dll", PreserveSig=true...

Re: revisited: .NET app using Delphi DLL
Brad White presented the following explanation : > I was blaming the VS .NET 4.0 debugger because that was what > changed when the error surfaced. But consider this code: > Can anyone reproduce this? Run it from VS (F5) and get an error message. Run it without debugging (Ctrl-F5) and no message. Thanks, Brad. --   In general, the art of government consists in taking as much money as possible from one party of citizens to give to the other. -- Voltaire (1764) ...

Delphi.NET loading Delphi.Win32 Driver
Hi, What I'm trying to do is marshal an array of cardinal (or integer) back into managed memory from a win32 dll. I know how to pass managed memory into a win32 dll {code} var aa : array of Integer; Buffer : IntPtr; begin SetLength(aa,2); aa[0] := 1; aa[1] := 80; if not Supports(ExtractFilePath(Application.ExeName)+'Win32_Library\SDK_Driver.Win32.io', TypeOf(IMyFunctions), MyFunctions) then Exit; //loads the driver into memory. MyFunctions contains the method names found in the SDK_Driver. Buffer := Marshal.AllocHGlobal(2 * {Marshal.SystemDefaultC...

Converting Delphi for Win32 to Delphi .Net(Prism)
Hi, I am currently migrating a project from Delphi for Win32 to Delphi.net. Part of my code currently goes into a directory and pulls out a random file from this directory and loads the contents of the file for me. This code doesn't seem to work in Delphi.Net. It uses PString and a number of functions in SysUtils that don't seem to be present in Delphi.net's SysUtils file. If anyone can help me please, it would be greatly appreciated! Many thanks, Jonathan Mackey Jonathan Mackey a écrit : > I am currently migrating a project from Delphi for Win32 to &...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Trying to call a .DLL from Delphi XE (used to work with Delphi 6 :-) )
Hi everyone, I have a problem where perhaps some one could help point me in the right direction. In Delphi 6 I used a stand alone package to train a neural netowrk,. The trained neural network was stored as a .DEF file. The standalone software provided a .DLL and Delphi code to call the network and get the prediced values from your sw. (The .DLL was created in 2002 and apparently is 32 bit.) I have'nt used it for years but am now coming back to it.... I now use Delphi XE on Windows 7 (32 bit) The old .exe's I had compiled from that time work fine. However in Delphi XE ...

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

Will a dll referenced in an ASP.Net app use the same thread pool as the ASP.Net app?
I have a dll that is referenced by my ASP.Net app. I would like the dll to use a separate thread pool than the thread pool that's available to an ASP.Net app, so that the ASP.Net can better serve the large number of requests that it receives in real world scenario. My question is: Will a separate thread pool be used automatically for dll calls (i.e. calling a method of a class within this dll) OR the same thread pool as the ASP.Net thread pool will be used? Also, if same thread pool gets used, then how can I use a separate thread pool for my dll?sun21170...

How to use Delphi object embeded in a DLL in a C++Builder app
Hi all, I've written a small DLL in Delphi and a test program in Delphi too and everything works fine but I need to write a C++Builder app that will use the DLL too and I don't know / understand how to get access to the object defined in the DLL. MyDLL.dpr {code} library MyDLL; { Important note about DLL memory management: ShareMem must be the first unit in your library's USES clause AND your project's (select Project-View Source) USES clause if your DLL exports any procedures or functions that pass strings as parameters or function results. This applies ...

Using a Delphi-ActiveX-DLL in VB.Net: Problems with strings
(Please note: Yesterday I've already asked the same question in the German forum "Delphi-Praxis", see here: http://www.delphipraxis.net/167520-delphi-activex-dll-vbulletin-net-problem-mit-strings.html) Hi there, I'm trying to develop an ActiveX-DLL which can be used to import data from a server over the network via a special protocol. But since this will be my first ActiveX-DLL I wanted to start with a few, simple tests. So I created an ActiveX-library "testStr32" in Delphi, publishing an object "StringOps" with two methods: "ReverseStr" sh...

Api to skydrive delphi or delphi.net
Dear Good afternoon ... Does anyone have any idea or some documentation on how to implement or delphi.net via delphi api to access skydrive files. Thank you for your help. ...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

Web resources about - .net app using Delphi DLL - embarcadero.delphi.win32

Delphi - Wikipedia, the free encyclopedia
... an archaeological site and a modern town in Greece on the south-western spur of Mount Parnassus in the valley of Phocis . The site of Delphi ...

Delphi Automotive (@DelphiAuto) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Delphi Automotive @ DelphiAuto ...

Delphi Connect for Verizon on the App Store on iTunes
Get Delphi Connect for Verizon on the App Store. See screenshots and ratings, and read customer reviews.


Audi working with Delphi to develop autonomous car tech
Audi is developing an iPad-sized device that will pack all the necessary computing power for a self-driving car

US approves China company's acquisition of Delphi biz
The Committee on Foreign Investment in the United States has formally approved the acquisition of Delphi's global production of braking systems ...

Verizon And Delphi Officially Launch Vehicle Diagnostics Service - $250 For The Module, $5 A Month On ...
If you're a car nut, a paranoid parent, or a small business owner looking to do a little, uh, company vehicle economy analysis, Verizon's teamed ...

Watch out Google: Delphi gives Ars a ride in its self-driving car
The automotive components maker gave Ars a preview ride around the neighborhood. MOUNTAIN VIEW, CA—On Thursday morning I met with Delphi at its ...

The skinny on Delphi's autonomous road trip across the United States
Filed under: Green , Videos , Autonomous Last week, Delphi's autonomous car became the first to complete a coast-to-coast trip across the United ...

Delphi partners with WiTricity on automated wireless charging system
One could easily argue that parking between the white lines at any local hangout presents a challenge for some inexperienced drivers. So, why ...

Resources last updated: 1/5/2016 6:57:23 PM