I am trying to call a Delphi function from C# ASP.NET code. The function's declaration looks like this:
function SomeFunction(const someString, SomeOtherString: string): OleVariant;
From my C# code I have this code:
[DLLImport(MyDLL.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
public static extern obj...
Ive written a program that communicate with some hardware using a serial connection.
It sends a lot of hexadecimal values my way (sensor readings) and every once in a while it sends a negative value.
ex.
i receive a hexadecimal value : FFFFF5D6
and i have to convert it into : -2602
another problem i have is that i can't convert a float ...
How can I implement a close button for a TTabsheet of a TPageControl like Firefox?
Edit:
Delphi Version: Delphi 2010
OS: Windows XP and up
...
How can i enumerate systray icons including the tooltips in delphi?
Thanks in advance for your help.
...
My company's main product is a large monolithic C++ application, used for scientific data processing and visualisation. Its codebase goes back maybe 12 or 13 years, and while we have put work into upgrading and maintaining it (use of STL and Boost - when I joined most containers were custom, for example - fully upgraded to Unicode and t...
I need to preview several CAD formats in the file open dialog box in Windows 7 / Vista. In the past I used a Delphi Preview Open Dialog and I could register and implement the CAD format that I had to preview. I have found some articles on how to create a preview handler in Vista, this is unfortunately not going to work for me. What I wou...
What is TApplication.Handle?
Where does it come from?
Why does it exist?
And most importantly: why do all forms have it as their parent window handle?
The Delphi help says:
TApplication.Handle
Provides access to the window handle
of the main form (window) of the
application.
property Handle: HWND;
Description
...
Hi,
I have a .NET application that is launched via a Delphi program using ShellExecute. Unfortunately when launched in this manner, the application does not seem to be reading its app.config file correctly, as if the file did not exist.
I have tried testing the application in other scenarios, e.g. calling from a shortcut with the the w...
Hi,
I have a problem setting null to a variant field using rtti.
Suppose I have class like this:
TClass1 = class
Field1:Integer;
Field2:Variant;
end;
when I get access to a Field1 I can do:
Field.SetValue(TObject(ValueObject.AsObject), 1);
but it seems I can not do this with Field2:
Field.SetValue(TObject(ValueObject.AsOb...
Possible Duplicate:
Converting float or negative integer to hexadecimal in Borland Delphi
Is there a function i can use to convert a floating point value to a hexadecimal value and back?
...
Delphi 2006. XML Data Binding.
Generate this class:
type
IXMLItem = interface(IXMLNode)
['{10B9A877-A975-4FC7-B9EF-448197FA1B90}']
{ Property Accessors }
function Get_PartNum: TPartNum_Sku;
procedure Set_PartNum(Value: TPartNum_Sku);
{ Methods
end;
{ TXMLItem }
TXMLItem = class(TXMLNode, IXMLItem)
p...
I am using this unit in a Delphi 2010 application to tell me what Active Directory Groups a user is a member of.
I created a brand-new test vcl forms application, added the unit from that link, and made a little form with an edit box for the username, another edit box to hold the CSV separated list of groups, and a list box to hold the ...
How can I disable JEDI string property editor?
I have tried to disable these lines
// RegisterPropertyEditor(TypeInfo(TCaption), TJvHTLabel, 'Caption', TJvHintProperty);
in jvcl\design\jvCtrlsReg.pas then I have used the JEDI installer to do a full reinstall (with "rebuild packages" option active).
No success.
...
This is my first time using BalloonHints. I'm using Delphi 2010.
I'm not sure I'm using hints properly because in the following scenario, I get a hint with the same text twice: once as title, once as body. I've struggled for some time with this, also referring to other posts here, Delphi's help, and Cantu's example in D2009 Handbook.
I...
I have a complex transaction that saves data from multiple TClientDataSets in database.
One of those ClientDataSets always append data to underlaying table, eg. generate INSERT statements, regardless of where existing records came from.
I'm forcing inserts right now with:
// Create temp table, assign all target data,
// Empty targe...
I've just compared the Delphi 2009 VCL/RTL code to the 2010 one.
I noticed that there are many $IF DEFINED(CLR) conditional defines and they got more in the 2010 version.
I thought that these conditional defines have fall into disuse, since Delphi .NET has been discontinued. The VCL/RTL aren't really used in Delphi Prism? Or are they?
...
In our primary application, we have a form that will allow us to do cross tab analysis of data in four different ways. Presently, each analysis appears in its own page of a PageControl on the screen. Now, upper management would like us to add in a historical aspect to the form, which in other areas we would use a PageControl to do, but...
On my main form I have a TPanel containing buttons that act as a toolbar. I want to clone/copy this toolbar and the buttons and their funtionality to a second form.
Cloning the menu was simple using newmenu.merge(mainmenu). That was an excellent shortcut to duplicating a Tmainmenu.
But I am at a loss on how to easily duplicate my too...
Inside a c# application a c#-method with parameter is to be called from a delphi dll:
The C# method gets called, but the int param is not transfered correctly: some "random" value arrives.
The C#-method is passed to the delphi dll via a register method:
[UnmanagedFunctionPointer(CallingConvention.ThisCall)]
public delegate void...
How to detect inactive (idle) user in Windows application? I'd like to shutdown application when there hasn't been any input (keyboard, mouse) from user for certain period of time.
...