Annotation of ntddk/src/print/localmon/local.h, revision 1.1

1.1     ! root        1: /*++
        !             2: 
        !             3: Copyright (c) 1990  Microsoft Corporation
        !             4: 
        !             5: Module Name:
        !             6: 
        !             7:     local.h
        !             8: 
        !             9: Abstract:
        !            10: 
        !            11:     Header file for Local Print Providor
        !            12: 
        !            13: Author:
        !            14: 
        !            15:     Dave Snipp (DaveSn) 15-Mar-1991
        !            16: 
        !            17: Revision History:
        !            18: 
        !            19: --*/
        !            20: 
        !            21: extern  HANDLE   hInst;
        !            22: extern  HANDLE   hHeap;
        !            23: extern  HANDLE   HeapSemaphore;
        !            24: extern  HANDLE   InitSemaphore;
        !            25: extern  CRITICAL_SECTION    SpoolerSection;
        !            26: extern  DWORD    PortInfo1Offsets[];
        !            27: 
        !            28: 
        !            29: #define IDS_LOCALMONITOR            300
        !            30: #define IDS_INVALIDPORTNAME_S       301
        !            31: #define IDS_PORTALREADYEXISTS_S     302
        !            32: #define IDS_NOTHING_TO_CONFIGURE    303
        !            33: #define IDS_COULD_NOT_OPEN_FILE     304
        !            34: #define IDS_UNKNOWN_ERROR           305
        !            35: #define IDS_OVERWRITE_EXISTING_FILE 306
        !            36: 
        !            37: #define MSG_ERROR           MB_OK | MB_ICONSTOP
        !            38: #define MSG_WARNING         MB_OK | MB_ICONEXCLAMATION
        !            39: #define MSG_YESNO           MB_YESNO | MB_ICONQUESTION
        !            40: #define MSG_INFORMATION     MB_OK | MB_ICONINFORMATION
        !            41: #define MSG_CONFIRMATION    MB_OKCANCEL | MB_ICONEXCLAMATION
        !            42: 
        !            43: #define TIMEOUT_MIN         1
        !            44: #define TIMEOUT_MAX       999
        !            45: #define TIMEOUT_STRING_MAX  3
        !            46: 
        !            47: #define WITHINRANGE( val, lo, hi ) \
        !            48:     ( ( val <= hi ) && ( val >= lo ) )
        !            49: 
        !            50: 
        !            51: /* DEBUGGING:
        !            52:  */
        !            53: 
        !            54: #define DBG_NONE    0x00000000
        !            55: #define DBG_INFO    0x00000001
        !            56: #define DBG_WARNING 0x00000002
        !            57: #define DBG_ERROR   0x00000004
        !            58: #define DBG_TRACE   0x00000008
        !            59: 
        !            60: #if DBG
        !            61: 
        !            62: /* Quick fix:
        !            63:  *
        !            64:  * Ensure DbgPrint and DbgBreakPoint are prototyped,
        !            65:  * so that we're not screwed by STDCALL.
        !            66:  * This should be replaced by OutputDebugString
        !            67:  */
        !            68: ULONG
        !            69: DbgPrint(
        !            70:     PCH Format,
        !            71:     ...
        !            72:     );
        !            73: 
        !            74: VOID
        !            75: DbgBreakPoint(
        !            76:     VOID
        !            77:     );
        !            78: 
        !            79: 
        !            80: #define GLOBAL_DEBUG_FLAGS Debug
        !            81: 
        !            82: extern DWORD GLOBAL_DEBUG_FLAGS;
        !            83: 
        !            84: /* These flags are not used as arguments to the DBGMSG macro.
        !            85:  * You have to set the high word of the global variable to cause it to break.
        !            86:  * It is ignored if used with DBGMSG.
        !            87:  * (Here mainly for explanatory purposes.)
        !            88:  */
        !            89: #define DBG_BREAK_ON_WARNING    ( DBG_WARNING << 16 )
        !            90: #define DBG_BREAK_ON_ERROR      ( DBG_ERROR << 16 )
        !            91: 
        !            92: /* Double braces are needed for this one, e.g.:
        !            93:  *
        !            94:  *     DBGMSG( DBG_ERROR, ( "Error code %d", Error ) );
        !            95:  *
        !            96:  * This is because we can't use variable parameter lists in macros.
        !            97:  * The statement gets pre-processed to a semi-colon in non-debug mode.
        !            98:  *
        !            99:  * Set the global variable GLOBAL_DEBUG_FLAGS via the debugger.
        !           100:  * Setting the flag in the low word causes that level to be printed;
        !           101:  * setting the high word causes a break into the debugger.
        !           102:  * E.g. setting it to 0x00040006 will print out all warning and error
        !           103:  * messages, and break on errors.
        !           104:  */
        !           105: #define DBGMSG( Level, MsgAndArgs ) \
        !           106: {                                   \
        !           107:     if( ( Level & 0xFFFF ) & GLOBAL_DEBUG_FLAGS ) \
        !           108:         DbgPrint MsgAndArgs;      \
        !           109:     if( ( Level << 16 ) & GLOBAL_DEBUG_FLAGS ) \
        !           110:         DbgBreakPoint(); \
        !           111: }
        !           112: 
        !           113: #else
        !           114: #define DBGMSG
        !           115: #endif
        !           116: 
        !           117: 
        !           118: 
        !           119: BOOL APIENTRY
        !           120: PortNameDlg(
        !           121:    HWND   hwnd,
        !           122:    WORD   msg,
        !           123:    WPARAM wparam,
        !           124:    LPARAM lparam
        !           125: );
        !           126: 
        !           127: BOOL APIENTRY
        !           128: ConfigureLPTPortDlg(
        !           129:    HWND   hwnd,
        !           130:    WORD   msg,
        !           131:    WPARAM wparam,
        !           132:    LPARAM lparam
        !           133: );
        !           134: 
        !           135: BOOL APIENTRY
        !           136: PrintToFileDlg(
        !           137:    HWND   hwnd,
        !           138:    WORD   msg,
        !           139:    WPARAM wparam,
        !           140:    LPARAM lparam
        !           141: );
        !           142: 
        !           143: VOID
        !           144: EnterSplSem(
        !           145:    VOID
        !           146: );
        !           147: 
        !           148: VOID
        !           149: LeaveSplSem(
        !           150:    VOID
        !           151: );
        !           152: 
        !           153: LPVOID
        !           154: AllocSplMem(
        !           155:     DWORD cb
        !           156: );
        !           157: 
        !           158: BOOL
        !           159: FreeSplMem(
        !           160:    LPVOID pMem,
        !           161:    DWORD  cb
        !           162: );
        !           163: 
        !           164: LPVOID
        !           165: ReallocSplMem(
        !           166:    LPVOID lpOldMem,
        !           167:    DWORD cbOld,
        !           168:    DWORD cbNew
        !           169: );
        !           170: 
        !           171: LPWSTR
        !           172: AllocSplStr(
        !           173:     LPWSTR lpStr
        !           174: );
        !           175: 
        !           176: BOOL
        !           177: FreeSplStr(
        !           178:    LPWSTR lpStr
        !           179: );
        !           180: 
        !           181: BOOL
        !           182: ReallocSplStr(
        !           183:    LPWSTR *plpStr,
        !           184:    LPWSTR lpStr
        !           185: );
        !           186: 
        !           187: PINIENTRY
        !           188: FindName(
        !           189:    PINIENTRY pIniKey,
        !           190:    LPWSTR pName
        !           191: );
        !           192: 
        !           193: PINIENTRY
        !           194: FindIniKey(
        !           195:    PINIENTRY pIniEntry,
        !           196:    LPWSTR lpName
        !           197: );
        !           198: 
        !           199: LPBYTE
        !           200: PackStrings(
        !           201:    LPWSTR *pSource,
        !           202:    LPBYTE pDest,
        !           203:    DWORD *DestOffsets,
        !           204:    LPBYTE pEnd
        !           205: );
        !           206: 
        !           207: int
        !           208: Message(
        !           209:     HWND hwnd,
        !           210:     DWORD Type,
        !           211:     int CaptionID,
        !           212:     int TextID,
        !           213:     ...
        !           214: );
        !           215: 
        !           216: DWORD
        !           217: ReportError(
        !           218:     HWND  hwndParent,
        !           219:     DWORD idTitle,
        !           220:     DWORD idDefaultError
        !           221: );
        !           222: 
        !           223: BOOL
        !           224: MakeLink(
        !           225:     LPWSTR  pOldDosDeviceName,
        !           226:     LPWSTR  pNewDosDeviceName,
        !           227:     LPWSTR *ppOldNtDeviceName,
        !           228:     LPWSTR  pNewNtDeviceName,
        !           229:     SECURITY_DESCRIPTOR *pSecurityDescriptor
        !           230: );
        !           231: 
        !           232: BOOL
        !           233: RemoveLink(
        !           234:     LPWSTR  pOldDosDeviceName,
        !           235:     LPWSTR  pNewDosDeviceName,
        !           236:     LPWSTR  *ppOldNtDeviceName
        !           237: );

unix.superglobalmegacorp.com

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