导航:  CFileSys Class >

GetStandardStream

上一页返回章节概述下一页

描述

 

返回一个TextStream对象对应的标准输入、输出和错误流.

 

语法

 

FUNCTION GetStandardStream ( _

   BYVAL nStreamType AS STANDARDSTREAMTYPES, _

   BYVAL bUnicode AS VARIANT_BOOL = FALSE _

) AS Afx_ITextStream PTR

 

参数

nStreamType

LONG. can是三个常数:StandardStreamTypes_StdErr,StandardStreamTypes_StdIn,或StandardStreamTypes_StdOut.

bUnicode

Boolean指示文件创建为一个Unicode或ASCII文件.价值是true如果文件创建为一个Unicode文件,假如果是创造了一个ASCII文件.如果省略,一个ASCII文件假定.

 

设置

 

The nStreamType argument can have any of the following settings:

 

Constant

Value

描述

StandardStreamTypes_StdIn

0

返回到标准输入流对象相应的TextStream.

StandardStreamTypes_StdOut

1

返回到标准输出流对象相应的TextStream.

StandardStreamTypes_StdErr

2

返回到标准错误流相应的TextStream对象.

 

引用文件

 

CFileSys.inc

 

示例

 

#INCLUDE ONCE "Afx/CFileSys.inc"

 

DIM pFileSys AS CFileSys

DIM pStm AS Afx_ITextStream PTR

pStm = pFileSys.GetStandardStream(StandardStreamTypes_StdOut)