delphi

I'm having problems with WaitForDebugEvent EXCEPTION_DEBUG_EVENT

I'm starting an Explorer.exe instance with CreateProcess (flags NORMAL_PRIORITY_CLASS + DEBUG_PROCESS + DEBUG_ONLY_THIS_PROCESS), and then I'm doing this: procedure FakeDebugProcess; var wDebugEvent : DEBUG_EVENT; begin fillchar( wDebugEvent, sizeof( wDebugEvent ), 0 ); repeat if WaitForDebugEvent( wDebugEvent, INFINITE ...

Problem using TEncodedStream with a Tstringlist

HAving this procedure (DELPHI 2010): procedure TfrmMainApp.ChangeLogon; var EncStr: TEncodedStream; // from M.Cantu, see below LogonName : tUserName; LogonPW : tPassword; MessageString: string; begin if MessageDlg('You are about to change the login to the Connection server. Do you wish to continue?', mtWarning, [mbYes, ...

how to write and execute a thread

i have never worked with threads before,so now im trying to creata a thread with a query to check database status,the query is as follow: select (*) as DBCount from v$datafile where statua in 'OFFLINE'; this query returns the total number of all the databases that are offline so i want to create a threa in delpi that will execute this q...

How to pass exception from one thread to another (caller's) thread in Delphi?

Hi again! I have another question! Please look at this example: // There is a class with some method: type TMyClass = class public procedure Proc1; end; // There is a some thread class: TMyThread = class(TThread) protected procedure Execute; override; end; procedure TMyClass.Proc1; begin // this method is just ...

How can I read the DOCTYPE SYSTEM identifier with Delphi?

For a document which has a DOCTPYE declaration like <!DOCTYPE RootElement SYSTEM "file.dtd"> Delphi 2009, using MSXML, reports that the systemId is empty (""): Assert(Doc.DOMDocument.doctype.systemId <> ''); // fails! while Assert(Doc.DOMDocument.doctype.name = 'RootElement'); // ok correctly verifies that the DOCTYPE name id "...

Delphi .res file changer

Hello, I'm looking for a ready-to-use piece of code that would be able to read and modify Delphi .res files. The thing is that I need to create an application that will be compiling many Delphi projects at once (using the dcc32.exe file). However, it is necessary for me to change file version and language before compilation, and as far a...

how to check if scheduler backups ran successfully

on each of our remote servers a scheduler task is created that calls an .exe program that shuts down the databases at 10:00:00 everyday (it create database backups)and start it up again at a specific time.now using the delphi application i need to now how can i check if the scheduler task backups were ran successfully(database shutdown a...

How to use TBBMM in Delphi IDE and compiled application

Hi, I learned that TBBMM seems to have better performance than FastMM. FastMM is default memory manager in recent release of Delphi IDE. However, I find not much information regarding the deployment of TBBMM for Delphi users. How may I replace the default memory manager in Delphi IDE and the compiled application? ...

Is it possible? TCollection descendant to implement storage of TPanel containers with arbitrary content

I'm new to component development in Delphi, therefore want to know, is it possible to implement my task at all. I need to create a visual component (user control) based on TScrollBox, which will represent a bunch of TPanel, all that panels will be aligned as "Top" inside that TScrollBox and can have different Height. It has to act as TC...

Delphi: Maintainability Virtual vs Virtual Abstract

I was writing a bunch of code a few months ago and now I'm adding stuff to it. I realized I wrote a bunch of functions that descend from a class that has about 2/3rds of its functions abstract and the remaining 1/3rd virtual. I'm pretty much sick of seeing: function descendent.doSomething() : TList; begin inherited; end; when I...

Why sometimes png transparent icons are not transparent with Delphi 2010?

I have a D2010 app with theme support enabled. Is using a TToolbar + TImageList with this setup: ColorDepth: cd32bit DrawingStyle: dsTransparent When run from Delphi, or the folder where is generated the exe the icons are transparent. When I move to another folder or install in another folder, the icons are show with a gray background...

Delphi DLL / Form communication

I have embedded a form in a DLL and can call the DLL and show the form and return various functions from the DLL back to the main app, however I cannot figure out how to get the DLL to trigger events in the main applications form. For example in the main app I have a dataset and I want to have a button on the form in the DLL to goto a ...

Periodicall popup form

Hello. I should implement periodically popup form at other form. This popup form isn't common design, so I couldn't use standard messages. I need implement smoothly showing\hiding of this popup form. Now I use timers for hide\show this form, but have strange problems. If I run only Show\Hide popup form process all is OK, but when I try ...

Wrtiting string to TMemoryStream - Pointer to string

What is the difference between this: SourceString := 'I am doing just fine!'; MemoryStream.ReadBuffer(Pointer(SourceString)^, xxx); (full source code available here: http://edn.embarcadero.com/article/26416) and this code (mine): SetLength(SourceString, xxx); MemoryStream.ReadBuffer(SourceString[1], xxx); Do I really hav...

Odd one: @myRecordArray[0] returns invalid pointer if array size is bigger than 4136

hello stack, this is really strange, i have an array in delphi and fill it with directX matrices. then i get the pointer to the first element and pass it via com to c# managed code: function TMPlugTransformInPin.GetMatrixPointer(out SliceCount: Integer; out ValueP: Int64): HResult; var matrices: array of TD3DMatrix; i: Integer;...

Symbol eliminated by linker (Delphi)

Help! I am receiving this error when viewing the contents of an inbound function parameters in my Delphi 4 application. The code calls a function in a dll with 3 parameters (app.handle, pchar, boolean) The declaring function is in externs.pas and declared as: function AdjustVoucherDifference(hOwner :HWnd; Receipt_ID :PChar; bCommit...

Delphi, List Index out of bounds

I have a TListBox on a form, and items are added with listbox1.ItemIndex := listbox1.Items.AddObject('msg', TObject(grp)); grp is an integer, The listbox is set to lbOwnerDrawFixed In the onDrawItem event i get the Exception EStringListError raise on the marked line msg := (control as Tlistbox).Items.Strings[index]; <-- this line ...

A rather complicated Windows 7 64 bit to windows 32 bit server file locking issue

Possible Duplicate: Delphi Using LockFile on windows 7 64. Hi All. I have found that if you open a file that resides on 32 bit server in a share folder from a 64 bit windows 7 machine, read it, lock it and then open it again. When you close all open handles the file actually remains open. The exact steps are: Place a file...

Is there a way to migrate Delphi 2010 forms into Delphi Prism (.Net ) XE forms?

I know that since "native" delphi and delphi.net are different technologies it is unlikely to produce a tool that can migrate your old dfm forms to win forms for delphi prism. However is there a tool that facilitate such migration? Basically I have a "native" delphi project that I want to migrate to delphi .net, it is a desktop applicati...

Delphi: Running threads count

Hi everyone, I'm using delphi 2010, is there anyway to know running threads count of the project via delphi function or windows api? ...