I posted as bug in mantis, and worked fine for me, but not sure if that the correct way to resovle the problem, i think when we use SysAllocStringLen we must use SysFreeString.
Check it http://www.freepascal.org/mantis/view.php?id=8676 --- Henry Vermaak <[EMAIL PROTECTED]> wrote: > when i try to use the "Text" property in the edit > control as the text > in a MessageDlg function, it gives me a "Bus error > or misaligned data > access" error. > > i tracked this down to be the FreeMem(tmpWideStr) > call in the > GetControlText function. it makes sense to me to > use the > SysFreeString function when you've used > SysAllocStringLen - and when i > changed this to SysFreeString(tmpWideStr), it > started working. can > any wince geniuses confirm this? > > this is on line 1135 in winceproc.pp. > > i'd just like to quote an hilariously vague line out > of msdn: > > "Passing invalid (and under some circumstances NULL) > pointers to this > function causes an unexpected termination of the > application." > > this is on the SysAllocStringLen page - a function > which is supposed > to be able to handle a null param... > > henry > > _________________________________________________________________ > To unsubscribe: mail > [EMAIL PROTECTED] with > "unsubscribe" as the Subject > archives at > http://www.lazarus.freepascal.org/mailarchives > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives