Are delphi classes packed?


I'm working on a program that has it's roots in c++. In the c++ source, there is a class similar to: class Foo { unsigned char a; unsigned char b; unsigned char c[100]; ...bunch of class functions... } The class ...
Posted On: Thursday 22nd of November 2012 11:49:25 PM Total Views:  206
View Complete with Replies

RELATED TOPICS OF Delphi Programming PROGRAMMING LANGUAGE




Re: Delphi 2008 and current controls that are Unicode aware?

Rudy Velthuis [TeamB] wrote: > I do think there won't be many differences between a version that uses > WideStrings and one that uses the new UnicodeString. Is "Unicodestring" the new official name Is there any reading stuff available on this -- Arthur Hoornweg (In order to reply per e-mail, please just remove the ".net" from my e-mail address. Leave the rest of the address intact including the "antispam" part. I had to take this measure to counteract unsollicited mail.)
VIEWS ON THIS POST

75

Posted on:

Tuesday 16th October 2012
View Replies!

Re: Delphi 2008 and current controls that are Unicode aware?

Remy Lebeau (TeamB) wrote: > Actually, D2008 executables won't run on them at all, unless you install > MSLU separately. Er, AFAIK MSLU is a library that needs to be specifically linked into your applications. Will Delphi 2008 come with libraries that allow to do so -- Arthur Hoornweg (In order to reply per e-mail, please just remove the ".net" from my e-mail address. Leave the rest of the address intact including the "antispam" part. I had to take this measure to counteract unsollicited mail.)
VIEWS ON THIS POST

146

Posted on:

Tuesday 16th October 2012
View Replies!

compare searchResult1.FindData.ftLastWriteTime

"Squirrel30" wrote in message news:47fb9db2@newsgroups.borland.com... > why this is not comparable Because ftLastWriteTime is a FILETIME record, not a numeric type. Delphi cannot compare records how you are attempting. > and how to compare this kind of types Use the Win32 API CompareFileTime() function: if CompareFileTime(searchResult1.FindData.ftLastWriteTime, searchResult2.FindData.ftLastWriteTime) 0 then Gambit
VIEWS ON THIS POST

94

Posted on:

Tuesday 16th October 2012
View Replies!

Parent font

I'm subclassing a component (nlhRichEdit) to a) set the font to the parent and b) add borders. As part of it I need to get the parent font to apply it. I've created a classbasedonTComponent publishing Font so I can get at it but itisn't available in nlhRichEdits constructor. Where is the right point to get this info and apply it Roy Lambert
VIEWS ON THIS POST

65

Posted on:

Tuesday 16th October 2012
View Replies!

Updating remote server software, how?

