Calling Delphi 6 DLL from Delphi 2010
We have a Delphi 6 dll that has a PChar passed to it. The dll function then does a search and returns a PCHar. This works good using Delphi 6 to call and recieve the dll
result. We have upgraded our calling program to Delphi 2010 and most of the time, the value is passed back just fine. However, we do have times when we get an access
violation, when calling the dll. The dll does process the request. Below is the code. Has anyone had a similar issue using an older version Delphi Dll with Delphi 2010? I am sure that Unicode has something to do with it, but not sure how to fix th...calling a c++ dll from a delphi vcl app crashes the app upon exit [Edit]
I am using RAD Studio 2010 and I downloaded the latest updates. Since I can't see how I can attach a file to the message, I included in this message the source code for each file:
To reproduce this problem follow these steps:
Create a project group with two projects, one c++ dll project and one a Delphi VCL forms project. Save all the files in the same folder.
1. Use the wizard to create the c++ dll project, select c++ & Use VCL checkboxes. Make sure Project Options->C++ Linker->Dynamic RTL is set to true. I also added memmgr.lib and sharemem.obj to the project but I bel...Calling Java 8 app from Delphi
I have been using the procedure below to call a Java program for years. For
some reason it no longer works after the machine is upgraded Java 8u25. If
fails when it tries to create the process. Any idea of why it would not
work with Java 8? Note if I paste the same command line I use in the Delapi
XE6 application into a CMD prompt or downgrade to Java 7 it works just fine.
Is there a modification to the WinExecAndWait procedure I need to make?
function WinExecAndWait32(CommandLine: string; ShowWindow: Word): DWORD;
procedure WaitFor(Pr...Java Application calling Delphi DLL
I have a DLL that doing some staff with a Form written in delphi 2006. This
form have some events also. I prepared .NET application. While calling
Delphi DLL, Im sending events also from .NET to Delphi DLL. When event
occures in Delphi DLL, I can trigger same event from .NET
application(written in VS) I think this is called callback functions.
Now I have to do same thing in Java Application. Is there anybody know how
can I do that? Is there any source to read?
Gurcan YUCEL wrote:
> I have a DLL that doing some staff with a Form written in delphi 2006. Th...Trying to call a .DLL from Delphi XE (used to work with Delphi 6 :-) )
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 ...jni delphi dll vs java app
i have wierd problem , i have dll writen in delphi with jni and console java app . All comunication looks like work but dll can't crate form. But if i put showmessage in some export functions form go one . The structure :
function start - create hiden form
body of start function in dll with jni
SetWindowLong(Application.Handle,GWL_EXSTYLE,ExtendedStyle or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
Application.MainFormOnTaskbar := false;
Application.CreateForm(TForm1, ...Calling C++ DLL call from Delphi
I have C++ DLL setup that exports the following function:
bool ApplyRule(HANDLE DriverDevice, std::string *Path, PROTECTION_TYPE Type, PROTECTION_ACTION Action, bool Architecture64, bool AddRule)
I am not sure how to convert it properly to delphi, inparticular the std::string parameter.
ApplyRule : function (DriverDevice : THandle; Path : ????; Kind : PROTECTION_TYPE; Action : PROTECTION_ACTION; Architecture64 : Boolean; AddRule : Boolean) : boolean; stdcall;
Thanks for the help.
Chris Nillissen wrote:
> I am not sure how to convert it properly to delphi,...Delphi dll
I'm developing a dll file in Delphi 7 in order to use it in a Powerbuilder
10.5 application. I get strange results in PB when i try to pass a string
through a function or procedure. I've tried pchar, pwidechar, lpstr, lpctstr
in D7 and string or REF string in PB, but nothing seems to be working
properly. The function in D7 is quite simple, i just take a string for
input, encode it and return an encoded string for output. In PB i get a lot
of "squares" in my output string. There seems to be a problem reading (from
PB) the memory address that is pointed out from D...call Delphi-DLL
I wanted to call a DLL functions written in Delphi (Pascal).
To call the DLL functions I built a Nonvisual-Userobject
nvu_call_delphidll in PB6.5 . The PB external function declaration is:
FUNCTION long pas_getMin (long x, long y) LIBRARY "MyLib.dll"
In the Userobject the code looks like:
public function long uf_getmin (long al_x, long al_y);
returnval = pas_getmin(al_x, al_y)
The Delphi 3.0 code for my test DLL is:
function pas_getMin(x,y: integer): integer;
if x < y then pas_getMin := x
else p...delphi Win32 using delphi .NET dll
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
I also found this..
"The problem is that, wehn you instal...Delphi XE7 call Java Class, JAR, such as the example of Zxing call
Delphi XE7 call Java Class, JAR, such as the example of Zxing call
Generate interface files with Java2pas:
Am 14.09.2014 10:08, schrieb ww6 wuxu:
> Delphi XE7 call Java Class, JAR, such as the example of Zxing call
I assume this is some Android related question?
If that's the case and the other posted reply isn't yet what you want...Calling a C++ DLL from Delphi
I use C++ as my main language and nedd to test some stuff with delphi.
I have to call a C++ DLL from Delphi. The C++ header is this.
class _declspec(novtable) OwnerOfMain
virtual void __stdcall DoStatus(long type, long value)=0;
class _declspec(novtable) Main
virtual void __stdcall Delete() = 0;
virtual const wchar_t * __stdcall GetTitle() = 0;
virtual void __stdcall SetTitle(const wchar_t *) = 0;
virtual bool __stdcall Startup(OwnerOfMain *mainOwner)=0;
void operator delete(void* p)
Main* w = static_cast<Main*>(p)...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,
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...Calling Delphi DLL from C#
We have a delphi application that loads the dll dynamically and calls a couple of functions in a Delphi DLL using Load Library, GetProcAddress, and FreeLibrary and all works fine. The DLL is going to be called by a C# application developed in VS 2010. I have the C #code below to test sending and receiving data from the dll and it works ok, but when I close the application or try to resend data, I get an access violation.
Do I need to make the calls to the dll using the Load Library, GetProcAddress, and FreeLibrary as well. If so how would I code this in C#? Also I am wondering if I n...