如何复制指针内的数据到另一个指针

thomas_cat 2003-09-18 10:03:05
当然,是广义范围内的指针,包括指向某种结构体的,OLEVariant类型的,如何完整的复制它?像OleVariant,很明显是指针,大小只有四个字节,可是当我声明了
var
Border_SideLeft: Excel2000.Border; // Excel的表格边框属性

如何将他的内容和数据保存下来?

我对OLE,ActiveX,COM都不了解,请勿见笑。
...全文
280 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ly_liuyang 2003-09-19
  • 打赏
  • 举报
回复
API
The CopyMemory function copies a block of memory from one location to another.

VOID CopyMemory (

PVOID Destination, // address of copy destination
CONST VOID *Source, // address of block to copy
DWORD Length // size, in bytes, of block to copy
);


Parameters

Destination

Points to the starting address of the copied block's destination.

Source

Points to the starting address of the block of memory to copy.

Length

Specifies the size, in bytes, of the block of memory to copy.



Return Values

This function has no return value.

Remarks

If the source and destination blocks overlap, the results are undefined. For overlapped blocks, use the MoveMemory function

属性可以通过变通保存的,读取时再分析
delphiseabird 2003-09-19
  • 打赏
  • 举报
回复
先转换类型
delphiseabird 2003-09-19
  • 打赏
  • 举报
回复
1^:=2^;
thomas_cat 2003-09-19
  • 打赏
  • 举报
回复
可是如何获得一个OLE,COM对象的大小?复制也要知道大小啊?

16,748

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