Got it. I must have messed up memory when I did something wrong cause it is working like a charm now.
Thanks to everyone for the help and ideas.
halveb
Okay I ma getting close. Using the first piece of advice I received from hilfy I was able to get the call to the DLL to work.
function utlapi(var func:LongInt; DataString:string; var Length, RetC, Xtra1, Xtra2:LongInt):LongInt; stdcall; external 'PCSUTL32.DLL';
This is my call to the DLL...
I did a search on Memory Block and saw a post you had written about sharing memory between applications. I haven't read it in detail yet but it looks as though you are dealing with passing pointers.
In this particular instance the DLL needs the string to be passed by value not by reference...
Thanks Hilfy that explains why the SetLength didn't work. I you could be right but I tried assigning 8000 spaces to the variable I send and it didn't work. I need to find out what the VB code does with the following variable definition:
Global hllData As String * 8000
It is most definetely a...
I am calling a DLL where one of the parameters is a fixed length string (of 8000 bytes). In Visual Basic a fixed string can be dimensioned so that the string will always be of that size.
Is there a way to do this in Delphi?
I have tried using the SetLength(string, size) function but this...
Oops, I don't have a header file nor the utilities to create a lib from the DLL. :-( I don't do any C programming other than calling DLLs from VB and now hopefully Delphi.
I have a DLL that I currently call successfully from a Visual Basic program that I cannot seem to get defined properly in Delphi. I am new to Delphi and I suspect that the different variable types are what are causing my problems. The code declaring the DLL in VB is as follows:
Declare...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.