• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GETWORD函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GETWORD函数的典型用法代码示例。如果您正苦于以下问题:C++ GETWORD函数的具体用法?C++ GETWORD怎么用?C++ GETWORD使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GETWORD函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: IT_REGSERVERDOC

void
IT_REGSERVERDOC (ENV *envp, LONGPROC f)
{
    LHSERVER lhHandle;
    LPSTR lpString1;
    LPOLESERVERDOC lpdoc;
    LPBYTE lpStr;
    LHSERVERDOC lhdoc;
    DWORD retcode;

    lhHandle = (LHSERVER)GETDWORD(SP+16);
    lpString1 = (LPSTR)GetAddress(GETWORD(SP+14),GETWORD(SP+12));
#ifdef	LATER
    translate the LPOLESERVERDOC and the structures behind it
#endif
    lpdoc = (LPOLESERVERDOC)GETDWORD(SP+8);
    lpStr = (LPBYTE)GetAddress(GETWORD(SP+6),GETWORD(SP+4));
    retcode = OleRegisterServerDoc(lhHandle,
                                   lpString1,
                                   lpdoc,
                                   &lhdoc);
    PUTDWORD(lpStr,lhdoc);
    envp->reg.sp += 2*DWORD_86 + 2*LP_86 + RET_86;
    envp->reg.ax = LOWORD(retcode);
    envp->reg.dx = HIWORD(retcode);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:26,代码来源:OleIF.c


示例2: IT_LOADACCEL

void
IT_LOADACCEL (ENV *envp,LONGPROC f)
{
	LPSTR lpString;
	HGLOBAL	hGlobal;
	WORD wSel = 0;
	MEMORYINFO *lpMemory;
	HINSTANCE hInst;

	lpString = (LPSTR)GetAddress(GETWORD(SP+6),GETWORD(SP+4));
	hInst = GetSelectorHandle(GETWORD(SP+8));
	hGlobal = (f)((HANDLE) hInst,lpString);
	if (hGlobal && (lpMemory = GETHANDLEINFO(hGlobal))) {
	    if (lpMemory->lpData == NULL) 
		lpMemory->lpData = (LPSTR)ConvertResourceToBin
			((LPBYTE)lpMemory->lpCore,lpMemory->wIndex);
	    if (lpMemory->lpData) {
		wSel = AssignSelector((LPBYTE)lpMemory->lpData + 4,0,
			TRANSFER_DATA,lpMemory->dwBinSize);
		SetSelectorHandle(wSel,hGlobal);
	    }
	}
	
	envp->reg.ax = wSel & 0xfffe;
	envp->reg.dx = 0;
	envp->reg.sp += HANDLE_86 + LP_86 + RET_86;
	if (lpMemory)
	  RELEASEHANDLEINFO(lpMemory);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:29,代码来源:MemoryIF.c


示例3: IT_WINEXEC

void
IT_WINEXEC (ENV *envp,LONGPROC f)
{
	char buf[0x100];
	LPSTR lpCmdLine,lpTemp;
	LPSTR lpString;
	DWORD retcode;

	lpCmdLine = (LPSTR)GetAddress(GETWORD(SP+8),GETWORD(SP+6));
	if (!lpCmdLine || !strlen(lpCmdLine))
	    retcode = 0;
	else {
	    lpString = (LPSTR)WinStrdup(lpCmdLine);
	    lpTemp = strchr(lpString,' ');
	    if (lpTemp) 
		*lpTemp = '\0';
    	    xdoscall(XDOS_GETALTNAME,0,(void *) buf,(void *) lpString);
	    if (strlen(buf) == 0)
		strcpy(buf,lpString);
	    if (lpTemp) {
		strcat(buf," ");
		strcat(buf,++lpTemp);
	    }
	    retcode = (DWORD)WinExec(buf,(UINT)GETWORD(SP+4));
	    WinFree(lpString);
	}
	if (retcode > 32)
	    retcode = GetDataSelectorFromInstance(retcode);
	envp->reg.ax = LOWORD(retcode);
	envp->reg.dx = HIWORD(retcode);
	envp->reg.sp += LP_86 + UINT_86 + RET_86;
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:32,代码来源:MemoryIF.c


示例4: IT_SIZEOFRESOURCE

void
IT_SIZEOFRESOURCE (ENV *envp,LONGPROC f)
{
	DWORD retcode;
	HINSTANCE hInst;
	HRSRC hrsrc;
	NAMEINFO *lpni = NULL;
	MEMORYINFO *lpMemory;

	hInst = (HINSTANCE)GetSelectorHandle(GETWORD(SP+6));
	hrsrc = (HRSRC)GETWORD(SP+4);
	lpMemory = GETHANDLEINFO(hrsrc);
	if (lpMemory)
	    lpni = (NAMEINFO *)lpMemory->lpCore;
	if (lpni) {
	    if (lpni->hGlobal) {
		lpMemory = GETHANDLEINFO(lpni->hGlobal);
		if (lpMemory && lpMemory->wType)
		    retcode = lpMemory->dwBinSize;
		else
		    retcode = lpni->rcslength;
	    }
	    else
		retcode = lpni->rcslength;
	}
	else
	    retcode = 0L;
	envp->reg.ax = LOWORD(retcode);
	envp->reg.dx = HIWORD(retcode);
	envp->reg.sp += 2*HANDLE_86 + RET_86;
	if (lpMemory)
	  RELEASEHANDLEINFO(lpMemory);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:33,代码来源:MemoryIF.c


示例5: GETWORD

/**
 * \brief This function loads some constants, this normally happens when the game is loaded
 * 		  and the values change depending on what is read for the mods
 */
void CPhysicsSettings::loadGameConstants(int episode, byte* data)
{

	if(episode >= 4 && episode <= 6 )
	{
		// Galaxy Engine
		fallspeed_increase = 7;
		max_fallspeed = 175; // Factor 2.5 to the original assembly it is
		misc.visibility = 7;
	}
	else
	{
		// Vorticon Engine
		misc.visibility = 3;
		fallspeed_increase = 4;
		max_fallspeed = 104;

		if(episode == 1)
		{	// Code for Episode 1.

			// player
			byte pogo = *(data+0x900E);
			player.pogostickonstart = pogo;
			player.start_with_shots = *(data+0x9008);

			// vorticon
			vorticon.default_hp = *(data+0x180D)+1;
			vorticon.commander_hp = *(data+0x1819)+1;

			// tank bot
			tankbot.shot_height_from_top = *(data+0x4900);
			misc.ctspace_ammo = GETWORD(data+0xE03);
			misc.ctspace_keys = GETWORD(data+0xE11);
			misc.one_eyed_tile = GETWORD(data+0x4547);

			misc.joy_tile = GETWORD(data+0x992A);
			misc.bat_tile = GETWORD(data+0x995D);
			misc.vac_tile = GETWORD(data+0x9990);
			misc.wsk_tile = GETWORD(data+0x99C3);

			misc.raygun_tile = GETWORD(data+0x1166);
			misc.pogo_tile = GETWORD(data+0x11A7);
			misc.changestoneblock = GETWORD(data+0x2414);
			// TODO: ... More stuff will come here
		}
		else if(episode == 2)
		{	// Code for Episode 2.
			player.pogostickonstart = true;
			player.start_with_shots = *(data+0x8AA2);
			// TODO: ... More stuff will come here
		}
		else if(episode == 3)
		{	// Code for Episode 3.
			player.pogostickonstart = true;
			player.start_with_shots = 5;
			// TODO: ... More stuff will come here
		}

	}
}
开发者ID:pelya,项目名称:Commander-Genius,代码行数:64,代码来源:CPhysicsSettings.cpp


示例6: GETOPEN

static const char *config_access(struct access **ls)
{
	struct access *l;

	GETOPEN();
	while (NOTCLOSE()) {
		REQWORD();
		MAKE(l, struct access);
		l->next = *ls;
		*ls = l;
		if (strceq(tokbuf, c_allow))
			l->type = ALLOW;
		else if (strceq(tokbuf, c_deny))
			l->type = DENY;
		else if (strceq(tokbuf, c_apply))
			l->type = APPLY;
		else
			return e_keyword;
		GETWORD();
		if (*tokbuf == '*')
			l->mask = l->addr = 0;
		else {
			if (strceq(tokbuf, c_exact))
				l->mask = (unsigned long) -1;
			else if ((l->mask = inet_addr(tokbuf))
				 == (unsigned long) -1)
				return e_bad_addr;
			GETWORD();
			if ((l->addr = inet_addr(tokbuf))
			    == (unsigned long) -1)
				return e_bad_addr;
		}
	}
	return 0;
}
开发者ID:kthxbyte,项目名称:KDE1-Linaro,代码行数:35,代码来源:config.c


示例7: IT_GLOBALFREE

void
IT_GLOBALFREE (ENV *envp,LONGPROC f)
{
	DWORD retcode;
	WORD wSel;
	HGLOBAL hGlobal;

	wSel = GETWORD(SP+4) | 1;

	if (wSel == 1)
	{
		envp->reg.sp += HANDLE_86 + RET_86;
		envp->reg.ax = GETWORD(SP+4);
		envp->reg.dx = 0;
		return;
	}

	hGlobal = GetSelectorHandle(wSel);
				
	ZapSegRegs(envp,wSel);

        /* for HUGE objects */
	while ((GetSelectorHandle((UINT)(wSel-8))==hGlobal)) 
	    wSel -= 8;

	while (GetSelectorHandle(wSel) == hGlobal) {
	    FreeSelector(wSel);
	    wSel += 8;
	}
	retcode = (f)(hGlobal);
	envp->reg.sp += HANDLE_86 + RET_86;
	envp->reg.ax = LOWORD(retcode);
	envp->reg.dx = HIWORD(retcode);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:34,代码来源:MemoryIF.c


示例8: IT_COPYMETAFILE

void
IT_COPYMETAFILE(ENV *envp,LONGPROC f)
{
	char buf[0x100];
	WORD wSel;
	HGLOBAL hGlobal;
	LPSTR lpszFile;
	LPBYTE lpData;

	wSel = GETWORD(SP+8);
	hGlobal = GetSelectorHandle(wSel);
	lpszFile = GetAddress(GETWORD(SP+6),GETWORD(SP+4));
	if (lpszFile && strchr(lpszFile,'\\')) {
    	    xdoscall(XDOS_GETALTNAME,0,(void *) buf,(void *) lpszFile); lpszFile = buf;
	}

	hGlobal = CopyMetaFile(hGlobal,lpszFile);
	if (hGlobal) {
	    lpData = (LPBYTE)GlobalLock(hGlobal);
	    wSel = AssignSelector(lpData,0,TRANSFER_DATA,
				GlobalSize(hGlobal));
	    SetSelectorHandle(wSel,hGlobal);
	    GlobalUnlock(hGlobal);
	}
	else
	    wSel = 0;
	envp->reg.sp += HANDLE_86 + LP_86 + RET_86;
	envp->reg.ax = wSel & 0xfffe;
	envp->reg.dx = 0;
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:30,代码来源:MemoryIF.c


示例9: h3600_micro_asset_read

int h3600_micro_asset_read( struct h3600_asset *asset )
{
	unsigned char buf[2];
	int retval = -1;   // TODO: fix this to "no such asset" 

	if (0) printk("%s (%d)\n", __FUNCTION__, asset->type);

	switch (asset->type) {
	case ASSET_HM_VERSION:
		retval = h3600_micro_eeprom_read( 0, asset->a.tchar, 10 );
		break;
	case ASSET_SERIAL_NUMBER:
		retval = h3600_micro_eeprom_read( 10, asset->a.tchar, 40 );
		break;
	case ASSET_MODULE_ID:
		retval = h3600_micro_eeprom_read( 50, asset->a.tchar, 20 );
		break;
	case ASSET_PRODUCT_REVISION:
		retval = h3600_micro_eeprom_read( 70, asset->a.tchar, 10 );
		break;
	case ASSET_PRODUCT_ID:
		retval = h3600_micro_eeprom_read( 80, buf, 2 );
		asset->a.vshort = GETWORD(buf);
		break;
	case ASSET_FRAME_RATE:
		retval = h3600_micro_eeprom_read( 82, buf, 2 );
		asset->a.vshort = GETWORD(buf);
		break;
	case ASSET_PAGE_MODE:
		retval = h3600_micro_eeprom_read( 84, buf, 2 );
		asset->a.vshort = GETWORD(buf);
		break;
	case ASSET_COUNTRY_ID:
		retval = h3600_micro_eeprom_read( 86, buf, 2 );
		asset->a.vshort = GETWORD(buf);
		break;
	case ASSET_IS_COLOR_DISPLAY:
		retval = h3600_micro_eeprom_read( 88, buf, 2 );
		asset->a.vshort = GETWORD(buf);
		break;
	case ASSET_ROM_SIZE:
		retval = h3600_micro_eeprom_read( 90, buf, 2 );
		asset->a.vshort = GETWORD(buf);
		break;
	case ASSET_RAM_SIZE:
		retval = h3600_micro_eeprom_read( 92, buf, 2 );
		asset->a.vshort = GETWORD(buf);
		break;
	case ASSET_HORIZONTAL_PIXELS:
		retval = h3600_micro_eeprom_read( 94, buf, 2 );
		asset->a.vshort = GETWORD(buf);
		break;
	case ASSET_VERTICAL_PIXELS:
		retval = h3600_micro_eeprom_read( 96, buf, 2 );
		asset->a.vshort = GETWORD(buf);
		break;
	}

	return retval;
}
开发者ID:ManiacTwister,项目名称:linux-hnd,代码行数:60,代码来源:h3600_micro.c


示例10: IT_ISBADCODEPTR

void
IT_ISBADCODEPTR (ENV *envp,LONGPROC f)
{
        DWORD retcode;
	LPSTR lpString;

	lpString = MAKELP(GETWORD(SP+8),GETWORD(SP+6));
	retcode = (f)(lpString,0);
        envp->reg.sp += LP_86 + RET_86;
        envp->reg.ax = LOWORD(retcode);
        envp->reg.dx = HIWORD(retcode);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:12,代码来源:MemoryIF.c


示例11: IT_LOCALREALLOC

void
IT_LOCALREALLOC (ENV *envp,LONGPROC f)	/* TWIN_LocalReAlloc */
{
	DWORD retcode;

	retcode = TWIN_LocalReAlloc((HANDLE)GETWORD(SP+8),
			(UINT)GETWORD(SP+6),
			(UINT)GETWORD(SP+4));
	envp->reg.sp += HANDLE_86 + 2*UINT_86 + RET_86;
	envp->reg.ax = LOWORD(retcode);
	envp->reg.dx = HIWORD(retcode);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:12,代码来源:MemoryIF.c


示例12: IT_ACCESSRESOURCE

void
IT_ACCESSRESOURCE (ENV *envp,LONGPROC f)
{
	DWORD retcode;

	retcode = (DWORD)AccessResourceBin(
			(HINSTANCE)GetSelectorHandle(GETWORD(SP+6)),
			(HRSRC)GETWORD(SP+4));

	envp->reg.ax = LOWORD(retcode);
	envp->reg.dx = HIWORD(retcode);
	envp->reg.sp += 2*HANDLE_86 + RET_86;
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:13,代码来源:MemoryIF.c


示例13: IT_OLEENUMOBJ

void
IT_OLEENUMOBJ(ENV *envp,LONGPROC f)
{
    DWORD retcode;
    LPBYTE lp1;

    lp1 = (LPBYTE)GetAddress(GETWORD(SP+6),GETWORD(SP+4));
    retcode = OleEnumObjects((LHCLIENTDOC)GETDWORD(SP+8),
                             (LPOLEOBJECT *)lp1);
    envp->reg.sp += LP_86 + LONG_86 + RET_86;
    envp->reg.ax = LOWORD(retcode);
    envp->reg.dx = HIWORD(retcode);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:13,代码来源:OleIF.c


示例14: IT_LOCALALLOC

void
IT_LOCALALLOC (ENV *envp,LONGPROC f)	/* TWIN_LocalAlloc */
{
	DWORD retcode;

	if (envp != envp_global)
	    envp_global = envp;
	retcode = TWIN_LocalAlloc((UINT)GETWORD(SP+6),
		(UINT)GETWORD(SP+4));
	envp->reg.sp += 2*UINT_86 + RET_86;
	envp->reg.ax = LOWORD(retcode);
	envp->reg.dx = HIWORD(retcode);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:13,代码来源:MemoryIF.c


示例15: IT_PLAYMETAFILE

void
IT_PLAYMETAFILE(ENV *envp,LONGPROC f)
{
	HDC hDC;
	WORD wSel;
	HGLOBAL hGlobal;

	hDC = GETWORD(SP+6);
	wSel = GETWORD(SP+4);
	hGlobal = GetSelectorHandle(wSel);
	envp->reg.ax = PlayMetaFile(hDC, hGlobal);
	envp->reg.sp += 2 * HANDLE_86 + RET_86;
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:13,代码来源:MemoryIF.c


示例16: IT_LOCALINIT

void
IT_LOCALINIT (ENV *envp,LONGPROC f)	/* TWIN_LocalInit */
{
    DWORD retcode;
	UINT seg;

	seg = (UINT)GETWORD(SP+8);
	if (!seg)
	    seg = envp->reg.ds;
	retcode = TWIN_LocalInit(seg, (UINT)GETWORD(SP+6),
			(UINT)GETWORD(SP+4));
	envp->reg.sp += 3*UINT_86 + RET_86;
	envp->reg.ax = LOWORD(retcode);
	envp->reg.dx = HIWORD(retcode);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:15,代码来源:MemoryIF.c


示例17: IT_UNBLOCKSERVER

void
IT_UNBLOCKSERVER (ENV *envp,LONGPROC f)	/* OleUnblockServer */
{
    DWORD retcode;
    LPBYTE lpData;
    BOOL flag;

    lpData = (LPBYTE)GetAddress(GETWORD(SP+6),GETWORD(SP+4));
    flag = (BOOL)GETWORD(lpData);
    retcode = (f)((LHSERVER)GETDWORD(SP+8),&flag);
    PUTWORD(lpData,(WORD)flag);
    envp->reg.sp += LONG_86 + LP_86 + RET_86;
    envp->reg.ax = LOWORD(retcode);
    envp->reg.dx = HIWORD(retcode);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:15,代码来源:OleIF.c


示例18: _86_GlobalHandle

void
_86_GlobalHandle (ENV *envp,LONGPROC f)
{
	DWORD retcode;
	WORD wSel;
	HGLOBAL hGlobal;
	MEMORYINFO *lpMemory = NULL;

	wSel = GETWORD(SP+4);
	hGlobal = GetSelectorHandle(wSel);
	if (hGlobal && (lpMemory = GETHANDLEINFO(hGlobal))) {
	    if (!(lpMemory->wFlags & GMEM_MOVEABLE))
		wSel |= 1;
	    else
		wSel &= 0xfffe;
	}
	else
	    wSel &= 0xfffe;
	retcode = MAKELONG(wSel,wSel | 1);
	envp->reg.sp += WORD_86 + RET_86;
	envp->reg.ax = LOWORD(retcode);
	envp->reg.dx = HIWORD(retcode);
	if (lpMemory != NULL)
	  RELEASEHANDLEINFO(lpMemory);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:25,代码来源:MemoryIF.c


示例19: GETWORD

// Messenger Chat
bool CCharServer::pakMessengerChat ( CCharClient* thisclient, CPacket* P )
{
    WORD id = GETWORD((*P),0);
    char* message = new char[P->Size-41];
    if(message==NULL)
    {
        Log(MSG_ERROR, "Error allocing memory: pakMessengerChat" );
        return false;
    }
    memcpy( message, &P->Buffer[35], P->Size-41 );
    CCharClient* otherclient = (CCharClient*) GetClientByID(id);
    if(otherclient!=NULL)
    {
        BEGINPACKET( pak, 0x7e2 );
        ADDWORD    ( pak, thisclient->charid );
        ADDWORD    ( pak, 0x0000 );
        ADDSTRING  ( pak, thisclient->charname );
        UINT namesize = strlen(thisclient->charname);
        for (int i=0;i<30-namesize;i++)
            ADDBYTE    ( pak, 0x00 );
        ADDBYTE    ( pak, 0x00 );
        ADDSTRING  ( pak, message );
        ADDBYTE    ( pak, 0x00 );
        otherclient->SendPacket(&pak);
    }
    delete []message;
    return true;
}
开发者ID:TheDgtl,项目名称:osrose,代码行数:29,代码来源:community.cpp


示例20: xreloc_relocate

int  xreloc_relocate( xreloc xr ) {
  table *t = (table *) xr;
  int loc;
  int word;
  int mask;
  int err = 0;
  symbol *sym;
  symbol *rel = NULL;
  reloc *r;

  rel = findsym( t, REL_NAME );
  rel->flags = FLAG_RELOCAT | FLAG_GLOBAL;
  rel->loc = 0;

  for( sym = t->syms; sym; sym = sym->next ) {
    if( sym->flags & FLAG_GLOBAL ) { /* symbols to be written to symbol table */
      continue;
    } else if( sym->flags & FLAG_RELOCAT ) { /* symbols need to be relocated */
      sym->flags |= FLAG_WRITTEN;
      for( r = sym->relocs; r; r = r->next ) { 
        add_reloc( t, rel, r->loc, r->size, XRELOC_ABSOLUTE );

        word = GETWORD( t->mem, r->loc );
        mask = ( 1 << r->size ) - 1;
        loc = ( word & mask ) + sym->loc;
        if( loc & ~mask ) {
          fprintf( t->err, "error: relocation out of range for symbol '%s'\n", 
                   sym->name );
          err = 1;
        }
        word = ( word & ~mask ) | ( loc & mask );
        t->mem[r->loc] = word >> 8;
        t->mem[r->loc + 1] = word;
      }
    } else if( sym->loc != INV_ADDR ) { /* symbol is defined */
开发者ID:frosty-zebra,项目名称:OS---A4,代码行数:35,代码来源:xreloc.c



注:本文中的GETWORD函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GET_ALLOC函数代码示例发布时间:2022-05-30
下一篇:
C++ GETU32函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap