Data Corruption when passing pointers to TThreadFunc


Hi all, posted a few hours ago about using BeginThread / EndThread. Seem to be getting on ok, except that the data that I'm passing to the TThreadFunc seems to be getting corrupted (please excuse any blatant mistakes, only been ...
Posted On: Tuesday 27th of November 2012 12:57:23 AM Total Views:  275
View Complete with Replies

RELATED TOPICS OF Delphi Programming PROGRAMMING LANGUAGE




Re: Book recommendations for database development

Mike Margerum wrote: > Speaking of which, does anyone have any experience with devExpress grid > and binding it to either delphi tlist type structures or C++ SQL > structures I'd like to get rid of the dataset layer altogether. Do it all the time here. You need to derive a data source class off of TcxCustomDataSource and override a few procedures - GetRecordCount, GetValue and SetValue (if the grid data can be changed by the user). The data source class has a container (ofter a TList) that contains one item for each grid row. GetRecordCount reurns the number of enties in this list. GetValue returns a specific attribute of a particulat list entry and SetValue changes that attribute. Assign the a data source class to the DataController.CustomDataSource property of the TcxGridTableView and call its DataChanged procedure. Keith
VIEWS ON THIS POST

124

Posted on:

Tuesday 16th October 2012
View Replies!

Suggestions please -> storing calculated data

group. Here's my task: 1. Create an algorithm to interpolate data (example: Given: Beginning latitude and logitude and beginning time, and ending latitude, longitude and time Interpolated latitude and longitude positions at X minute intervals between the start and stop time.) My Question: When I calculated this data, what type of class, object, structure would be best... This output will have to be collected as indiviual sets of data that can be accessed at any time, but not persistant when the program closes. I was thinking some type of Object Container so I can access each "set of data" by name or somthing similar. To explain it in a GUI type way... I have a map with many sets of beginning and ending points. If I click on the beginning point, I have the option to interpolate the between points (beginning and ending) If I click on another beginning point (different set), I have the option to do the same. Now, I can go back and look at the data from the first interpolation if I want... (retrieves the data from the object container...by name or something instead of recalculating it again) I hope this make sense.
VIEWS ON THIS POST

261

Posted on:

Tuesday 16th October 2012
View Replies!

Passing complex data structures to and from a DLL

Hi G.B., > a simple way to pass all of the structure directly without having to pass > each elementary field one at a time Use a shared unit in which you define your shared data structure (in the form of (nested) records and arrays, etc. - not classes). Then use that unit in your DLL as well as your application (and this means you can use the complex types in your DLL import unit as arguments to the procedures and functions, since "both sides" know what the complex types are). Tip: make sure to use the same record field alignment setting on both ends ;-) >
VIEWS ON THIS POST

135

Posted on:

Tuesday 16th October 2012
View Replies!

Delphi 6 high cpu usage during datatransfer via serial comport (RS232)

my program transfers data via serial comport (RS232). If I compile my program with Delphi 4, the CPU usage because of serial datatransfer is 30%. If I compile my program with Delphi 6, the CPU usage because of serial datatransfer is 100%, so my application hangs. What is the cause of the different CPU usage in different Delphi versions and how can I fix this problem.
VIEWS ON THIS POST

145

Posted on:

Tuesday 16th October 2012
View Replies!

How can i load TImage picture from a TMemoryStream that contain TJpeg data?

"Ahmadi" wrote in message news:486e356f@newsgroups.borland.com... > How can i load TImage picture from a TMemoryStream that contain TJpeg > data You have to load the TMemoryStream into a TJPEGImage, and then you can Assign() that to the TImage.Picture property. > jp:=TJPEGImage.Create; Since you already have the TJPEGImage, you can get rid of the TMemoryStream completely, ie: var jp: TJPEGImage; begin ... jp := TJPEGImage.Create; try ... Image1.Picture.Assign(jp); finally jp.free; end; ... end; Gambit
VIEWS ON THIS POST

230

Posted on:

Tuesday 16th October 2012
View Replies!

Extracting email data

I need to extract the message body of a email as it arrives Any code samples please The information is as follows: sendingingmobileno lat: 53.765434 long: =002.155678 speed: 000.0 22/05/08 15:40 bat:F signal:F imei:359xxxxxxxxxxxx I then need to populate some edit boxes with the various 'fields': eg mobile no = sendingingmobileno lat = 53.765434 The problem I am having is splitting up the data as it is not comma seperated and there are various spaces in the text. I have no control over the incoming text format Any help appreciated SteveW
VIEWS ON THIS POST

103

