The specified module could not be found. (Exception from HRESULT: 0x8007007E)
在调用硬件商提供的dll时出错,错误如下
google了很多,还是不知道如何解决
未处理 System.IO.FileNotFoundException
Message="The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
Source="OBIDISC4NET"
StackTrace:
at OBID.FedmIscReader..ctor()
at OBID.IsoSample.IsoSample_Load(Object sender, EventArgs e) in C:\Documents and Settings\Peng Han\Desktop\Feig_sample\ISOSample\IsoSample.vb:line 384
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at OBID.IsoSample.Main() in C:\Documents and Settings\Peng Han\Desktop\Feig_sample\ISOSample\IsoSample.vb:line 18
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
[解决办法]
没有找到文件
运行前用file.exists("path")判断一下文件是否存在
[解决办法]
附上代码看看
[解决办法]
在指定的路径下找不到相关的dll文件。确认dll文件和可执行文件在同一个目录下吗?