COM dll和C#访问被拒绝 [英] COM dll and C# Access Denied

查看:190
本文介绍了COM dll和C#访问被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我使用SpAudioPlug创建了一个用于自定义语音的COM dll,它在内存流中实现了音频.它具有两个功能, GetAudio()返回音频流,而SetAudio()设置带音频的存储流.我在VC ++对话框应用程序中测试了dll,并且工作正常.我想在C#应用程序中使用该dll,并且我可以毫无问题地访问COM dll的所有其他功能,但是当我尝试使用SetAudio设置音频时,出现STG_E_ACCESSDENIED = 0x80030005错误.我试图将应用程序设置为使用管理员特权,但没有成功.我可以理解,这与安全性有关,因为同一个dll在C ++中可以很好地工作.谁能告诉我这是什么问题?

我的环境是VS2008

谢谢
Ram

Hi,
I have created a COM dll for custom speech using SpAudioPlug which implements audio in memory streams. It has two functions, GetAudio() to return the audio stream and SetAudio() to set the memory stream with audio. I tested the dll in VC++ dialog application and it works fine. I want to use the dll in C# application and i could access all other functions of the COM dll without any problem, but when I try to set the audio using SetAudio, I get STG_E_ACCESSDENIED = 0x80030005 error. I tried to set the application to use administrator privileges, but it did not work. I could understand that it is something to do with the security as the same dll work good in C++. Can anyone tell me what is the problem ?

My environment is VS2008

Thanks
Ram

推荐答案

您必须向我们展示如何调用非托管DLL,然后才能告诉您您做错了什么.
You have to show us how you''re calling the unmanaged DLL before we can tell you what you''re doing wrong.


这篇关于COM dll和C#访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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