📄 msd.h
字号:
/*********************************************************************
* Microsoft Diagnostics Version 2.0
*
* A diagnostic utility to detect as much useful information about a
* customer's computer system as is possible.
*
* Microsoft Diagnostics: We detect the World.
*
* MSD.H - Main header file
*
* Note: _MSD.H and MSD.H are interdependent.
********************************************************************/
#include <ctype.h>
#include <conio.h>
#include <dos.h>
#include <bios.h>
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <direct.h>
#include <sys\types.h>
#include <sys\stat.h>
#include "NETBIOS2.H"
#include "NETCONS.H"
#include "NETERR.H"
#include "CONFIG.H"
#include "REMUTIL.H"
#include "WKSTA.H"
#include "SERVER.H"
#include "SERVICE.H"
#include "STRINGS.H"
#undef _MAX_PATH
#define _MAX_PATH 126 + 13
/* Include a CW_INCLUDED define in the make file, or uncomment */
/* "#define CW_INCLUDED" to include the CW code. Turn the */
/* warning level down to 3 when compiling CW code. */
/*
#define CW_INCLUDED 1
*/
#ifdef CW_INCLUDED
#define BLADE 1 /* Enable CW 3.1 extensions and features. */
#define ADM 1 /* Use 3.1 dialog manager. */
#define DEBUG 1 /* Include debugging CW info. */
#define CC 1 /* Use normal MS C 6.0 compile. */
#define SMM 1 /* The CW menu manager */
#define WIN_BTN 1 /* For my non-CW buttons */
#define BASED 1
/* To reduce warnings, I undef these */
#undef min
#undef max
#undef NULL
#ifdef BASED
extern _segment pWndSeg;
#endif
#define WM_DLGUSER 20
#define LINT_ARGS 1
#include "cwindows.h"
#include "csdm.h"
#include "scr.h"
#include "menu.h"
#include "csdmtmpl.h"
/* colors from isaUserMin to isaUserMax-1 */
/* are available for application use */
#define isaSummaryBlank (isaUserMin)
#define isaSummaryText (isaUserMin+1)
#define isaInfoActive (isaUserMin+2)
#define isaInfoActiveBorder (isaUserMin+3)
#define isaInfoInactive (isaUserMin+4)
#define isaStatusLine (isaUserMin+5)
#define isaAlternate (isaUserMin+6)
#define isaMemoryMap (isaUserMin+7)
#define isaSummaryBtnShadow (isaUserMin+8)
#define isaMessageBtn1 (isaUserMin+9)
#define isa3DBtnHilite (isaUserMin+10)
#define isaTemp (isaUserMin+15)
typedef struct _ISA_PAIR
{
WORD wFore; /* Foreground color */
WORD wBack; /* Background color */
} ISA_PAIR;
extern ISA_PAIR aisapColor[];
extern ISA_PAIR aisapBlackAndWhite[];
#define STATIC
#define REGISTER register
#define Unreferenced(x) ((void)x)
#define MainProcCallID 1
#define MainMenuCallID 2
#define InfoWndCallID 3
#define InfoTxtWndCallID 24
#define StatusLineCallID 5
#define MainProcExtraBytes 20
#define NumBtns 13
#define BaseBtnID 10
#define SUM_BUTTON_WIDTH 21
#define SUM_COLUMN_ONE 1
#define SUM_COLUMN_TWO 46
/* Defines for Window Extra Bytes */
#define WEB_WINDOW_TITLE 1
#define WEB_MIN_SCROLL 2
#define WEB_MAX_SCROLL 3
#define WEB_NMBR_LINES 4
#define WEB_SCROLLABLE_LINES 5
#define WEB_PQSZ_TEXT 6
#define WEB_KEEP_FOCUS 7
/* Defines for the info windows */
#define BaseCtrlID 20
#define OkButtonID 21
#define CancelButtonID 22
#define BrowseButtonID 23
#define InfoTxtID 24
#define InfoScrollID 25
/* Common PWNDs */
extern PWND_DESKTOP PASCAL pwndDesktop;
extern PWND pwndSummaryFrame;
extern PWND pwndMainFrame;
extern PWND pwndStatusLine;
extern PLFN_WNDPROC OldMsgBoxProc;
extern PLFN_WNDPROC OldEditItemProc;
/* User defined window messages */
#define WM_INFO_WND_CLOSED WM_USER + 1
#define WM_NEW_STATUS_LINE_STRING WM_USER + 2
#define MY_EN_SETFOCUS WM_USER + 3
/* Status string defines */
#define ST_WORKING 10001
#define ST_WARN_WINDOWS_USER 10002
#define ST_REPORT_COMPLETED 10003
#define ST_SEARCHING 10004
#define ST_INSERT_DLG1 10005
#define ST_INSERT_DLG2 10006
#define ST_INSERT_DLG3 10007
#define ST_INSERT_DLG4 10008
#define ST_CUST_INFO 10009
#define ST_VIEW_WHICH_FILE 10010
#define ST_FINDFILE2 10011
/* The value of IDD_USER is up to you. Just make sure that it is */
/* greater than 10. The first 10 values are for pre-defined CW */
/* controls like IDOK and IDCANCEL... */
#define IDD_USER 20
/* Dialog Box Template */
typedef struct _DIALOG_BOX {
DLGHEADTEMPLATE dlgHeader;
DLGITEMTEMPLATE rgtm[];
} DIALOG_BOX;
/* Dialog Boxes */
extern DIALOG_BOX dlgReport;
extern DIALOG_BOX dlgFindFile1;
extern DIALOG_BOX dlgFindFile2;
extern DIALOG_BOX dlgInsertCmd1;
extern DIALOG_BOX dlgInsertCmd2;
extern DIALOG_BOX dlgInsertCmd3;
extern DIALOG_BOX dlgInsertCmd4;
extern DIALOG_BOX dlgTestPrinter;
extern DIALOG_BOX dlgCustInfo;
extern DIALOG_BOX dlgAbout;
extern DIALOG_BOX dlgMemoryBlockDisplay;
extern DIALOG_BOX dlgMemoryBrowser;
extern DIALOG_BOX dlgViewWhichFile;
extern DIALOG_BOX dlgWarnWindowsUser;
#define SetAccelerator(pwnd, Position, szText) \
((PWND_GEN)(pwnd))->aclDialog = (((BYTE)((Position) - 1)) << 8) + \
*((unsigned char *)(szText) + ((Position) - 1))
extern BOX boxInfoBox;
#else /* CW not included */
#define VOID void
#define WORD unsigned int
#define DWORD unsigned long
#define BOOL unsigned int
#define CHAR char
#define BYTE unsigned char
#define FAR _far
#define FALSE 0
#define TRUE 1
#define BIT unsigned
#define BITS unsigned
#endif
#define PSZ char *
#define INT int
#define UCHAR unsigned char
#define LPWORD WORD FAR *
#define WINAPI _far _pascal
typedef unsigned int UINT;
typedef const char FAR* LPCSTR;
/* FAR_INFO_DATA controls how the info data will be stored */
/* TRUE means the info string data will be far. */
#define FAR_INFO_STRINGS TRUE
#ifdef FAR_INFO_STRINGS
#define QSZ CHAR FAR *
#define Qmalloc _fmalloc
#define Qfree _ffree
#define Qmemset _fmemset
#define Qstrcpy _fstrcpy
#define Qstrcat _fstrcat
#define Qstrlen _fstrlen
#define Qstrncpy _fstrncpy
#define Qexpand _fexpand
#else
#define QSZ CHAR *
#define Qmalloc malloc
#define Qfree free
#define Qmemset memset
#define Qstrcpy strcpy
#define Qstrcat strcat
#define Qstrlen strlen
#define Qstrncpy strncpy
#define Qexpand _expand
#endif
/* Defining LIB is unnecessary as the #defines it provides exist already */
/* #define LIB */
#include "ver.h"
#define DWORDUP(x) ((BYTE *) (((WORD) x & 0x03) ? ((WORD) x | 0x03) + 1 : (WORD) x))
#define ParseLine IsMsDos
/* Record Types */
#define IDI_ALL_RECORDS 0
#define IDI_MSD_HEADER_RECORD 1
#define IDI_CUSTOMER_INFORMATION 2
#define IDI_SUMMARY_SCREEN 3
#define IDI_COMPUTER_RECORD 4
#define IDI_MEMORY_RECORD 5
#define IDI_VIDEO_RECORD 6
#define IDI_NETWORK_RECORD 7
#define IDI_OS_VERSION_RECORD 8
#define IDI_MOUSE_RECORD 9
#define IDI_OTHER_ADAPTERS_RECORD 10
#define IDI_DISK_DRIVE_RECORD 11
#define IDI_LPT_RECORD 12
#define IDI_COM_RECORD 13
#define IDI_IRQ_RECORD 14
#define IDI_TSR_PROGRAMS_RECORD 15
#define IDI_DEVICE_DRIVERS_RECORD 16
#define IDI_FIRST_RECORD_TO_SUMMARIZE IDI_COMPUTER_RECORD
#define IDI_LAST_RECORD_TO_SUMMARIZE IDI_COM_RECORD
#define IDI_SECOND_COLUMN IDI_MOUSE_RECORD
#define NMBR_OF_RECORDS 17
extern WORD rwRecordTypes[]; /* Record type numbers in a convenient array */
extern WORD wMaxRecords;
/* Error Indications for ShowError */
#ifdef CW_INCLUDED
#define ERR_OK_BUTTON MB_OK
#else
#define ERR_OK_BUTTON 1
#endif
/* FindFile defines */
#define SEARCH_FLOPPIES 0x0001
#define SEARCH_LOCAL_DRIVES 0x0002
#define SEARCH_NET_DRIVES 0x0004
#define SEARCH_ROOT 0x0100
#define RECURSE_INTO_SUB_DIRS 0x0200
#define SEARCH_VERSION 0x0400
#define SEARCH_LANMAN_ROOT 0x2000
#define SEARCH_WINDIR 0x4000
#define SEARCH_BOOT_DRIVE 0x8000
/* Report defines */
#define LINES_PER_PAGE 58
#define REPORT_WIDTH 72
/* Global Variables */
extern BOOL fCwIsReady; /* TRUE when CW is initialized */
extern BOOL fBlackWhite; /* TRUE for black and white operation */
extern BOOL fFastStart; /* TRUE for no initial detection */
extern BOOL fReportFlag; /* TRUE if a report is underway */
extern BOOL fReportOnly; /* TRUE if "/F filename" was used, or if */
/* CW_INCLUDED is commented out */
extern BOOL fSummaryOnly; /* TRUE if MSD is to report summary */
/* information only to a file */
extern BOOL fCriticalError; /* Critical Error Flag */
extern BOOL fWindowsRunning; /* TRUE if windows is running */
WORD wDosMajor; /* Stores the DOS version */
WORD wDosMinor;
/* Variables for CW */
#ifdef CW_INCLUDED
extern BYTE fAdjustMsgBox;
extern HMNU hmnuMenuBar;
extern PBOX pboxInfoBox; /* Box description for the info window */
#endif
/* Variables for reporting */
extern WORD wLineCount; /* Current line number */
extern WORD wPageCount; /* Current page number */
extern WORD wColumnCount; /* Current column number */
extern WORD wReportIndent; /* Size of report's left indent */
extern PSZ pszReportFilename; /* Pointer to command line report filename */
/* Global Strings */
extern PSZ paszReportTo[];
extern WORD wReportToIndex;
extern PSZ pszVersionNumber;
extern PSZ pszNull;
extern PSZ pszYes;
extern PSZ pszNo;
extern PSZ pszNo_;
extern PSZ pszNone;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -