⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 w2k_sym2.c

📁 Undocumented Windows 2000 Secrets简体中文版.+源码光盘
💻 C
📖 第 1 页 / 共 2 页
字号:
                        }
                    default:
                        {
                        ptConvention = T("???     ");
                        break;
                        }
                    }
                printf (atLine,
                        j, i, pAddress,
                        pie->dSection, pie->abSection,
                        atStack, ptConvention,
                        (pie->fExported ? '*' : ' '), pbSymbol);

                if (pie->pAddress != NULL) dNotNull++;
                if (pie->fExported       ) dExported++;
                }
            }
        if (pit->dSymbols)
            {
            printf (atStop,
                    dNotNull,  (dNotNull  == 1 ? T("") : T("s")),
                    dExported, (dExported == 1 ? T("") : T("s")));
            }
        imgMemoryDestroy (pit);
        }
    else
        {
        printf (atError, ptModule);
        }
    return;
    }

// =================================================================
// OPTION MANAGEMENT
// =================================================================

VOID WINAPI Option (BOOL   fPlus,
                    PDWORD pdOptions,
                    DWORD  dMask,
                    DWORD  dValue,
                    DWORD  dDefault)
    {
    DWORD dNewValue = *pdOptions & dMask;

    *pdOptions &= ~dMask;

    if (fPlus)
        {
        dNewValue = dValue & dMask;
        }
    else
        {
        if (dNewValue == (dValue & dMask))
            {
            dNewValue = dDefault & dMask;
            }
        }
    *pdOptions |= dNewValue;
    return;
    }

// =================================================================
// MAIN PROGRAM
// =================================================================

DWORD Main (DWORD argc, PTBYTE *argv, PTBYTE *argp)
    {
    PTBYTE ptSections = atMatchAll;
    PTBYTE ptSymbols  = atMatchAll;
    DWORD  dOptions, i, j;
    BOOL   fPlus;

    printf (atAbout);

    if (argc < 2)
        {
        printf (atUsage, atArguments);
        printf (atMoreInfo);
        }
    else
        {
        dOptions = DISPLAY_OPTION_DEFAULT;

        for (i = 1; i < argc; i++)
            {
            switch (argv [i] [0])
                {
                default:
                    {
                    DisplaySymbols (argv [i], ptSections, ptSymbols,
                                    dOptions);
                    break;
                    }
                case ':':
                    {
                    ptSections = argv [i] + 1;
                    break;
                    }
                case '/':
                    {
                    ptSymbols  = argv [i] + 1;
                    break;
                    }
                case '+':
                case '-':
                    {
                    for (j = 0; argv [i] [j]; j++)
                        {
                        switch (argv [i] [j])
                            {
                            case '+':
                                {
                                fPlus = TRUE;
                                break;
                                }
                            case '-':
                                {
                                fPlus = FALSE;
                                break;
                                }
                            case 'a':
                            case 'A':
                                {
                                Option (fPlus, &dOptions,
                                        DISPLAY_OPTION_SORT,
                                        DISPLAY_OPTION_ADDRESS,
                                        DISPLAY_OPTION_DEFAULT);
                                break;
                                }
                            case 'n':
                                {
                                Option (fPlus, &dOptions,
                                        DISPLAY_OPTION_SORT,
                                        DISPLAY_OPTION_NAME_IC,
                                        DISPLAY_OPTION_DEFAULT);
                                break;
                                }
                            case 'N':
                                {
                                Option (fPlus, &dOptions,
                                        DISPLAY_OPTION_SORT,
                                        DISPLAY_OPTION_NAME,
                                        DISPLAY_OPTION_DEFAULT);
                                break;
                                }
                            case 'i':
                            case 'I':
                                {
                                Option (fPlus, &dOptions,
                                        DISPLAY_OPTION_IGNORECASE,
                                        DISPLAY_OPTION_IGNORECASE,
                                        DISPLAY_OPTION_DEFAULT);
                                break;
                                }
                            case 'p':
                            case 'P':
                                {
                                Option (fPlus, &dOptions,
                                        DISPLAY_OPTION_PREFERRED,
                                        DISPLAY_OPTION_PREFERRED,
                                        DISPLAY_OPTION_DEFAULT);
                                break;
                                }
                            case 'r':
                            case 'R':
                                {
                                Option (fPlus, &dOptions,
                                        DISPLAY_OPTION_RELATIVE,
                                        DISPLAY_OPTION_RELATIVE,
                                        DISPLAY_OPTION_DEFAULT);
                                break;
                                }
                            case 'd':
                            case 'D':
                                {
                                Option (fPlus, &dOptions,
                                        DISPLAY_OPTION_DECORATED,
                                        DISPLAY_OPTION_DECORATED,
                                        DISPLAY_OPTION_DEFAULT);
                                break;
                                }
                            case 'x':
                            case 'X':
                                {
                                Option (fPlus, &dOptions,
                                        DISPLAY_OPTION_EXPORTED,
                                        DISPLAY_OPTION_EXPORTED,
                                        DISPLAY_OPTION_DEFAULT);
                                break;
                                }
                            case 'u':
                            case 'U':
                                {
                                Option (fPlus, &dOptions,
                                        DISPLAY_OPTION_UNDEFINED,
                                        DISPLAY_OPTION_UNDEFINED,
                                        DISPLAY_OPTION_DEFAULT);
                                break;
                                }
                            case 's':
                            case 'S':
                                {
                                Option (fPlus, &dOptions,
                                        DISPLAY_OPTION_SPECIAL,
                                        DISPLAY_OPTION_SPECIAL,
                                        DISPLAY_OPTION_DEFAULT);
                                break;
                                }
                            case 'z':
                            case 'Z':
                                {
                                Option (fPlus, &dOptions,
                                        DISPLAY_OPTION_ZERO,
                                        DISPLAY_OPTION_ZERO,
                                        DISPLAY_OPTION_DEFAULT);
                                break;
                                }
                            }
                        }
                    break;
                    }
                }
            }
        }
    return 0;
    }

// =================================================================
// END OF PROGRAM
// =================================================================

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -