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

📄 vcg16.htm

📁 Visual C++与数据库的连接经典实例
💻 HTM
📖 第 1 页 / 共 5 页
字号:

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

hInst

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The instance handle for the task.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Version

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The version number from the task's version resource (if the task has a version resource). If there is no version resource, this field is blank.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Exe

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The fully qualified filename for the task. Some versions of Windows use UNC names for files that are on shared, nonlocal network drives.

</FONT>

<TR>

<TD COLSPAN=2 ALIGN=center  VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Modules Section</I>

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Name

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The name of the loaded module. This name may be the same as the module's filename.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

hModule

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The handle for the module.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Usage

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The usage count (lock count) that indicates the number of references to this module. Most nonsystem modules have a usage count of 1 or 2. System modules may have usage counts of 50 or more.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Version

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The version number from the task's version resource (if the task has a version resource). If there is no version resource, this field is blank.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Exe

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The fully qualified filename for the task. Some versions of Windows use UIC names for files that are on shared, nonlocal network drives.</FONT>

</TABLE></CENTER><P>All in all, I've found WPS to be a very useful tool for looking at what's loaded and running under Windows. I find it amazing how much is going on in Windows that I wouldn't be aware of otherwise.

<BR>

<BR>

<A NAME="E69E216"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>PView95</B></FONT></CENTER></H4>

<BR>

<P>The PView95 program is used to view processes while running under Windows 95. This program was developed to complement the Windows NT program PView. Using PView95 is easy, because it has a simple user interface that includes the menus listed in Table 16.5.

<BR>

<BR>

<P ALIGN=CENTER>

<CENTER>

<FONT COLOR="#000080"><B>Table 16.5. PView95 menu options.</B></FONT></CENTER>

<BR>



<CENTER><TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Menu</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Option</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Description</I>

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

File

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Exit

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Ends the current PView95 session.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Process

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Refresh

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Updates the list of current tasks.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Kill

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Kills the selected task.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Help

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

About

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Displays the PView95 About box.</FONT>

</TABLE></CENTER><P>Figure 16.11 shows PView95 running on a system. Notice that there are both 16-bit and 32-bit applications running under Windows 95. Both of these lists are sorted by name, so it isn't difficult to find a specific task or module.

<BR>

<P><B><A HREF="16vcg11.gif" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/16vcg11.gif">Figure 16.11. PView95's main window.</A></B>

<BR>

<P>Figure 16.11 has several columns. Table 16.6 lists these columns and describes how they're used.

<BR>

<BR>

<P ALIGN=CENTER>

<CENTER>

<FONT COLOR="#000080"><B>Table 16.6. Columns in PView95.</B></FONT></CENTER>

<BR>



<CENTER><TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Column</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Description</I>

</FONT>

<TR>

<TD COLSPAN=2 ALIGN=center  VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Process (Top) Section</I>

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Process

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The name of the running process. Generally, this is the eight-character program name, often with an extension of .EXE or .DLL.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

PID

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The process identifier, a 32-bit value assigned to identify this process.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Base Priority

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

A priority value, typically 8 for most processes (KERNEL32 has a base priority of 13). Threads of a process can have a lower or higher priority as needed. A value of 28 usually indicates a critical thread or process.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Num. Threads

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The number of threads owned by this process.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Type

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The program's type: 16-bit or 32-bit. Windows 95 is a mixed-type operating system that has both 16-bit and 32-bit components.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Full Path

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The full path to the executable file (either .EXE or .DLL) for this process.

</FONT>

<TR>

<TD COLSPAN=2 ALIGN=center  VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Threads (Bottom) Section</I>

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

TID

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The thread identifier.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Owning PID

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The process identifier for this thread's owner.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Thread Priority

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The priority for this thread, relative to the owning process's priority. The priority value is based on the process priority and can be either lower or higher than the process's priority. Each of a process's threads may have a lower or higher priority as needed. A value of 28 usually indicates a critical thread or process.</FONT>

</TABLE></CENTER><P>All in all, I've found PView95 to be a useful tool for looking at what processes and threads are loaded and running under Windows 95.

<BR>

<BR>

<A NAME="E69E217"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Make TypeLib</B></FONT></CENTER></H4>

<BR>

<P>Make TypeLib is a utility that is run only as a separate step (by you, the programmer) under 16-bit versions of Visual C++. You don't use it when you're developing OLE controls using Visual C++ 2 or Visual C++ 4 under Windows 95 or Windows NT. Instead, the 32-bit versions of Visual C++ create the typelib as part of the project's build process by calling MKTYPLIB directly as part of the project's make process. The Make TypeLib command is found on Developer Studio's Tools menu when you're using Visual C++ 1.5. Make TypeLib invokes the MKTYPLIB program.

<BR>

<P>A <I>typelib</I> lets other applications determine which properties, methods, and events your OLE control will support. MKTYPLIB's input files have a file type of ODL, whereas output typelib files have a file type of TLB.

<BR>

<P>When you use ControlWizard to create an OLE control, an initial ODL file is created for you. ClassWizard updates this file as you add new properties, methods, or events to your OLE control. When you're developing under Visual C++ 1.5, you must use Tools | Make TypeLib to update the typelib file.

<BR>

<P>The MKTYPLIB program has a number of options, which are described in Table 16.7. These options are specified when you start MKTYPLIB from the Visual C++ 1.5 Tools menu. MKTYPLIB can also be started from a DOS prompt. These options may then be specified in the command line. The current version of MKTYPLIB is 2.01.

<BR>

<BR>

<P ALIGN=CENTER>

<CENTER>

<FONT COLOR="#000080"><B>Table 16.7. MKTYPLIB options.</B></FONT></CENTER>

<BR>



<CENTER><TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Option</I>

</FONT>

<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Description</I>

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

/help or /?

</FONT>

<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Displays a message specifying the options for MKTYPLIB.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

/tlb &lt;<I>filename</I>&gt;

</FONT>

<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Specifies the name of the output type library file. If it's not specified, the output file defaults to the same name as the input file, with a file type of TLB.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

/h [<I>filename</I>]

</FONT>

<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Specifies the output .H filename.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

/&lt;<I>system</I>&gt;

</FONT>

<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Available in both versions of MKTYPLIB. Use this option to specify which type of TLB is produced. Valid types of typelibs include WIN16, WIN32, MAC, MIPS, ALPHA, PPC, and PPC32. Defaults to WIN32 for the 32-bit version of MKTYPLIB and to WIN16 for the 16-bit version.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

/align &lt;<I>#</I>&gt;

</FONT>

<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Available in the 32-bit version of MKTYPLIB only. Use this option to override the default alignment setting.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

/o <I>filename</I>

</FONT>

<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Tells MKTYPLIB to redirect its output to the specified file. 

⌨️ 快捷键说明

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