delphi

Using SecureZeroMemory in Delphi

I understand there is a SecureZeroMemory function in C. The function implementation is defined in <WinnNT.h> as RtlSecureZeroMemory function. QNS: How can SecureZeroMemory be used in Delphi? Did Delphi release a library that contains that function? I'm using Delphi 7. Windows.pas only has ZeroMemory but not SecureZeroMemory. ...

How can I reduce PageControl flicker in Delphi?

In Delphi 2009 I found that the flicker of a PageControl - which occurs during resizing of the form - can be reduced by setting its DoubleBuffered property to true. However if I add controls to the PageControl tabsheets, they will flicker regardless of their DoubleBuffered property setting. I have also tried with and without runtime the...

Draw a "TPanel" in WINAPI?

Hello, I want to extend an open/save dialog with a "drop-box" which should look like a TPanel (bevel). The code is already there - I use CreateWindowEx() with WNDCLASS name "Edit". I have searched for a solution to draw a TPanel (resp. a beveled STATIC) with pure WinAPI, but did not found anything. MS Spy++ tells me that a TPanel has ...

Why we need Delphi prism

What is the need to use delphi prism instead of Visual studio; i am a delphi programmer so i like object pascal but what else are that delphi prism have that other does not have ...

Creating a general SQL Query builder

what would be the best way to create a Query builder in delphi? I have devexpress quantum grid, so I can display data easily. ...

checking window service are working properly(urgent)

Sir..I am trying to check whether window service is working properly or not...i wrote code for that ..its working fine for local system ,but when i used this for remote system..its not working...plz help...code for that are as follows.. //Main Unit... ServiceWatcher := TService.Create(); ShowMessage('Hello ServiceWatcher'); //This ...

Delphi XE Unicode dealing with nchar(1) fields

Hello I'm using a dbGo TADODataset in Delphi XE to read data from a SQL Server 2008 table. All the string fields are nvarchar or nchar. The nvarchar fields map to TWideStringField with no problems. The problem is with an nchar(1) field, this maps to a TStringField fine but not to a TWideStringField - when I configure the field to be T...

Resize problem using AcroPDF in Delphi

I successfully added AcroPDF in my application. When a PDF needs to be displayed I create an instance of AcroPDF dynamically and insert it into a TPanel with align set to alClient. My problem is that when the Form/Panel is resized the AcroPDF does not follow. Only if a new file is loaded. I tried several solutions to no avail. What shoul...

does the observer implementation here has memory leak?

maybe i dont know delphi all that well, however i wish to ask you: at this site : http://blogs.teamb.com/joannacarter/2004/06/30/690 i found an implemetation of observer pattern based on iterface. when doing attach , there is a call to this: procedure TSubject.Attach(Observer: IObserver); begin if fObservers = nil then fObse...

Getting the OID or ID of an object through ActiveX in Delphi from InterSystems Cache

Hi I have got the following code in a button on a form, but I want to get the OID or ID value of the saved object so that I can load it directly later. procedure TFormMain.ButtonNewClick(Sender: TObject); var Employee: Variant; OId: Variant; begin Employee := Factory.New('Sample.Employee', True); if VarIsNull(Employee) or VarIs...

Delphi: TAdoQuery Memory Leak?

Hi, I'm developing as small diabetes program using Delphi 5 and ADO. I do a little query like this: function GetLowestGlucoseLevel(StartDate:string;EndDate:string): Integer; var Q:TADOQuery; begin try Q:=TADOQuery.Create(Application); //Separate unit, owner set to App Q.Connection:=dtMod.ADOCon; Q.DisableControls;...

How to make my program search specific folders for dependencies?

When my program opens, before any of my code actually runs, it will automatically attempt to load various DLLs whose functions it imports. It looks in the folder that the app is in, and then in a few specific places like \Windows and \Windows\System32. If I want to use some custom DLLs, but I don't want to clutter up the app's folder w...

[Delphi] What code would let me find the compiled executable's directory?

...Even when a user opens an application by double-clicking an associated file in a directory that's different from the executable. I've always used ExtractFilePath(Application.EXEName), but this function doesn't work as hoped in this circumstance. ...

Can I run programs using TCP/IP from within IDE and expect them to work?

Hi, I just ventured into writing my first socket based programs in Delphi 2010. I tried with Indy, no success, just even writing a simple client and server that could send packets. Then I used TTCPServer and TTCPClient, same results using the following 'simple as it gets' demos :- Emmbercadero TTCPServer demo Emmbercadero TTCPClient de...

Delphi: FastMM makes your executables bigger?

Hi, Does FastMM makes your executables bigger? I notice my app grows about 300-500kb, which is rather big for me. I already turn off the delphi compiler option to exclude the debug info, but the size doesn't change. I use the FastMM's FullDebugMode to on, is this affecting the size? But when I try to turn it off, it looks for libc, whic...

Best way to implement observer pattern in Delphi

I found different implementations of the observer pattern in Delphi, like: Sourcemaking Design Patterns and Delphi Hobbyist. In general, what is the best way to implement an observer in Delphi? I would say using interfaces because the code is more readable. ...

is there any good site for reference on how to translate C++ to Delphi?

i am confuse on how to translate this code: to delphi? char **szWords; // recognized words char ***szPhones; // recognized phones per word float *pScorePron; // pronunciation score float **pScorePronPhone; // pronunciation score of ...

How to improve the load time of Delphi TPngImageList (or TImageList)

Hi, I'm using a set of around 100 icons in my application, these are accessed using fixed refrence numbers and these numbers are also made available for the user to choose an icon. The three resolutions that are required are 16x16, 32x32 and 48x48. Each of these resolutions are held in a TPngImageList and I've created an 'icon library' u...

Finding out the physical path of an ISAPI dll

Hello, I'm converting a Delphi ISAPI dll to work better on IIS 7.0 and 7.5. The ISAPI used to read its configuration from the registry but I wanted to convert that to using the web.config file in the same folder. It worked fine with CGI but the ISAPI is another matter. I'm using GetModuleFileName to get the path of the module and, of c...

Best component for show embeded swf stored at Resource in Delphi XE??

hi, Best component for show embedded swf stored at Resource in Delphi XE?? i want to read a play a .swf file in resource with Transparecy in delphi Xe ...