Annotation of mstools/samples/porttool/port.h, revision 1.1.1.1

1.1       root        1: // include windows.h before including this header file into your source
                      2: 
                      3: // define some string length constants
                      4: #define    MAXTOKENLEN           100
                      5: #define    MAXHELPLEN            100
                      6: #define    MAXISSUELEN           1024
                      7: #define    MAXSUGGESTLEN         1024
                      8: 
                      9: // define option flags
                     10: #define    PT_IGNORETOKEN        0x00010000    // informs port.dll to ignore this token
                     11: #define    PT_DEFAULT            0x00000000    // checks for everything
                     12: #define    PT_NOAPIS             0x00000002    // do not check for APIs
                     13: #define    PT_NOMESSAGES         0x00000004    // do not check for messages
                     14: #define    PT_NOTYPES            0x00000008    // do not check for types
                     15: #define    PT_NOSTRUCTURES       0x00000010    // do not check for structures
                     16: #define    PT_NOMACROS           0x00000020    // do not check for macros
                     17: #define    PT_NOCONSTANTS        0x00000040    // do not check for constants
                     18: #define    PT_NOCUSTOM           0x00000080    // do not check for custom tokens
                     19: #define    PT_IGNORECASE         0x00000100    // disable case sensitivity
                     20:                                                //   (not helpful for APIs and MSGs)
                     21: 
                     22: 
                     23: // result structure returns results of line checked
                     24: typedef struct tagResult
                     25:     {
                     26:     char    *lpszToken;
                     27:     char    *lpszHelpStr;
                     28:     char    *lpszIssue;
                     29:     char    *lpszSuggest;
                     30:     int     nPosToken;
                     31:     }RESULT, * LPRESULT;
                     32: 
                     33: 
                     34: // function checks a string for a matching token
                     35: BOOL WINAPI CheckString (char *lpszSrc, DWORD fSearch, LPRESULT lpResult);
                     36: //    lpszSrc  - source string to search
                     37: //    fSearch  - search flags define how to check string
                     38: //    lpResult - structure of data passed to/from DLL
                     39: //
                     40: // When calling this function you must pass a valid LPRESULT structure having
                     41: //   allocated memory for each of the string pointer fields in the structure.
                     42: //   It is recommended that you allocate enough memory to fulfill the max length
                     43: //   for each field as defined by the constants above. Also, you must indicate the
                     44: //   actual length of each string allocated in the first WORD of each string.  The
                     45: //   CheckString function will copy at most length-1 characters and zero terminate
                     46: //   the string for you.
                     47: //
                     48: // New for version 2.2.  The option to ignore a specific issue for the duration of
                     49: //   the DLL is loaded is now provided.  This is done by calling the CheckString
                     50: //   function with the PT_IGNORETOKEN bit set in the search flags.  In this case,
                     51: //   the CheckString function toggles the ignore state on a token matching the string
                     52: //   lpszSrc passed to the function.  The lpResult parameter is ignored in this case.
                     53: //   Successive calls with the PT_IGNORETOKEN bit can be used to toggle the state of
                     54: //   any token to IGNORED or not IGNORED.
                     55: //  NOTE: The PT_IGNORETOKEN flag cannot be reset by the DLL since the search flags
                     56: //   parameter is passed by value.  The application that calls CheckString must reset
                     57: //   the flag when the function returns.
                     58: //

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.