Delphi流媒体问题
我使用 kbmMemTable
中的 blob 字段来存储我从 TComponent
开发的自定义组件,并使用 的读取和写入组件流方法>TReader
读取组件并将其写入 blob 字段。 kbmMemTable
中的数据最终存储在由 GpStructuredStorage
创建的结构化存储文件中。
这一切都完美无缺,直到我将我的组件(以及 kbmMemtable )移动到新应用程序并尝试让新应用程序读取 blob 字段。起初,我遇到了组件命名错误(组件名称已存在),但后来当 TReader
尝试读取组件的 TPercient
属性时,我开始遇到访问冲突。
据我所知,我没有对从 gpStructuredStorage
文件检索 kbmMemTable
数据的方式以及从 blob 读回组件的方式进行任何更改使用 TReader
的字段。我没有对组件进行任何更改,并且我存储在同一个表的其他 blob 字段中的其他组件似乎没有任何问题(至少在读取它们时我没有收到任何错误)后退)。
我对可能出现的问题感到恼火。任何帮助/建议将不胜感激。我使用的是Delphi 2007。
I'm using a blob field in a kbmMemTable
to store a custom component that I've developed from TComponent
and I use the read and write component stream methods of the TReader
to read and write the component to the blob field. The data in the kbmMemTable
is eventually stored inside a structured storage file created by GpStructuredStorage
.
This has worked flawlessly, until I moved my component (along with the kbmMemtable
) to a new application and tried to have the new application read the blob field. At first I was getting a component naming error (component name already exists), but later I started getting an Access Violation when the TReader
tries to read a TPersistent
property of my component.
As far as I know, I did not change anything with regards to the way I retrive the kbmMemTable
data from the gpStructuredStorage
file and the way I read the component back from the blob field using TReader
. I've made no changes to the component and, I don't seem to have any problem with other components that I'm storing in other blob fields in the same table (at least I'm not getting any errors when they are read back).
I'm miffed at what could be the problem. Any help / suggestion would be greatly appreciated. I am using Delphi 2007.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
另一个猜测。您的组件名称与其他/不同的组件名称冲突。要解决这个问题,请始终将您的单位放在其他渴望党的单位之后:
示例:
并确保注册您的组件
祝你好运
Another guess. Your component name is collited with other/different one. To resolve this, always make your unit(s) after other thirst party ones:
example:
and make sure to register your component
Gook luck
这只是一个猜测,但听起来新应用程序中的组件类定义与您正在流式传输的组件的定义不匹配。
This is just a guess, but it sounds like the component class definition in the new application does not match that of the component that you're streaming.
我终于弄清楚是什么导致了流媒体问题 - 尽管我不确定为什么,所以也许有人可以解决这个问题。我决定检查问题是否可能是由我正在使用的某些新的第 3 方组件引起的,你瞧,当我禁用皮肤组件时(这将是我的新应用程序的改进!),一切都正常它应该有。通过禁用我的意思是我没有从程序中删除它,我只是做了它,以便压缩的皮肤不再用于绘制窗口和控件。
I finally figured out what caused the streaming problem - although I am not sure why so perhaps someone can throw a light on this issue. I decided to check if the problem could be caused by some of the new 3rd party components I was using and lo and behold, when I disabled a skinning component (which was going to be an improvement in my new app!), everything worked as it should have. By disabling I mean I did not remove it from the program, I just made it so that the compressed skins were no longer used to paint the windows and the controls.