我用C#做了一个BHO组件,并用C#做了一个小应用程序,(在应用程序中处理特定IE事件)
在本机测试没有问题,可是当我将应用程序部署到别的机子上时就不能工作了,不知为何?
我的做法(VS2005中开发):
1、将应用程序打包;
2、BHO采用强命名,test.snk,为Com Interop注册打上勾,有GUID标识
2、将BHO的DLL文件加入打包的应用程序,将它的Register属性设为vsdraCom ;
另外,将BHO的DLL文件用RegAsm生成.reg文件,单独再运行一次,还是不行,也不知道哪里有问题。
请哪位高人帮帮我,给个思路也行!!
在本机测试没有问题,可是当我将应用程序部署到别的机子上时就不能工作了,不知为何?
我的做法(VS2005中开发):
1、将应用程序打包;
2、BHO采用强命名,test.snk,为Com Interop注册打上勾,有GUID标识
2、将BHO的DLL文件加入打包的应用程序,将它的Register属性设为vsdraCom ;
另外,将BHO的DLL文件用RegAsm生成.reg文件,单独再运行一次,还是不行,也不知道哪里有问题。
请哪位高人帮帮我,给个思路也行!!
是不是用C#做的COM组件都要求使用的机子装了.NET Framework才能使用吗?
难道要装VS2005,那就太恐怖了吧!
可是,我测试的机子上装了framework还是不能触发应用程序,因为应用程序安装的必备条件就是装了framework,
别的还会是哪里的问题呢,请指点一下,解决立即散分!
还有一个WebService,未做处理
可我一直找不到解决的办法,郁闷.........
不想再开新贴了,哪位能找出原因,解决就结贴!!!!
开发,XP,测试2003 server
using System;
using System.Collections.Generic;
using System.Text;
namespace Generic_Reusable
{
interface ILockable
{
void Lock();
void Unlock();
}
class SharedMemoryLock : ILockable
{
#region ILockable Members
public void Lock()
{
Console.WriteLine( "SharedLock performs lock method. ");
}
public void Unlock()
{
Console.WriteLine( "SharedLock performs unlock method. ");
}
#endregion
}
class FileLock : ILockable
{
#region ILockable Members
public void Lock()
{
Console.WriteLine( "FileLock performs lock method. ");
}
public void Unlock()
{
Console.WriteLine( "FileLock performs unlock method. ");
}
#endregion
}
class ReusableLock <LOCK > : ILockable where LOCK : ILockable, new()
{
private LOCK lock__ = new LOCK();
#region ILockable Members
public void Lock()
{
lock__.Lock();
}
public void Unlock()
{
lock__.Unlock();
}
#endregion
}
class Program
{
static void Main(string[] args)
{
try
{
ReusableLock <SharedMemoryLock > theLock = new ReusableLock <SharedMemoryLock >();
theLock.Lock();
// TODO: Add your code here
theLock.Unlock();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}