本文整理汇总了C++中GetPtr函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPtr函数的具体用法?C++ GetPtr怎么用?C++ GetPtr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetPtr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DtPushConst
void DtPushConst( void ) {
//=====================
// Push constant.
DXPush( IntegerValue( GetPtr() ) );
}
示例2: DtFieldSubstring
void DtFieldSubstring( void ) {
//==========================
// Data initialize a substring character item within a structure.
sym_id fd;
intstar4 base;
intstar4 first;
intstar4 last;
char name[MAX_SYMLEN+1];
base = DXPop();
first = DXPop();
fd = GetPtr();
last = GetInt();
if( last != 0 ) {
last += first - 1;
} else {
last = DXPop();
}
GetU16(); // skip typing information
if( DoSubstring( first, last, fd->u.fd.xt.size ) ) {
DXPush( base + first - 1 );
DtItemSize = last - first + 1;
} else {
STFieldName( fd, name );
Error( EV_SSTR_INVALID, name, StmtKeywords[ PR_DATA ] );
}
}
示例3: GetNTHeaders32
PIMAGE_NT_HEADERS32
GetNTHeaders32(LPCVOID p, SIZE_T size)
{
try
{
PIMAGE_NT_HEADERS32 nt;
PIMAGE_DOS_HEADER dos;
if(size < sizeof(IMAGE_DOS_HEADER) + sizeof(IMAGE_NT_HEADERS))
return NULL;
dos = (PIMAGE_DOS_HEADER) p;
if(dos->e_magic != IMAGE_DOS_SIGNATURE)
return NULL;
if(dos->e_lfanew + sizeof(IMAGE_NT_HEADERS) > size)
return NULL;
nt = (PIMAGE_NT_HEADERS32) GetPtr(dos, dos->e_lfanew);
if(nt->Signature != IMAGE_NT_SIGNATURE)
return NULL;
if(nt->OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR32_MAGIC)
return NULL;
return nt;
}
catch(...)
{
}
return NULL;
}
示例4: DtDataDoLoop
void DtDataDoLoop( void ) {
//======================
// Process implied-DO for DATA statement.
intstar4 e2;
intstar4 e3;
intstar4 iter_count;
sym_id do_var;
obj_ptr curr_fc;
intstar4 e1;
e3 = DXPop();
e2 = DXPop();
e1 = DXPop();
do_var = GetPtr();
do_var->u.ns.si.ms.u.value = &e1;
iter_count = ( e2 - e1 + e3 ) / e3;
curr_fc = FCodeTell( 0 );
while( iter_count > 0 ) {
FCodeSeek( curr_fc );
FCodeSequence();
*do_var->u.ns.si.ms.u.value += e3;
iter_count--;
}
}
示例5: DtInpStruct
void DtInpStruct( void ) {
//=====================
// Initialize a struct.
StructInit( ((sym_id)GetPtr())->u.sd.fl.sym_fields );
}
示例6: Realloc
//----------------------------------------------------------
void TContainerRise::Append( int size, char* p )
{
int oldSize = mSizeUse;
int newSize = mSizeUse + size;
Realloc( newSize );
memcpy( GetPtr() + oldSize, p, size );
}
示例7: INTELIB_ASSERT
SReference& SReference::Cdr() const
{
INTELIB_ASSERT(GetPtr(), IntelibX_unexpected_unbound_value());
SExpressionCons *tp = DynamicCastGetPtr<SExpressionCons>();
INTELIB_ASSERT(tp, IntelibX_not_a_cons(*this));
return tp->Cdr();
}
示例8: GetSendDataSize
PBYTE CInfoFishing::GetSendData(void)
{
int i, nCount;
PBYTE pData, pDataTmp;
DWORD dwSize;
PINFOFISHINGPARAM pInfo;
nCount = m_apParam.GetSize ();
dwSize = GetSendDataSize ();
pData = ZeroNew (dwSize);
pDataTmp = pData;
CopyMemoryRenew (pDataTmp, &m_dwFishingID, sizeof (m_dwFishingID), pDataTmp); /* 釣りID */
CopyMemoryRenew (pDataTmp, &m_nAverage, sizeof (m_nAverage), pDataTmp); /* 釣れる確率 */
strcpyRenew ((LPSTR)pDataTmp, m_strName, pDataTmp); /* 釣り場名 */
CopyMemoryRenew (pDataTmp, &nCount, sizeof (nCount), pDataTmp); /* 釣り情報パラメータ数 */
for (i = 0; i < nCount; i ++) {
pInfo = GetPtr (i);
CopyMemoryRenew (pDataTmp, &pInfo->dwItemTypeID, sizeof (pInfo->dwItemTypeID), pDataTmp); /* アイテム種別ID */
CopyMemoryRenew (pDataTmp, &pInfo->nAverage, sizeof (pInfo->nAverage), pDataTmp); /* 釣りきる確率 */
}
return pData;
}
示例9: DtSubstring
void DtSubstring( void ) {
//=====================
// Data initialize a character substring.
intstar4 first;
intstar4 last;
sym_id cv;
cv = GetPtr();
GetU16(); // skip typing information
first = DXPop();
if( cv != NULL ) {
if( DtFlags & DT_SS_NO_HIGH ) {
last = cv->u.ns.xt.size;
DtFlags &= ~DT_SS_NO_HIGH;
} else {
last = DXPop();
}
} else {
last = first + GetInt() - 1;
}
if( !DoSubstring( first, last, InitVar->u.ns.xt.size ) ) {
NameStmtErr( EV_SSTR_INVALID, InitVar, PR_DATA );
}
DtOffset += first - 1;
DtItemSize = last - first + 1;
}
示例10: Init
RadioButton::RadioButton(Gui & mGui,int x,int y, std::string Txt)
{
Init(mGui);
mText = new Text(Txt,x + mPositionTex[0].w,y);
setPosition(x,y);
mGui.AddClassGui(GetPtr());
}
示例11: GetDataSizeNo
PBYTE CInfoFishing::GetWriteData(int nNo, PDWORD pdwSize)
{
int i, nCount, *pnTmp;
PBYTE pRet, pSrc;
DWORD dwSize, *pdwTmp;
PINFOFISHINGPARAM pInfo;
pRet = NULL;
pSrc = NULL;
dwSize = GetDataSizeNo (nNo);
*pdwSize = dwSize;
nCount = m_apParam.GetSize ();
if (dwSize == 0) {
goto Exit;
}
pRet = new BYTE[dwSize];
switch (nNo) {
case 0: pSrc = (PBYTE)&m_dwFishingID; break; /* 釣りID */
case 1: pSrc = (PBYTE)&m_nAverage; break; /* 釣れる確率 */
case 2: pSrc = (PBYTE)(LPCSTR)m_strName; break; /* 釣り場名 */
case 3: pSrc = (PBYTE)&nCount; break; /* 釣り情報パラメータ数 */
case 4: /* アイテム種別ID */
pdwTmp = (PDWORD)pRet;
for (i = 0; i < nCount; i ++) {
pInfo = GetPtr (i);
pdwTmp[i] = pInfo->dwItemTypeID;
}
break;
case 5: /* 釣りきる確率 */
pnTmp = (int *)pRet;
for (i = 0; i < nCount; i ++) {
pInfo = GetPtr (i);
pnTmp[i] = pInfo->nAverage;
}
break;
}
if (pSrc) {
CopyMemory (pRet, pSrc, dwSize);
}
Exit:
return pRet;
}
示例12: GetSize
//----------------------------------------------------------
void TContainerRise::AddData(char*p, int size)
{
int oldSize = GetSize();
int newSize = oldSize + size;
Realloc(newSize);
char* pBound = GetPtr();
memcpy(pBound + oldSize, p, size);
}
示例13: RenewMotionInfo
void CLibInfoCharCli::RenewMotionInfo(DWORD dwCharID)
{
int i, nCount;
PCInfoCharCli pChar;
if (dwCharID) {
pChar = (PCInfoCharCli)GetPtr (dwCharID);
RenewMotionInfo (pChar);
} else {
nCount = GetCount ();
for (i = 0; i < nCount; i ++) {
pChar = (PCInfoCharCli)GetPtr (i);
RenewMotionInfo (pChar);
}
}
}
示例14: Current
CWord::SHomIt::SHomIt(const THomonymVector& homonyms)
: Current(homonyms.begin())
, Begin(homonyms.begin())
, End(homonyms.end())
{
if (Ok() && GetPtr()->IsDeleted())
operator++();
}
示例15: Contains
//-----------------------------------------------------------------------------
// Name: CArrayList::Contains
// Desc: Returns whether the list contains an entry identical to the
// specified entry data.
//-----------------------------------------------------------------------------
bool CArrayList::Contains( void* pEntryData )
{
for( UINT iEntry = 0; iEntry < m_NumEntries; iEntry++ )
{
if( m_ArrayListType == AL_VALUE )
{
if( memcmp( GetPtr(iEntry), pEntryData, m_BytesPerEntry ) == 0 )
return true;
}
else
{
if( GetPtr(iEntry) == pEntryData )
return true;
}
}
return false;
}