delphi

Using records as property types in Delphi COM Wizard

Hi I am trying to design a COM library that uses a property to return a record. The Delphi COM Wizard allows me to create the property, but when it is compiled, I get [GENTLB Error] Project1.ridl(1): Error saving C:\Users\mark\Documents\RAD Studio\Projects\Test\Project1.tlb: Inconsistent property functions The RIDL file that is gene...

How to write a huge JPEG that exceeds the physical RAM using Delphi ?

Hi all, Here is the problem. I have a large set of 512x512 pixels JPEG tiles as regular jpg files. I have written a piece of software that does a bunch of things and does need to stitch all those files into a single huge JPEG at the end. First of all, I do NOT wish to use ImageMagick to do this, but perform it inside my software ! In...

Display message on query completion

I am querying a firebird database with a relatively complicated query that takes a while to execute and thought that it would be helpful if the user could get some form of feedback regarding the progress of the query. I intend to display a suitable 'please wait' message on a status bar when the query is started and clear the status bar w...

How do I register a system wide mime filter?

Hi all I've given the Delphi components from bsalsa.com a try. These include a mime filter so that I can have access to the HTML returned from a server before it reaches the browser. However this demo only filters browser instances in the current app whereas I need to register a system-wide filter. Can someone tell me how to do that?...

fmShareDenyWrite mode doesn't appear to work

I'm using a TFileSteam to open a log file. I would like to be able to read through this log file from other processes. I thought the fmShareDenyWrite mode would allow this. However if I try to open the file from other processes, I get an error. For example, if I try and type the file from the command line, I get "the process can not acc...

is there a way to update or insert TADOQuery from TADOQuery1

i have nou 2 query´s TADOQuery and TADOQuery1 and i wouth like to update TADOQuery record´s from TADOQuery1 via code is it possible ?? they have the same field´s Thank´s Ml ...

How to draw crosshatches on a TCanvas and specify the background color

I'm trying to make a "blank" background to place an image on top of. It's not too difficult to create crosshatches by placing a TImage on a form and doing the following: image1.Canvas.brush.Style := bsDiagCross; image1.canvas.brush.color := clWhatever; image1.canvas.FillRect(image1.clientrect); This works, and I get a crosshatch patt...

How do I set a system-wide API hook in Delphi?

Does anyone know about system-wide API hooking with Delphi? I downloaded madCodeHook, but it doesn't have any source, so I don't want use it; I want to program it myself. I found an article on Code Project, but it is in C++. Please help me to write it in Delphi 2010. ...

Delphi: trouble calling function returning interface

I'm trying to call a function returning an interface from another unit; for instance consider the following: program intf_sb1; {$APPTYPE CONSOLE} uses myunit in 'myunit.pas'; var MyBL: ISomeInterface; begin MyBL := GetInterface; end. where the content of myunit.pas is as follows: unit myunit; interface type ISomeInterface = i...

delphi DataSnap 2010 Stream File working Sample

Hello To All: I am trying to stream an XML File from Server To Client using DataSnap, with the help of ldsandon, i was able to download the sample from embarcadero, but my problem is I cannot follow it. a pseudo of the program should work this way. client will request from the server for selected xml file in the combobox. the server w...

The connection does not timeout while downloading file from internet

Related to a post of mine ( http://stackoverflow.com/questions/3122306/how-to-retrieve-a-file-from-internet-via-http ) about how to easily and robustly download a file from Internet, I have found a possible solution - however is not working as it was supposed to work. According to MS documentation, the code below is supposed to time-out...

how to step into RTL/VCL using Delphi 7

When debugging using the Delphi 7 IDE how can I step into code in the program files/borland/delphi7/source folder? Sounds like a dumb question, but inquiring minds want to debug. (not that I think anything is wrong with the source, I just want to know why for the 9000th time I can't assign a TJpegImage to a TjpegImage). ...

Can I Eliminate Extra Unicode String Calls (Delphi)

I'm using Delphi 2009. In my program, I have been working very hard to optimize all my Delphi code for speed and memory use, especially my Unicode string handling. I have the following statement: Result := Result + GetFirstLastName(IndiID, 1); When I debug that line, upon return from the GetFirstLastName function, it traces into ...

Is this a bug (Windows API)?

I had a question about string normalization and it was already answered, but the problem is, I cannot correctly normalize korean characters that require 3 keystrokes With the input "ㅁㅜㄷ"(from keystrokes "ane"), it comes out "무ㄷ" instead of "묻". With the input "ㅌㅐㅇ"(from keystrokes "xod"), it comes out "태ㅇ" instead of "탱". This is Mr. De...

How Can I Get Around this EOutOfMemory Exception When Encoding a Very Large File?

I am using Delphi 2009 with Unicode strings. I'm trying to Encode a very large file to convert it to Unicode: var Buffer: TBytes; Value: string; Value := Encoding.GetString(Buffer); This works fine for a Buffer of 40 MB that gets doubled in size and returns Value as an 80 MB Unicode string. When I try this with a 300 MB Buffer...

Delphi 7 / Soap / Xampp. I need a good Hello World tutorial

ok, I started a bounty (and may up the points). Please read the question. It's not so much the coding as the configuration, and I have not yet found anywhere that explains that. I have read a bunch of tutorials, believe that I grok SOAP conceptually but am still having problems getting it to run. I think that I am ok with the coding,...

How to pass string indexes for OleVariant

Hi I'm converting the following example code to Delphi: http://msdn.microsoft.com/en-us/library/bb176406%28v=office.12%29.aspx My code is something like: var vTable, vRow: OleVariant; begin .... while vTable.EndOfTable = False do begin vRow := vTable.GetNextRow; sEmail := vRow['Email1Address']; ShowMessage(sEmail)...

Tool to enforce Delphi coding standards

I need an analysis tool that will help to enforce coding standards for our Delphi codebase. A few colleagues have suggested the following tools: Code healer Pascal analyzer I've had a look at these tools and they aren't suitable. I was hoping to find a tool for Delphi that is similar to CheckStyle for Java or StyleCop for C#. Any ...

Delphi 2010 freeze on start-up

I've set up trial Delphi 2010 for the testing. After some days it is started and freeze. I just can see web-page with "how-to-buy" and at the right side last edited project. But Delphi's window do not react on any mouse events. I've tried to reinstal and repair it. So... What I have to do? May be that project have bad files or some set...

Delphi - Update field in a dbGrid while selection is on another row

Hi, I got a dbGrid with X rows. I want to update a field-value in the second row with a timer (for example, show a countdown). Thats no problem, but I want to be able to change the selected row and keep updating the second row. When the selection changes in the grid, the current record of the connected dataset changes as well, and that...