Y
YuZi
Unregistered / Unconfirmed
GUEST, unregistred user!
typedef struct tagMyStruct {
DWORD dwCount;
LPLISTHEADER* lpListHeader;
}MYSTRUCT,*LPMYSTRUCT;
typedef struct tagListHeader {
DWORD dwCount;
LPMYDATA* lpMyData;
}LISTHEADER,*LPLISTHEADER;
lpMyStruct->lpListHeader =
(LPLISTHEADER*)VirtualAlloc(NULL, dwCount * sizeof(LPVOID),MEM_COMMIT,PAGE_READWRITE);
.....
(lpMyStruct->lpListHeader) =
(LPLISTHEADER*)VirtualAlloc(NULL, dwCount * sizeof LPMYDATA),MEM_COMMIT,PAGE_READWRITE);
我用上面的语句在其它进程空间中动态申请空间和数据访问,lpListHeader和lpDataList是个结构指针,在C中可以用下面的方法访问结构lpData的成员属性,
如:Value = (lpMyStruct->lpListHeader).lpMyData;
但是在DELPHI中我要怎么实现这样的数据访问和修改呢?
DWORD dwCount;
LPLISTHEADER* lpListHeader;
}MYSTRUCT,*LPMYSTRUCT;
typedef struct tagListHeader {
DWORD dwCount;
LPMYDATA* lpMyData;
}LISTHEADER,*LPLISTHEADER;
lpMyStruct->lpListHeader =
(LPLISTHEADER*)VirtualAlloc(NULL, dwCount * sizeof(LPVOID),MEM_COMMIT,PAGE_READWRITE);
.....
(lpMyStruct->lpListHeader) =
(LPLISTHEADER*)VirtualAlloc(NULL, dwCount * sizeof LPMYDATA),MEM_COMMIT,PAGE_READWRITE);
我用上面的语句在其它进程空间中动态申请空间和数据访问,lpListHeader和lpDataList是个结构指针,在C中可以用下面的方法访问结构lpData的成员属性,
如:Value = (lpMyStruct->lpListHeader).lpMyData;
但是在DELPHI中我要怎么实现这样的数据访问和修改呢?