strem游戏与win1032位精简版不兼容,怎么办?换64位行吗?

补丁搜索:
> 游戏工具
游侠通用steam_api.dll文件
==&&ed2k链接下载游侠通用steam_api.dll文件 eD2k下载地址1.59 MB全选下载选中文件复制选中链接*需使用迅雷、QQ旋风或电驴下载==&&由800vod提供==&&由51mag提供==&&由99DDD提供
玩家还下载了这些补丁
游戏运行必备补丁
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
热门攻略专辑
热门补丁推荐
周人气排行榜
精品手机游戏
精彩高清图推荐
| 增值电信业务经营许可证 浙B2- |
浙网文[1 | CopyRight (C)
ALi213.Net All Right Reserved 游侠网 版权所有罗技 | 鼠标、键盘、遥控器、音箱及更多产品 – 中国众多开发者中的一员
WinRT中的流和.NET中的Stream的相互转换以及DataReader,DataWriter用法
原文:http://jianwang0412.iteye.com/blog/1673592
随着Windows8的发布,微软给出了一个Windows Runtime(以下简称WinRT),据说是用COM技术实现的。在结合使用.NET和WinRT时,你会发现它们对相同的概念,有不同的实现,或者说是类,比如异步操作,.NET中用Task概念,而WinRT则是用IAsyncInfo,IAsyncAction等,而在流的概念中,.NET围绕Stream类建立,而WinRT则先定义了三个主要的接口,然后逐一实现之。本文就是集中在“流”的相互转换上,因为你在编写Metro App时,会用到WinRT组件。
首先,.NET的Stream可谓是集读、写以及流定位于一身的一个类,那么在WinRT中则将它抽象成三个不同的接口,分别为:IInputStream、IOutupStream和IRandomAccessStream,其实这三个接口就是对应Stream所提供的功能。当然还有别的接口,这里暂不介绍。还有一个要介绍的是IBuffer,这个接口提供了对我们传统放置字节数组的byte[]的抽象,而且只提供了Capcity和Length两个属性(没有方法),Capcity是说这个IBuffer能够容纳多少字节,而Length则说明实际有多少字节,WinRT中也会有一个实现了该接口的类,称为Buffer,我们使用输入输出流时,都会用到。
然后,我们在转换时,最好加入System.IO命名空间,这个空间提供了我们需要的转换的扩展方法。
1. 将IBuffer转换成一个.NET Stream:
由于已经知道了一个字节块(IBuffer),那么我们可以把它放入到一个内存的随机访问流中,就是从Buffer中读取byte到内存流中(InMemoryRandomAccessStream,它实现了上诉的三大接口),再通过扩展方法转换成Stream,代码如下
InMemoryRandomAccessStream memoryStremWRT = new InMemoryRandomAccessStream();
await memoryStremWRT.ReadAsync(buffer,buffer.Length,InputStreamOptions.None);
Stream stream = memoryStremWRT.AsStream();
2.将一个IOutputStream转换成为Stream:
stream = outputStream.AsStreamForWrite();
3.将一个IInputStream转换成Stream:
stream = inputStream.AsStreamForRead();
4.将IRandomAccess转换成Stream:
stream=randomAccess.AsStream();
5.Stream 转成Buffer:
由于buffer需要读取数据,所以要一个输入流,此处使用DataReader来加载,它的构造参数就是一个输入流。
IBuffer buffer=
var inputstream=stream.AsInputStream();
using(var dataReader=new DataReader(inputstream))
await dataReader.LoadAsync((uint)stream.Length);
buffer=dataReader.DetachBuffer();
6.Stream 转成IIputStream
var inputstream=stream.AsInputStream();
7.Stream转成IOutputStream
var outputstream=stream.AsOutputStream();
8.Stream转成 IRandomAccess:
此处没有直接提供扩展方法,所以我们的思路还是先构造出一个输入流来获取数据:
IBuffer buffer=
var inputstream=stream.AsInputStream();
using(var dataReader=new DataReader(inputstream))
await dataReader.LoadAsync((uint)stream.Length);
buffer=dataReader.DetachBuffer();
var randomAccessStream =new InMemoryRandomAccessStream ();
await randomAccessStream.WriteAsync(buffer);
以上用到了DataReader类,对应的还有DataWriter类,这两个类和.NET中的StreamReader和StreamWriter的用法和概念一样,使用了适配器模式,将我们平时用到的类型,比如文本啊,整形数据啊,输入到流或者从流中读出,那么底层的字符,或者整形与byte之间的转换就不需要我们操心了,最多我们要指明是用大端还是小端表示,或者使用什么字节编码。
对于DataReader的含义,就是说我们要从一个输入流中读取数据(数据源是输入流,目标是从流中组装的具体变量值),至于数据的具体含义,那么就看你自己的需求了,一般情况下你是知道流到底是应该编码成string,还是组成int,long,亦或是两者都有,只要顺序搞对就行。
对于DataWriter的含义,则与Reader相对,就是我们输入我们需要的数据,无论是byte,还是string 还是int,long,经过适度的编码以及分解,然后输出到一个流中。
以上的参考代码如下:
// Initialize the in-memory stream where data will be stored.
using (var stream = new Windows.Storage.Streams.InMemoryRandomAccessStream())
// Create the data writer object backed by the in-memory stream.
using (var dataWriter = new Windows.Storage.Streams.DataWriter(stream))
dataWriter.UnicodeEncoding = Windows.Storage.Streams.UnicodeEncoding.Utf8;
dataWriter.ByteOrder = Windows.Storage.Streams.ByteOrder.LittleE
// Parse the input stream and write each element separately.
string[] inputElements = ElementsToWrite.Text.Split(';');
foreach (string inputElement in inputElements)
uint inputElementSize = dataWriter.MeasureString(inputElement);
dataWriter.WriteUInt32(inputElementSize);
dataWriter.WriteString(inputElement);
// Send the contents of the writer to the backing stream.
await dataWriter.StoreAsync();
// For the in-memory stream implementation we are using, the flushAsync call
// is superfluous,but other types of streams may require it.
await dataWriter.FlushAsync();
// In order to prolong the lifetime of the stream, detach it from the
// DataWriter so that it will not be closed when Dispose() is called on
// dataWriter. Were we to fail to detach the stream, the call to
// dataWriter.Dispose() would close the underlying stream, preventing
// its subsequent use by the DataReader below.
dataWriter.DetachStream();
// Create the input stream at position 0 so that the stream can be read
// from the beginning.
using (var inputStream = stream.GetInputStreamAt(0))
using (var dataReader = new Windows.Storage.Streams.DataReader(inputStream))
// The encoding and byte order need to match the settings of the writer
// we previously used.
dataReader.UnicodeEncoding = Windows.Storage.Streams.UnicodeEncoding.Utf8;
dataReader.ByteOrder = Windows.Storage.Streams.ByteOrder.LittleE
// Once we have written the contents successfully we load the stream.
await dataReader.LoadAsync((uint)stream.Size);
var receivedStrings = "";
// Keep reading until we consume the complete stream.
while (dataReader.UnconsumedBufferLength & 0)
// Note that the call to readString requires a length of "code units"
// to read. This is the reason each string is preceded by its length
// when "on the wire".
uint bytesToRead = dataReader.ReadUInt32();
receivedStrings += dataReader.ReadString(bytesToRead) + "\n";
// Populate the ElementsRead text block with the items we read
// from the stream.
ElementsRead.Text = receivedS
没有更多推荐了,
加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!我想买stream的GTA5,可是我只有一台thinkpad T530,装的是win10的64位系统,可以玩GTA5吗_百度知道
我想买stream的GTA5,可是我只有一台thinkpad T530,装的是win10的64位系统,可以玩GTA5吗
我有更好的答案
您好,WP酷七手机助手团队为你解答你这电脑的显卡对于GTA5来说是不够的,所以还是先别买正版游戏了,以后买个高性能台式机或游戏本再玩吧
采纳率:92%
来自团队:
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。}

我要回帖

更多关于 win1032位换64位 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信