delphi

Is there anything like a map or a hashtable in Delphi 6?

Is there any kind of native map implementation in delphi 6 (map keys to values and objects) - the internet has been of no help so far. I just got a delphi project dumped on my, my background is c++ and java, and the previous dev of the delphi project does all the searching linearly. Thanks. ...

Accessing Sub functions /procedures from DPR or other function / procedure in Delphi

Hello, stackoverflowers :) As much I know - Subroutines are with Private access mode to its parent unction / procedure, right? Is there any way to access them from "outer-world" - dpr or other function / procedure in unit? Also - which way takes more calcualtion and space to compiled file? for example: function blablabla(parameter :...

Exposing C# COM server events to Delphi client applications

My question is very similar to these two: http://stackoverflow.com/questions/1140984/c-component-events http://stackoverflow.com/questions/1638372/c-writing-a-com-server-events-not-firing-on-client However, what worked for them is not working for me. The type library file, does not have any hints of events definitions, so Delphi doesn...

Delphi hook to redirect to different ip

What is the best way to redirect ANY browser to a different ip for specific sites? For example if the user will type www.facebook.com in any browser he will be redirected to 127.0.0.1. Also the same should happen if he will type 66.220.146.11. What I have until now is this: using the winpkfilter I am able to intercept all the traffic on...

Delphi: Disable TaskManager in Windows 7

I found this code for disabling the task manager in Windows XP. It works :) But does it work in Windows 7, too? The registry path is the same, I've checked this. But maybe there are some restrictions!? Thanks in advance! ...

How do I set the cookie HTTPOnly flag?

How do I set the HTTPOnly flag? the TCookie does not have any method or property to specify the HTTPOnly flag. ...

how to read data from dat file ?

hi all how to read data from .dat files ? i just tried like this memo1.lines.loadfromfile('c:\myfile.dat'); but not worked Note : File type is binary can any one please help me :) ...

How do you operate Delphi's macro recorder?

I am using Delphi 2009 and I noticed that there is a macro recorder below the code editor. How do I use it? ...

delphi idhttp post related question

hello All im new to delphi. and also almost new to programming world. i was made some simple post software which using idhttp module. but when execute it , it not correctly working. this simple program is check for my account status. if account login successfully it return some source code which include 'top.location =' in source,...

call to shellexecte causes antivirus to give a warning?

when ever i write the following line of code any where in any app i program with delphi ShellExecute(self.WindowHandle,'open','www.yahoo.com',nil,nil, SW_SHOWNORMAL); kaspersky 2010 beeps this message ''behavior similar to pdm.hidden data sending. detected'' why is that and how do i get rid of this note: i am using delphi 2007 upd...

How do I mock a method with an open array parameter in PascalMock?

I'm currently in the process of getting started with unit testing and mocking for good and I stumbled over the following method that I can't seem to fabricate a working mock implementation for: function GetInstance(const AIID: TGUID; out AInstance; const AArgs: array of const; ...

Search DFM File using Delphi IDE

Is there a way within the Delphi to search within the dfm files for a string? When I try the Search->Find in Files specifying .dfm it does not work. However, if I change all the extensions from dfm to txt and specify .txt as the extension it works. ...

How to call a .NET COM method with an array from delphi using PSafeArray?

Hello. I have an .NET (4.0) interface which is implemented with a ServicedComponent COM+ class: interface DotNetIface { void MethodRef(var System.Guid guid); void MethodArray(System.Guid[] guids, params object[] parameters); void MethodCStyle([MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.Struct, SizeConst=5)]S...

create non visual activex control with delphi

i was created a nonvisual vcl component in delphi and I'm trying to make it usable for other environment like visual studio, and i think the best way is create an activex control. but the problem is i haven't any experience about creating activex in delphi. i found some resource by google about creating activex in delphi but most of them...

How to use a TFileStream to read 2D matrices into dynamic array?

I need to read a large (2000x2000) matrix of binary data from a file into a dynamic array with Delphi 2010. I don't know the dimensions until run-time. I've never read raw data like this, and don't know IEEE so I'm posting this to see if I'm on track. I plan to use a TFileStream to read one row at a time. I need to be able to read as...

delphi post 'illegal access' error

hello all I'm making some simple Delphi software using the IdHttp module in Indy. I want to access this page by using IdHttp's post function to open this webpage. Firstly I have to log in, (at http://user.buddybuddy.co.kr/Login/Login.asp), so I logged in, but after I logged in to the webpage I can see another login page. But when I t...

How to publish a list of integers?

I want to make a component that includes a list of integers as one of its serialized properties. I know I can't declare a TList<integer> as a published property, because it doesn't descend from TPersistent. I've read that you can define "fake" published properties if you override DefineProperties, but I'm not quite sure how that works,...

Importing specific ( in my case - Themes.ThemesService.ThemesEnabled ) function / procedure in runetime in Delphi

Hi again :) I think subject tells everything ... I need this method only. No need to waste about 6Mb of included unit if only thing I need is one method from that unit ( Themes ) ... I was thinking of UxTheme unit, but it did not contain proper function. What Windows DLL do I need to import and what API function this method stands for...

How to catch a moment when the external editor of TOLEContainer has been closed?

Borland Developer Studio 2006, Delphi: I have a TOLEContainer object with AllowInPlace=False. When the external editor is closed and changed my OLE object I have to do something with this OLE object inside TOLeContainer. The problem is I can't catch a moment when the external editor is closed. OnDeactivate event is not working. Prob...

Copy SQL From Access To Delphi Script

I found a difficult with SQL on Delphi, I use ADOconnection and ADOQuery. Here these Query With ADOQuery Do Begin SQL.Text:='SELECT QUnionSAPiutang.kd_Customer, T_Customer.nama_customer, ' +'CDbl(IIf(IsNull(DSum("SA","QSumSAPiutang","kd_Customer='" & [QUnionSAPiutang].[kd_Customer] & "' AND ' +'Tgl<#1/1/2010# "))...