bool_t GetCXTFunction ( pnode_t pnLeft, pnode_t pnRight ) { Unreferenced( pnLeft ); Unreferenced( pnRight ); return (FALSE); }
SHFLAG PHExactCmp( HVOID hvStr, HVOID hvSym, LSZ lpb, SHFLAG fCase ) { LPSSTR lpsstr = (LPSSTR) hvStr; size_t cb; SHFLAG shf = TRUE; Unreferenced (hvSym); if (lpb) { cb = (size_t)*lpb; // if length is diff, they are not equal if (lpsstr && (size_t) lpsstr->cb == cb) { if (fCase) { shf = (SHFLAG) memcmp (lpb + 1, lpsstr->lpName, cb); } else { shf = (SHFLAG) _tcsnicmp(lpb + 1, (_TCHAR *)lpsstr->lpName, cb); } } } return shf; }
SHFLAG PHExactCmp ( LPSSTR lpsstr, LPV lpv, LSZ lpb, SHFLAG fCase ) { unsigned char cb; SHFLAG shf = TRUE; Unreferenced( lpv ); if ( lpb ) { cb = *lpb; // if length is diff, they are not equal if ( lpsstr && lpsstr->cb == cb ) { if ( fCase ) { shf = (SHFLAG) memcmp ( lpb + 1, lpsstr->lpName, cb ); } else { shf = (SHFLAG) _strnicmp( lpb + 1, (LPSTR) lpsstr->lpName, cb ); } } } return shf; }
void RefCountedImpl::Release() { LOGCALL(("RefCountedImpl::Release() (%s), count=%d\n", object_identity, ref_count - 1)); if (InterlockedDecrement(&ref_count) == 0) Unreferenced(); }
void CRefReport::OnNMDblclkList3(NMHDR *pNMHDR, LRESULT *pResult) { Unreferenced(pNMHDR); // TODO: Add your control notification handler code here int i = m_lc.GetSelectionMark(); if(i >= 0) { NodeData * pNodeData = (NodeData*)m_lc.GetItemData(i); m_pNDBViewDlg->PerformAction(pNodeData); } *pResult = 0; }
HTYPE LOADDS PASCAL THGetNextType ( HMOD hmod, HTYPE hType ) { Unreferenced( hmod ); Unreferenced( hType ); return(NULL); }
INT_PTR CALLBACK DlgFunction( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) { char szFuncName[128]; HWND hFuncName; ADDR addr; static DWORD HelpArray[]= { ID_FUNCTION_FUNCNAME, IDH_ADDR, 0, 0 }; Unreferenced( lParam ); switch (message) { case WM_INITDIALOG: /* ** Initialize the edit item for the address field */ Dbg((hFuncName = GetDlgItem(hDlg, ID_FUNCTION_FUNCNAME))!=NULL); Dbg(SendMessage(hFuncName, EM_LIMITTEXT, sizeof(szFuncName)-1, 0L)); /* ** Initialise entry field with current selection */ *szFuncName = '\0'; if (Views[curView].Doc > -1) { if ((hwndActiveEdit != NULL) && (Docs[Views[curView].Doc].docType == DOC_WIN)) { BOOL lookAround = TRUE; GetCurrentText(curView, &lookAround, (LPSTR)szFuncName, min(MAX_USER_LINE, sizeof(szFuncName)-1), NULL, NULL); } } /* ** Send the text and select it */ SendMessage(hFuncName, WM_SETTEXT, 0, (LPARAM)(LPSTR)szFuncName); #ifdef WIN32 SendMessage(hFuncName, EM_SETSEL, 0, (LPARAM) -1); #else SendMessage(hFuncName, EM_SETSEL, 0, MAKELONG(0, 0x7FFF)); #endif SetFocus(hFuncName); return (FALSE); case WM_HELP: WinHelp((HWND)((LPHELPINFO) lParam)->hItemHandle, "windbg.hlp", HELP_WM_HELP, (DWORD_PTR)(LPVOID) HelpArray ); return TRUE; case WM_CONTEXTMENU: WinHelp ((HWND) wParam, "windbg.hlp", HELP_CONTEXTMENU, (DWORD_PTR)(LPVOID) HelpArray ); return TRUE; case WM_COMMAND: switch (wParam) { /* ** Get the address string and attempt to change to the ** desired address */ case IDOK : Dbg((hFuncName = GetDlgItem(hDlg, ID_FUNCTION_FUNCNAME))!=NULL); GetDlgItemText(hDlg, ID_FUNCTION_FUNCNAME, (LPSTR)szFuncName, sizeof(szFuncName)); if (!LocateFunction(szFuncName, &addr)) { ErrorBox2(hDlg, MB_TASKMODAL, ERR_Function_Locate); SendMessage(hFuncName, EM_SETSEL, 0, (DWORD) -1); SetFocus(hFuncName); } else { if (!MoveEditorToAddr(&addr, TRUE)) { if (disasmView == -1) { OpenDebugWindow(DISASM_WIN, TRUE); // User activated } } if (disasmView != -1) { OpenDebugWindow(DISASM_WIN, TRUE); // User activated ViewDisasm(&addr, disasmForce); } EndDialog(hDlg, TRUE); } return TRUE; case IDCANCEL : EndDialog(hDlg, FALSE); return (TRUE); } break; } return (FALSE); } /* DlgFunction() */
INT_PTR DlgFuncResolve( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) { int Index; static DWORD HelpArray[]= { ID_FUNCRES_LABEL2, IDH_FMT, ID_FUNCRES_LIST, IDH_EXPAND, ID_FUNCRES_USE, IDH_NOTEXPAND, 0, 0 }; Unreferenced( lParam ); switch( msg ) { case WM_INITDIALOG: FuncFound = FALSE; for ( Index = 0; Index < FuncListSize; Index++ ) { SendMessage( GetDlgItem(hDlg, ID_FUNCRES_LIST ), LB_ADDSTRING, 0, (LPARAM)(LPSTR)FuncList[Index].Str ); } break; case WM_HELP: WinHelp((HWND)((LPHELPINFO) lParam)->hItemHandle, "windbg.hlp", HELP_WM_HELP, (DWORD_PTR)(LPVOID) HelpArray ); return TRUE; case WM_CONTEXTMENU: WinHelp ((HWND) wParam, "windbg.hlp", HELP_CONTEXTMENU, (DWORD_PTR)(LPVOID) HelpArray ); return TRUE; case WM_COMMAND: switch( LOWORD( wParam ) ) { case ID_FUNCRES_USE: Index = (int) SendMessage( GetDlgItem(hDlg, ID_FUNCRES_LIST ), LB_GETCURSEL, 0, 0L ); FuncAddr = FuncList[Index].Addr; FuncFound = TRUE; EndDialog(hDlg, TRUE); return TRUE; case IDCANCEL: FuncFound = FALSE; EndDialog(hDlg, TRUE); return TRUE; } break; } return FALSE; }
EESTATUS GetExpr ( uint radix, PEEHSTR phStr, ulong *pEnd ) { EESTATUS retval = EENOMEMORY; char *pStr; char *pExprStr; HDEP hExprStr; int len; ulong strIndex; UINT nLen; Unreferenced( radix ); //M00KLUDGE - this routine will eventuall have to walk the bound tree // and format the expression because of ambiguous expressions // use the saved original string if there is one // (in case the expression has been modified) if (pExState->hExStrSav) { hExprStr = pExState->hExStrSav; len = pExState->ExLenSav; strIndex = pExState->strIndexSav; } else { hExprStr = pExState->hExStr; len = pExState->ExLen; strIndex = pExState->strIndex; } pExprStr = (char *) MemLock (hExprStr); nLen = len+1; if (((*phStr = MemAllocate (nLen)) != 0)) { // the expression has been bound and memory allocated char tempBuf[TYPESTRMAX]; UINT nb; UINT nIndex = 0; BOOL fHSYM; char *psz; ulong nAdj = 0; pStr = (char *) MemLock (*phStr); for (psz = pExprStr; (psz < pExprStr + len) && *psz; psz = _tcsinc (psz)) { fHSYM = FALSE; if (*psz == HSYM_MARKER) { HSYM hSym = GetHSYMFromHSYMCode(psz + 1); psz += HSYM_CODE_LEN; // skip embedded HSYM code fHSYM = TRUE; DASSERT (hSym); if (GetNameFromHSYM(tempBuf, hSym) == FALSE) { pExState->err_num = ERR_INTERNAL; MemUnLock(*phStr); MemUnLock(hExprStr); return EEGENERAL; } nb = _tcslen(tempBuf); // compute adjustment for strIndex: // if an HSYM is to the left of strIndex, // strIndex needs to be adjusted if (psz <= pExprStr + strIndex) nAdj += (nb - sizeof (char) - HSYM_CODE_LEN); } else { nb = 1; } // check if there is space in the buffer and // copy nb characters to the destination string if (nIndex + nb > nLen-1) { // there is not enough space, grow buffer MemUnLock(*phStr); nLen += NAMESTRMAX; if ((*phStr = MemReAlloc(*phStr, nLen)) == 0){ MemUnLock(hExprStr); return EENOMEMORY; } pStr = (char *) MemLock (*phStr); } if (fHSYM) { // copy name from tembBuf memcpy(pStr+nIndex, tempBuf, nb); nIndex += nb; } else { // copy a single character from pExprStr _tccpy (pStr + nIndex, psz); nIndex += _tclen (psz); } } pStr[nIndex++] = 0; MemUnLock (*phStr); // Reallocate the buffer in case it is too large DASSERT (nIndex <= nLen); if (nIndex < nLen && (*phStr = MemReAlloc(*phStr, nIndex)) == 0){ MemUnLock(hExprStr); return EENOMEMORY; } retval = EENOERROR; *pEnd = strIndex + nAdj; } MemUnLock (hExprStr); return retval; }
static BOOL PrFormatInfo( PA pa, LPSTR lpTarget, UINT cch ) /*++ Routine Description: This routine will format the data associated with a process for displaying to the user. Arguments: lppd - Supplies internal handle to process to be formatted lpTarget - Supplies where to place the formatted string cch - Supplies count of characters in buffer Return Value: TRUE if successful and FALSE otherwise --*/ { PST pst; Unreferenced(cch); OSDGetProcessStatus(pa->lppd->hpid, &pst); sprintf(lpTarget, szPrFmt, (pa->lppd == LppdCur)? " * " : (pa->fSet ? "(*)" : " "), pa->lppd->ipid, pst.rgchProcessID, pst.rgchProcessState); #if 0 long cbPid; char rgb[10]; char szStr[100]; LPSTR lpstr; Unreferenced(cch); OSDGetDebugMetric(mtrcPidSize, pa->lppd->hpid, 0, &cbPid ); OSDGetDebugMetric(mtrcPidValue, pa->lppd->hpid, 0, (long *) &rgb); EEFormatMemory(szStr, cbPid*2+1, rgb, cbPid*8, fmtUInt|fmtZeroPad, 16); OSDPtrace(osdProcStatus, 0, &lpstr, pa->lppd->hpid, 0); sprintf(lpTarget, szPrFmt, (pa->lppd == LppdCur)? " * " : (pa->fSet ? "(*)" : " "), pa->lppd->ipid, cbPid*2, cbPid*2, szStr, lpstr); #endif return TRUE; } /* PrFormatInfo() */