delphi

How to specify MSbuild output folder?

Hi, When I execute delphi 2009 project using MSBuild command line, output always goes to C: drive C:\MyProjects>MSbuild "C:\MyTestProject\Test.dproj" /t:Build /p:OutDir="C:\Output\bin\" Why is this happening? Thanks & Regards, Pavan. ...

Deadlock when closing thread

I created a class that opens a COM port and handles overlapped read and write operations. It contains two independent threads - one that reads and one that writes data. Both of them call OnXXX procedures (eg OnRead or OnWrite) notifying about finished read or write operation. The following is a short example of the idea how the threads...

Does a lock-free queue "multiple producers-single consumer" exist for Delphi?

I've found several implementations for single producer-single consumer, but none for multiple producer-single consumer. Does a lock-free queue for "multiple producers-single consumer" exist for Delphi? ...

Delphi - XML - childnodes - getting attributes

I am trying to get the correct data from a twitter atom/xml feed. I have the twitter data in a txmldocument and am trying to get some specific information from it. Here is a truncated example of the data: <entry> <link type="text/html" rel="alternate" href="http://twitter.com/blub/statuses/1501068" /> <title>title of twitter post ...

Why are my transparent images used in a Delphi 2009 Ribbon not transparent on runtime?

I just played around with the new Delphi 2009 ribbon, added a few pages, groups and actionclients (large buttons) to it. I created some transparent 32x32px PNGs in Photoshop and put them into a TImageList (set to cd32bit). I added this list to the Actionmanager's Images property, to show them on the buttons. At designtime the icons in th...

How do I keep Windows Explorer from interfering with deleting a folder?

I've got a routine that deletes a folder and everything in it. After deleting all the files, the last thing it does is: if not Windows.RemoveDirectory(pname) then raise EInOutError.Create(SysErrorMessage(GetLastError)); Unfortunately, I tend to get an error from this if I have an open window in Windows Explorer displaying the folder...

How use html context sensitive help with Delphi 2007 - the basics

I use Help & Manual to create web help (HTML) files. I would like to link this to my Delphi 2007 application so that it pops up when users press the F1 key, and ideally, to pop up to a context sensitive spot. This is what I've tried: Adding the HTMLHelpViewer unit to the uses clause of the main form. Setting the HelpFile property to...

Firebird and IBCTable

Hello. I am trying the devart ibdac components but I am having a little issue with the IBCTable component. On tables with autoinc (trigger based) when I try to post the data it says that the field with the autoincrement must have a value, whereas if I use a SQL query to insert it everything works fine. Is there any workaround for this? ...

How to access the checked property of a Delphi 2009 ribbon button on runtime?

I want to reset the "checked" property of all TAction objects of a ribbon to false when clicking on any ribbon button and then only set it true on the pressed button. But I did not yet find a way to access all the "checked" properties of the ActionManager's Actions. I think I need to loop through the actionmanager's actionlist... however...

BDE multi-thread error: when encounter ora-12560, cannot restart TDatabase

We have a big program, using BDE + oracle, developed by delphi, We use 3 threads to do DB operations, they are using separated TSession. (1 deamon thread, 1 data collect thread, 1 checking thread) We use this structure: TQuery -> TDatabase -> TSession We use this method to do query: try qu.close; //TQuery qu.sql.clear; qu....

Access SharePoint objects from Delphi

Hello Guys, We need to read and write the objects in SharePoint, such as the appointments (events) in SharePoint, from Delphi, what's the best/easiest way to do it? Any advises are appreciated! Thank you. ...

Delphi + Indy: Connection closed gracefully

Using D7 + Indy 10 latest build. My code is using TIdSMTP to send email. I keep getting "Connection closed gracefully" at some end-users, and the email is never sent. The code is like: try ~~~~ ~~~~ _idSMTP := TIdSmtp.Create; with _idSMTP do begin Host := 'myhost'; Connect; try Send(_EmailMsg); Result := True; except ...

Finding availability by time

I have three tables. Table (t), a resource in my system. It has a maximum capacity. Booking (b), a reservation in the system, it hase FromDatimeTime, ToDateTime and nrOfPeople BookedTable (bt), connects the booking with table and how many seats that are used by this booking, a booking can have more than one table. The problem is tha...

extents of Google map

Hi, I have a Delphi application which loads a Google map in a TWebBrowser: with WebBrowser1.Document as IHTMLDocument2 do with parentWindow do ExecScript('map.setCenter(new GLatLng(51.15917, 4.13889),10)', 'JavaScript'); Any idea of how to get the extents of the map in my application? TIA Steven edit Rob's answer points to a pa...

A proper way of destroying a TThread object

This question may seem trivial, but I hope you won't ignore it. Before destroying a TThread object it is usually necessary to wait until the thread that called the TThread.Execute() method finishes, for only then can we be sure that, for instance, the objects destroyed inside the class's destructor are no longer accessed. Therefore it is...

Problem in consuming WCF service (basicHttpBinding) in Delphi Win32 Client

I am trying to make a Delphi client (Delphi 2006) to communicate with a service written using WCF. Service is damn simple with just one function. Technically like below: [ServiceContract (Namespace = "http://www.company.com/sample/")] public interface IService { [OperationContract] string GetNumber (string name); } I have host...

Best Practice in Delphi Rapid Application Development in term of Reusability

How to improve our productivity when starting new project using Delphi? For me, I create a template project including splash screen, primary data module with default component and all data-aware subroutines (open, close, query, default when failed to open DB, etc), and save the template in my repository. (I use all my own frames and uni...

Sending a binary stream through SOAP.

I have a "simple" task. I have an existing project with a web service written in C# which has a method that will send a huge XML file to the client. (This is a backup file of data stored on the server that needs to be sent somewhere else.) This service also had some additional authentication/authorization set up. And I have an existing D...

Framework/approach to use for 'alerter' type applet?

A client has a lashed-together 'alerter' system based around batch files and 'NET SEND' commands. He edits the batch files (adding/removing users) as necessary. His requirements are getting a bit more complex now; he wants users to be able to drop in and out of the notifications, during the day. I got to thinking about some kind of tray...

Calling Specific Win32 API from Delphi - Why do Exceptions Fly Without an "asm pop..."?

I'm using Delphi to make an XLL add-in for Excel, which involves making a lot of calls to the Excel4v function of xlcall32.dll. However, as I'm guessing very few Delphi experts here have worked with that specific API, I'm hoping that the problem might have been observed in other APIs too. In C, specifically in the xlcall.h file that co...