Bo Berglund wrote: > I have a service program running on a PC to handle site monitoring > (unattended). I can reach the server via a client program through > TCPIP socket communication. The remote site has DSL and a > firewall/router that is set up to let a single port through. > Via this I can control the monitoring and configure what to schedule > etc. > > However, I have now run into a problem I need to solve: > How do I update the software on the running server > > I can upload files to the server via the socket interface, but this > does not include the server executable because it is running. And if I > shut it down I no longer have a communications channel. :-( > > Is there any good ideas how to accomplish a software update of my > server program that is fool-proof > The server must not go down, because if it does someone has to travel > to the site and restart it. > How does these programs which have a built-in update function do it Updating a running service requires a second program running on the same PC. You would upload the new version of the service, using its communication channel, to a known location (perhaps using a different file name). Then you send a command to the service that causes it to start the second program (a console process or windowless GUI program). This program opens the service control manager and instructs the service to stop itself (which will of course break the communication channel). Once the service is stopped the program can replace the service executable with the uploaded version through a simple file copy and then restart the service. Your client would need to wait a bit during this process and then try to establish the communication channel again. The APIs you need are OpenSCManager, OpenService, ControlService, StartService if memory serves. Check the API docs. Theoretically you can manipulate a services state from another machine, but any sensible server will have that blocked. -- Peter Below (TeamB) Don't be a vampire (http://slash7.com/pages/vampires), use the newsgroup archives : http://www.tamaracka.com/search.htm http://groups.google.com
VIEWS ON THIS POST

130

Posted on:

Tuesday 16th October 2012
View Replies!

How can I share code or create a static library in Delphi ?

I have two related projects in my project group (Delphi 10, BDS 2006) that share a number of files, in a tree like this: ProjectGroup - Common - Utils.pas - ZLib.pas - Components.pas - GraphicApp.exe - MainApp.pas - GUI.pas - ConsoleApp.exe - MainConsole.pas - CLI.pas Now GraphicApp and ConsoleApp projects both use files in project Common. I would like Common to be some sort of a library project, library that GraphicApp and ConsoleApp would depend on. Does Delphi have native libraries Or can I set it somehow to output even a C++ like .lib file, and then use it in my other projects But I would still like to have types and forms in my library, and I am afraid this is hard to do with a .lib file I tried to create project Common as a package project, but then it would create a run-time file Common.bpl which works kind of like a ..dll, only in a Borlad - specific format. Meaning it has to stay near the executable, which my clients might not like, or be included in the system's PATH variable. I do not want any dll or dynamic libraries, I only have a number of source files that I want to use in both projects and what I need is a static library or some object files of some kind. Can I create a package like a static library, that would be linked in at compile time Does Delphi have a native static library format Or can I have some kind of project that just compiles the .pas files to .dcu files and then puts them somewhere, where I can use them in the other projects Every kind of project I saw wants to output some sort of executable, different than the .dcu files. Kind regards, Timothy Madden
VIEWS ON THIS POST

170

Posted on:

Tuesday 16th October 2012
View Replies!

Memory usage when images are created

Eureka report some memory leak problems for this procedure: procedure TEffectForm.FormCreate(Sender: TObject); begin Applied:=True; bDib:=0; IsInPalette:=False; PalCombo.ItemIndex:=0; Closing:=False; Ilr:=TILRubberBand.Create(Self); InProc:=False; WhatMotion:=1; brShapeCombo.itemindex:=0; RShape:=3; FImage :=TILPImage.Create(Self); with FImage do begin Parent:=Panel5; Align:=alClient; ILD.DibBitmap:=nil; OnMouseDown:=Image1MouseDown; OnMouseMove:=Image1MouseMove; OnMouseUp:=Image1MouseUp; OnPaint:=Image1Paint; // FStretched := False; end; PasteFImage :=TILPImage.Create(Self); with PasteFImage do begin Parent:=Panel16; Align:=alClient; ILD.DibBitmap:=nil; Visible:=True; Enabled:=True; // FStretched := False; end; ShapeImage1:=ShapeImage.Create(self); with ShapeImage1 do begin Parent:=Panel5; Left := 0; Top := 0; Width := FImage.Width; Height := FImage.Height; Color := clBtnFace; Visible:=False; end; bDib:=0; MaskColor:=clBlack; BackGroundColor:=clBtnface; ForeGroundColor:=clBtnface; iX:=0; iY:=0; iXX:=FImage.Width; iYY:=FImage.Height; InProc:=False; OldHint:=Application.OnHint; Application.OnHint := DisplayHint; IlPagesChange(nil); FIniFileName :='Filtre.Ini'; bFXN:=True; end; Indeed, Images are created when the form itself is created but they are released when the form is Closed & Detroyed: ... FImage.Free; PasteFImage.Free; ShapeImage1.Free; ILR.Free; ... Moreover, i do obseve (in task manager) a great deal of memory lost (or kept by the process) each time i use this code. Is it a normal situation dealing with pictures or is it just the way task manager deals with memory - a rather imprecise measure of the programs actual memory use
VIEWS ON THIS POST

128

Posted on:

Tuesday 16th October 2012
View Replies!

Find the nearest value of an array

, To avoid reinventing the wheel I would like to know in Delphi if such function exists : Let's say I have an array of integer of N values, I have an integer X I need something like Function GetTheIndexOfTheArrayThatHasTheNearestValue(ValueTocompare:integer):integer;
VIEWS ON THIS POST

262

Posted on:

Tuesday 16th October 2012
View Replies!

Creating Trial Software

I'm looking for a tool that will modify my 32bit exe and create a trial version. A long time ago, I used an application called SoftSentry, that would modify my exe by placing a stub on the program that would check to see if the program is still in "trial" mode. The application would allow me to set the number of days or executions of the application, then the user would be prompted with a message. What is the best tool on the market to allow the same funcationality
VIEWS ON THIS POST

84

Posted on:

Tuesday 16th October 2012
View Replies!

Why are Build events not tied to the specific configuration name?

OK, one of the actually nice things about Delphi 2007 is the ability define different build configurations. Delphi comes with "Release" and "Debug" as default configurations. This is very nice. However, these new Build Events that some people seem to be excited about seem to be *global* and not tied to the build configuration. In my application, I want to create a new build configuration called "Final" which is similiar to Release except that I want it to run my Armadillo copy protection wrapper on the final EXE file. I do *not* want to run this when using the Debug configuration. Is there a way to do this Otherwise Build Events seem somewhat pointless to me...I can just stick with my existing BAT file that does my automatic build.
VIEWS ON THIS POST

72

Posted on:

Tuesday 16th October 2012
View Replies!

Label which displays ... when its clipped by parent control

Hi ! Is there a component for it/does anyone know how to make a TLabel which displays "..." (3 points) at the end when it is clipped by a parent control Like: ________________ This is very long text |which goes over the border. instead: ________________ This is very long t... | I have multiple labels in a group box (and on some forms) and I'd like to show ... at the at the end of the text if the label text is too long to be displayed correctly. When the user hovers over the label with the mouse, I'm going to display the contents in a tooltip. Any ideas
VIEWS ON THIS POST

197

Posted on:

Tuesday 16th October 2012
View Replies!

are there hotkeys for setting and navigating through code?

are there any hotkeys for setting and navigating through code in the source editor for D7
VIEWS ON THIS POST

84

Posted on:

Tuesday 16th October 2012
View Replies!

A Proposed Fix for DateUtils' Date-Time Compare Functions

After a lot of study and testing, I have filed the QC report #56957, titled "A Fix for DateUtils Date-Time Compare Functions", with sources for a program which tests suggested fix to the DateUtils module. For the details, see http://qc.codegear.com/wc/qcmain.aspxd=56957 For those readers just interested in examples of the changes proposed, here are some extracts from the code attached to the QC report: function DateTimeToMilliseconds(DateTime: TDateTime): Int64; { Converts a TDateTime variable to Int64 milliseconds from 0001-01-01.} var ts: SysUtils.TTimeStamp; begin { Call DateTimeToTimeStamp to convert DateTime to TimeStamp: } ts := SysUtils.DateTimeToTimeStamp(DateTime); { Multiply and add to complete the conversion: } Result := Int64(ts.Date)*MSecsPerDay + ts.Time; end; function MillisecondsToDateTime(Milliseconds: Int64): TDateTime; { Converts an Int64 milliseconds from 0001-01-01 to TDateTime variable.} var ts: SysUtils.TTimeStamp; begin { Divide and mod the milliseconds into the TimeStamp record: } ts.Date := Milliseconds div MSecsPerDay; ts.Time := Milliseconds mod MSecsPerDay; { Call TimeStampToDateTime to complete the conversion: } Result := SysUtils.TimeStampToDateTime(ts); end; function TruncDateTimeToMinutes(DateTime: TDateTime): LongInt; { Truncates a DateTime to minutes from 0001-01-01. } var ms: Int64; begin ms := DateTimeToMilliseconds(DateTime); Result := ms div (60*1000); end; function MinutesBetween(const ANow, AThen: TDateTime): integer; var nnNow, nnThen: integer; begin { Substitutes DateTimeToTimeStamp and TimeStampToMilliseconds, TruncDateTimeToMinutes for use of Trunc function. } nnNow := TruncDateTimeToMinutes(ANow); nnThen := TruncDateTimeToMinutes(AThen); Result := nnNow - nnThen; end; --JohnH
VIEWS ON THIS POST

60

Posted on:

Tuesday 16th October 2012
View Replies!

Where is Delphi IDE getting the "Parent Font" from?

When I am designing a form in D2007, I set the ParentFont property of a form to True and it changes the Font of the form to "Tahoma 8pt". This was the correct default System font on Windows XP. But ...
VIEWS ON THIS POST

95

Posted on:

Saturday 10th November 2012
View Replies!

Stack overflow when setting PopupParent

In the D2006 code below I am getting an EStackOverflow exception on the line setting PopupParent. Why would that beI tried using Nil instead of Application for the form create but the problem remains. frmMail:= TfrmMail.Create(Application); try PopupParent := Self; ...
VIEWS ON THIS POST

117

Posted on:

Thursday 15th November 2012
View Replies!

Shared Packages

, I made 2 VCL components to use in my application, each of the two has a package named XmlReader in their uses clause, however when I try to load the main application that uses both VCLs I got the ...
VIEWS ON THIS POST

56

Posted on:

Thursday 15th November 2012
View Replies!

What date-time features and tools do you care about?

Dear Programmers, In order to improve programmer tools for date-time calculations, it would be good to know what programmers care about in this area. Your answers to the following questions might help. (0) Do you care about having ways to ...
VIEWS ON THIS POST

174

Posted on:

Thursday 15th November 2012
View Replies!

DLL and CreateParented

I have a form in a DLL that when created is placed into a panel in the host app. In the DLL I'm creating it like this: procedure ShowDLLForm(hParentWnd: HWND); stdcall; export; begin if pnlfmOCTInterp = Nil then try FParentWnd ...
VIEWS ON THIS POST

59

Posted on:

Thursday 15th November 2012
View Replies!

TStaticText and Transparent

Hi! Why is the TStaticText not shown transparently on the TImage The Transparent property is TRUE, Delphi2007 (CodeGear RAD Studio 2007 11.0.2804.9245). screenshot: http://img120.imageshack.us/img120/1...tictextun3.png (9 Kb)
VIEWS ON THIS POST

61

Posted on:

Thursday 15th November 2012
View Replies!

Re: Capture poker software data

On Sun, 25 Nov 2007 20:50:02 -0700, "Craig" wrote: >Anything that says Firewall setting etc No, nothing. -- Replace you know what by j to email...
VIEWS ON THIS POST

95

Posted on:

Thursday 22nd November 2012
View Replies!