I created a function similar below in delphi code. but it wont work. What is the proper way to convert this?
char* ReadSpeechFile(char* pFileName, int *nFileSize)
{
char *szBuf, *pLinearPCM;
int nSize;
FILE* fp;
//read wave data
fp = fopen(pFileName, "rb");
if(fp == NULL)
return NULL;
fseek(fp, 0,...
N00b here, having problems escaping strings. I used the QuotedStr() function - shouldn't that be enough.
Unfortunately, the string that I am trying to quote is rather messy, but I will post it here in case anyone wants to paste it into WinMerge or KDiff3, etc.
I am trying to store an entire Delphi form into the database, rather than in...
I want to standardize the behaviour on an Devexpress TcxGrid. So I have a unit ClientData with a event:
procedure TClientData.grdOnEnter(Sender: TObject);
begin
mnuCxGridStandardMenu.Grid := TcxGrid(Sender);
end;
If I try to use that event from a TcxGrid.OnEnter event in another unit it refuse to work.
If I paste in ClientData.grdOn...
It may seem a little newbie, but I really have got problem with it. I have a form (not the main one)for getting many different data from the user and I want to pass it to a manager class for creating an object with these. The problem is that I can't have this class to use the other unit (getting circle uses) and also it doesn't have acce...
Hello.
How to send a binary data with Indy components? Which of them is most suitable for this task? I've tried to use TIdTcpClient but it allows only to send strings.
I've found one reponce for that problem here but I don't get it.
It says about method Write(TIdBytes), but the answer is not clear for me. Does he meant Write to some in...
Hi,
We have an application whose virtual memory rises and keep going for over a day. After two days it has climbed to about 500MB.
I have tried profiling the applications which hits a database as well as makes lots of http and soap requests but I Fastmm4 shows there are no leaks.
I am not sure how or when memory is claimed and if ther...
I need to launch two external programs in my program and connect the STDOUT of the first one to the STDIN of the second program. How can you achieve this in Delphi (RAD Studio 2009, if it matters)? I'm operating in Windows environment.
As a commandline command my situation would look something like this:
dumpdata.exe | encrypt.exe "my...
Hi, I'm storing small interfaces from a range of objects into a single TInterfaceList 'store' with the intention of offering list of specific interface types to the end user, so each interface will expose a 'GetName' function but all other methods are unique to that interface type. For example here are two interfaces:
IBase = interfac...
I am working on a project that uses the EWDraw ActiveX componenet and I would like to find out if there are others out there?
...
Hello every body:
We are trying to develop an application that send messages to a service, but we only have send message between two applications. We are developing in Delphi 7, Windows XP.
We need the service send back a message to the application, depending on the result of the action that the application sent to do to the service.
...
i am working on C source to translate to delphi but i was stuck on reading files on ftell() function, can you help me find the equivalent function in delphi?
...
Actually i'm using the TIdHTTP component for download a file from internet. i'm wondering if is possible pause and resume the download using this component o maybe another indy component.
this is my current code, this works ok for download a file (without resume), but . now i want pause the download close my app ,and when my app restart...
I want to create a telnet connection in Delphi that will allow me to connect to the command prompt on my computer.
...
i know it sounds crazy but, i just want to ask if is a compiler support multi programming language? like Delphi could also support C/C++/C# etc? if there is, please let me know. or how?
...
Hi,
I am helping out my company with some old delphi 7 code.
There is a record declared at the start that is used throughout to store all the data we want outputted.
type
TOutput_Type = record
result: String;
resultoffset: String;
selected: boolean;
resultcateg...
A user can manually sort files in a standard Windows Open Dialog (in "Details" view mode) by Name, Date or Size by clicking on the corresponding column header. How to set a sorting mode in Open Dialog (TOpenDialog class in Delphi) programmatically in application so that the dialog opens with a preferred sorting?
...
Hi all.
I have a desktop application that installs and starts a service. I know a process can get the explorer.exe token and launch another process with that token so as the second process will run us the logged on useraccount.
My question is this: can I start my service by this explorer.exe token too? Is there an example in Delphi...
I've got a report that's supposed to take a grid control and produce HTML output. One of the columns in the grid can display any of a number of values, or <Any>. When this gets output to HTML, of course, it ends up blank.
I could probably write up some routine to use StringReplace to turn that into <Any> so it would display this...
Tool: Delphi 6 Pro
I created a new component in my main components package that is a descendant of TFrame using the Component -> New Component option. When I try to draw the component on a form during design time I get a "Resource {component class name} not found" error. I tried adding the line {$R *.dfm} to the component unit just af...
I want to track a few hundred, maybe a few thousand people in real time.
Let's say that the hardware aspects are sorted out and I can get the data into a database.
Now, I want to get it out and show it, in real-time.
Weeeell ... "real-enough" time. Let's say that I want to draw a floorplan of a building and plot everyone every 1 to 5 ...