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

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

问题描述



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

  Const curMthd =EncryptStringWrap
Dim Message As CAPICOM.EncryptedData
Set Message =新CAPICOM.EncryptedData
Dim oUtil作为CAPICOM.Utilities
设置oUtil =新CAPICOM.Utilities
E.ErrorLog< PART> 14
Message.Content = plaintext
E.ErrorLog< PART> 15

编辑:这不是导致问题的数据,我已经手动传递数据在测试为此,它正常工作正常。令人烦恼的是,当我将测试代码放在初始化中时,错误消失了。邪恶的heisenbug :(可能是一个记忆问题:(



编辑2:重写和whatnot 这里,并且已经关闭了,这个本身并不是一回事,但是这个问题是基于一个严重的误会的问题。

解决方案

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



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



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



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



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



请注意,这适用于.NET中的封装程序集,以及能够使用反射器查看封装器正在执行的附加功能。


Any suggestions on figuring out this crash?

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"

Edit: 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 :(

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.

解决方案

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.

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 has some sample code here There more available as well.

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.

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天全站免登陆