VB6:Capicom在WinXP上崩溃 [英] VB6: Capicom Crashes on WinXP

查看:320
本文介绍了VB6:Capicom在WinXP上崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关计算此崩溃的任何建议吗?

Any suggestions on figuring out this crash?

以下代码在记录< part> 14之间间歇性崩溃并记录< part> 15 Plaintext 是一个路径字符串(在本例中为C:\Documents和Settings\Brian\Desktop\Joy\ ,尽管显然缺乏这样的喜悦,我有一个下沉的感觉这是一种恶意记忆问题的症状。我试图与Capicom 2.1.0.1和2.1.0.2,这两个崩溃。后者给出了一个标准的错误报告消息,前者静默(即程序关闭自己)。我测试它在别人的XP机器上有相同的问题,虽然它在Vista上工作正常。

The below code intermittently crashes between logging <part>14 and logging <part>15. Plaintext is a path string (in this case it is "C:\Documents and Settings\Brian\Desktop\Joy\", despite a clear lack of such joy. I have a sinking feeling this is a symptom of some sort of evil memory issue. I tried with both Capicom 2.1.0.1 and 2.1.0.2, both of which crash. The latter gives a standard error-reporting message, the former dies silently (i.e. the program closes itself). I tested it on someone else's XP machine with the same issue, though it worked fine on Vista.

Const curMthd = "EncryptStringWrap"
Dim Message As CAPICOM.EncryptedData
Set Message = New CAPICOM.EncryptedData
Dim oUtil As CAPICOM.Utilities
Set oUtil = New CAPICOM.Utilities
E.ErrorLog "<PART>14"
Message.Content = plaintext
E.ErrorLog "<PART>15"

编辑:这不是导致问题的数据。在测试这个;它正常工作正常。令人讨厌的是,当我把测试代码在初始化时,错误消失了。 Evil heisenbug :(可能是一个记忆问题:(

It's not the data that is causing the problem. I have been manually passing the data in to test for this; it works fine normally. Annoyingly, the bug went away when I put the test code in the initialization. Evil heisenbug :( . Probably a memory issue :(

编辑2:重写和whatnot 这里,并且关闭了。真的不是这个问题本身,但这个问题是基于严重的误解的问题。

Edit 2: Rewritten and whatnot here, and closed. Not really the same question as this per se, but this question was based on a serious misunderstanding of the problem.

推荐答案

斜线可能导致CAPICOM不能正确处理字符串。不同的字符串你可以找出问题的顺序。

The slashes could cause CAPICOM not to handle strings properly. By putting the code into a loop where you feed different strings you could find out what is the problem sequence.

由于CAPICOM是一个包装的cryptoAPI,这可以给你另一个路径,你运行一个测试项目访问Crypto API直接使用相同的序列和相同类型的调用。从互联网上阅读是一个薄包装。

Given that CAPICOM is a wrapper around the cryptoAPI this could give you another path where you run a test project accessing the Crypto API directly using the same sequence and same type of calls. From reading up on the internet is a thin wrapper.

MSDN有一些示例代码这里还有更多可用的。

MSDN has some sample code here There more available as well.

我用这种方式处理了各种wrapperCom DLL的许多问题。查找导致问题的数据。使用相同的数据直接使用Win API编写测试项目。然后评价。

I dealt with many problems with various "wrapper" Com DLL in this way. Find the data that causing the problem. Write a test project using the Win API directly using the same data. Then evaluate.

结果通常是我实现自己的包装器。或者发现我缺少一个步骤或配置错误。

The results are usually either I implement my own wrapper. Or find that I am missing a step or have the wrong configuration.

请注意,这适用于.NET中的包装程序集合,以及能够使用反射器查看包装程序正在做什么的额外好处。

Note that this works with wrapper assemblies in .NET as well with the added benefit of being able to use reflector to see what the wrapper is doing.

这篇关于VB6:Capicom在WinXP上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