Posted on:

Tuesday 16th October 2012
View Replies!

generator field in clientdataset

, I'm triying to change all my IBX components in my app for ClientDataSets.. The first problem I've found is that I don't know how to deal with the primary keys of my tables. I used the GeneratorField property of the IBDataSet to assing the value from a generator in the database. How I do this with the CDS Now I have a IBQuery, a DataSetProvider and a ClientDataset for each table. Just in case: I'm using Delphi 6.
VIEWS ON THIS POST

128

Posted on:

Tuesday 16th October 2012
View Replies!

Hackability of data hard-coded into a code file.

I want to hard-code some "confidential" data into an application, and was wondering how to do this so a to make it as difficult as possible to hack. Any ideas
VIEWS ON THIS POST

106

Posted on:

Tuesday 16th October 2012
View Replies!

mouse wheel and data grid

I use the following to move up and down a data grid with the mouse wheel: procedure TEd_Pat.FormMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); Var code: Cardinal; i, n: Integer; begin If WindowFromPoint( mouse.Cursorpos ) = ...
VIEWS ON THIS POST

209

Posted on:

Saturday 10th November 2012
View Replies!

Best practice for displaying data

Using BDS2006 (if it matters) Suppose you have a master-detail report that prints the following format: Student Name (master) Course (detail of all of the courses this student takes) Assignment (detail of all of the assignments for this course and ...
VIEWS ON THIS POST

121

Posted on:

Thursday 15th November 2012
View Replies!

how to move copy data from TMemoryStream to TStringList?

thanks!..
VIEWS ON THIS POST

108

Posted on:

Thursday 15th November 2012
View Replies!

external data storage

This may not be the right NG but I only have access to Delphi groups from work and there may be someone here who has done this. I accept weight data from a weighing and distribution system. The scale head ...
VIEWS ON THIS POST

106

Posted on:

Thursday 22nd November 2012
View Replies!

Re: Capture poker software data

On Sun, 25 Nov 2007 20:50:02 -0700, "Craig" wrote: >Anything that says Firewall setting etc No, nothing. -- Replace you know what by j to email...
VIEWS ON THIS POST

95

Posted on:

Thursday 22nd November 2012
View Replies!

Fetching data via ftp

I write desktop apps, many of which ****yze large quantities of data. These "large quantities of data" come from various sites via ftp and then through a couple of parsing/organizing programs (scripts). Right now you have to fire up 3 ...
VIEWS ON THIS POST

90

Posted on:

Thursday 22nd November 2012
View Replies!

Synchronization of access to shared data

A few more questions about threads and synchronization. The first question relates to data in a memory-mapped file shared by several instances of an application. Does access to the data have to be protected from concurrent access by a ...
VIEWS ON THIS POST

100

Posted on:

Thursday 22nd November 2012
View Replies!

xml to clientdataset

I'm trying to show one xml stream on a dbgrid, but don't work anyone can help My code: procedure TFrmMain.HTTPRIO1AfterExecute(const MethodName: string; SOAPResponse: TStream); var XMLDoc: IXMLDocument; begin SOAPResponse.Position := 0; ClientDataset1.Active := FALSE; SOAPResponse.Position := 0; XMLDoc ...
VIEWS ON THIS POST

78

Posted on:

Thursday 22nd November 2012
View Replies!

Re: Inconsistencies between different approaches to extractingstring data from API functions

In article , "Rudy Velthuis [TeamB]" wrote: >> Version 0. Here a local static string variable is passed to the API >> function. The @ operator is used to pass the address of the static >> string (which I ...
VIEWS ON THIS POST

236

Posted on:

Thursday 22nd November 2012
View Replies!

clientdatasets parameters

Sergio Gonzalez wrote: > , this piece of code is from a CDS example. I have a question: > Why the parameter is passed to the CDS and not to the TIBQuery > connected to it, via its datasetprovider You ...
VIEWS ON THIS POST

86

Posted on:

Sunday 25th November 2012
View Replies!

Store TObject in database

I need to store a TObject in a database field, I think the fastest solution is to convert it to a string using streams, but I don't know how. I've already do it with TComponent, but I don't know ...
VIEWS ON THIS POST

97

Posted on:

Tuesday 27th November 2012
View Replies!

Does anyone use datamodules

Hi , I've been using Delphi since version 1, and using datamodules since they've been available (Ver 3). I've recently 'updated' from 2006 to 2007 and now when I execute an application from the IDE (F9), the names on the ...
VIEWS ON THIS POST

168

Posted on:

Tuesday 27th November 2012
View Replies!