再次请教 C++ ==>Delphi问题,谢谢
C++代码:
AREAINFO m_AreaInfo[100];
int m_AreaCount = 0;
char m_grpBuffer[128 * 1024];
DWORD *dwOfsList = (DWORD*)&m_grpBuffer[12];
char * GetStreamPtr( int id )
{
if( id < 0 || id >= m_AreaCount * 2 + 2 )
return NULL;
return (&m_grpBuffer[dwOfsList[id * 2]]);
}
int GetStream( int id, char * stream )
{
if( id < 0 || id >= m_AreaCount * 2 + 2 )
return NULL;
memcpy( (void*)stream, (void*)&m_grpBuffer[dwOfsList[id * 2]], dwOfsList[id * 2 + 1] );
stream[dwOfsList[id * 2 + 1]] = 0x0a;
stream[dwOfsList[id * 2 + 1]+1] = 0;
return 1;
}
//DWORD *dwOfsList = (DWORD*)&m_grpBuffer[12];
//return (&m_grpBuffer[dwOfsList[id * 2]]);
//(void*)&m_grpBuffer[dwOfsList[id * 2]],
主要是这几句怎么专成Delphi??
我把dwOfsList声明为 dwOfsList:^DWORD;
不知对否,各位高手请帮忙解答 ^0^