Search found 32 matches

by stephen.terrell
Wed Aug 21, 2013 1:38 pm
Forum: Technical
Topic: WM_COPYDATA
Replies: 3
Views: 16546

Re: WM_COPYDATA

Thanks for that information and for sharing it so simply and clearly.

As usual you have information that is really hard (or impossible) to find anywhere else.

Much appreciated.

Steve
by stephen.terrell
Wed Aug 21, 2013 9:16 am
Forum: Technical
Topic: WM_COPYDATA
Replies: 3
Views: 16546

Re: WM_COPYDATA

I have found enough to get this working: __fastcall TTestHarnessServer::TTestHarnessServer(TComponent* Owner) : TForm(Owner) { WindowProc = SubClassWndProc; } //--------------------------------------------------------------------------- void __fastcall TTestHarnessServer::SubClassWndProc(Messages::T...
by stephen.terrell
Wed Aug 21, 2013 3:34 am
Forum: Technical
Topic: WM_COPYDATA
Replies: 3
Views: 16546

WM_COPYDATA

As I understand it the WM_COPYDATA message must be sent using SendMessage not PostMessage. I have also read that the TApplicationEvents OnMessage event only handles messages on the message queue - as sent by PostMessage. Other ways to intercept a "SendMessage" seem to be by using the messagemap appr...
by stephen.terrell
Fri Aug 19, 2011 7:01 am
Forum: Technical
Topic: CodeGuard access overrun detection
Replies: 2
Views: 10949

Re: CodeGuard access overrun detection

Hi, you are of course right about NULL terminated strings etc. The point of interest was really, does CodeGuard actually check the string (for its NULL terminator) before each call to something like atoi? (because that is what it appears to do). All this came about through updating legacy (BCB5) cod...
by stephen.terrell
Fri Aug 19, 2011 3:40 am
Forum: Technical
Topic: CodeGuard access overrun detection
Replies: 2
Views: 10949

CodeGuard access overrun detection

Hello, below is a trivial example to aid the question: This code produces a CodeGuard warning/fault report char table[10]={0x30,0x30,0x31,0x32,0x33,0x0d,0x0a,0x30,0x38,0x37}; int res; res=atoi(table); Access overrun in process: Project1.exe(2232) - C:\Documents and Settings\User\My Documents\Borland...
by stephen.terrell
Sat Aug 06, 2011 12:51 pm
Forum: Articles
Topic: Boost libraries to use in C++Builder
Replies: 4
Views: 30517

Re: Boost libraries to use in C++Builder

I feel that a series of "how to use boost" articles starting with the assumption of familiarity with Builder but knowing nothing about Boost or how to use it within Builder would be very interesting for me and would probably help spread its use amongst others. The lack of recent Builder books and so...
by stephen.terrell
Tue Jun 29, 2010 1:54 pm
Forum: Technical
Topic: codeguard, borlndmm.dll and cc32100mt.dll
Replies: 0
Views: 8830

codeguard, borlndmm.dll and cc32100mt.dll

C++ Builder 2010 Professional and Windows XP A note for others perhaps or an opportunity to be told what i did wrong. I have just had a problem running the simplist possible stand alone VCL forms exe (dynamic rtl false and runtime packages unchecked). The exe ran fine on a laptop without the ide but...
by stephen.terrell
Sat Aug 15, 2009 5:15 am
Forum: Technical
Topic: String and char
Replies: 15
Views: 49873

Re: String and char

Hi, sorry for the delay in responding - short holiday. Loks like you were spot on with the solution. Somehow the two dll's listed in the QC report were in my system32 directory (I also have BDS 6 installed ). The char array now contains the correct characters etc. The Unicode string still does not d...
by stephen.terrell
Tue Aug 11, 2009 7:41 am
Forum: Technical
Topic: String and char
Replies: 15
Views: 49873

Re: String and char

Last character issue. TCHAR mapped to char. BDS2009 C++ updates to 4 #include <vcl.h> #pragma hdrstop #include <tchar.h> //--------------------------------------------------------------------------- #pragma argsused int _tmain(int argc, _TCHAR* argv[]) { String S="Hello"; char c[256]; strcpy(c,S.t_s...
by stephen.terrell
Tue Aug 11, 2009 3:32 am
Forum: Technical
Topic: String and char
Replies: 15
Views: 49873

Re: String and char

Hi

I have TCHAR maps to char at the moment in my little test program.

I still feel there are places where char buffers are needed, i.e. ReadFile -

I am not sure turning everything to wide chars will be that successful.

Steve
by stephen.terrell
Sun Aug 09, 2009 4:45 am
Forum: Technical
Topic: String and char
Replies: 15
Views: 49873

Re: String and char

Fingers crossed! I am reluctant to make all my strings AnsiString's because that seems to end up with a lot of background conversion into Unicode strings for use in system calls and component access (and possibly leading to memory fragmentation?). At the same time there are system and activeX calls ...
by stephen.terrell
Sun Aug 09, 2009 3:07 am
Forum: Technical
Topic: String and char
Replies: 15
Views: 49873

Re: String and char

Hi again, I just tried with a simple console program... #include <vcl.h> #pragma hdrstop #include <tchar.h> //----------------------------------- #pragma argsused int _tMain(int argc, TCHAR* argv[]) { String S="Hello"; char c[256]; strcpy(c,S.t_str()); return 0; } The result here is not quite so bad...
by stephen.terrell
Sat Aug 08, 2009 4:39 am
Forum: Technical
Topic: String and char
Replies: 15
Views: 49873

Re: String and char

I assume its Unicode in BDS2009, the compiler complains about wide chars in strcpy if i use c_str(). Either way its a little unfortunate that S is corrupt afterwards.

Steve
by stephen.terrell
Sat Aug 08, 2009 2:29 am
Forum: Technical
Topic: String and char
Replies: 15
Views: 49873

String and char

BDS2009 C++ all updates to 4 Hi, I kind of hoped that:- String S = "hello"; char c[16]; strcpy(c,S.t_str()); would result in the char array c holding "hello\0" and S would remain untouched. Both S and c seem to end up with something else in them (according to the debugger and my program's reaction)....
by stephen.terrell
Tue Jul 14, 2009 2:31 pm
Forum: Technical
Topic: AnsiString and multithreading or is it codeguard
Replies: 16
Views: 48718

Re: AnsiString and multithreading or is it codeguard

Worst possible development at the moment!

Rebuilt with the default heap and stack size and is not failing. Clearly there is something else going on but have not figured it out yet.

Steve