VS2010在64位操作系統上選擇x86平台進行編譯,這樣可兼容老的dll文件


該項目在32位平台上一切正常,但如果在64位Win7上編譯后,調試,報錯:

然后在編譯選項中選擇:“x86”平台,編譯,運行,就不報錯了。

補充,在日志文件里顯示了如下和內存有關的異常:

 

Header]\r\nERROR 11:18:18,523 3696 NeoNetech.UI.VisualStudioStyle.MainForm - Failed to execute command LiveFPInjectDependenciesCommand on start
System.BadImageFormatException: 試圖加載格式不正確的程序。 (異常來自 HRESULT:0x8007000B)
在 NNT.NNTFingerProcessBlock.Convert.PEFIS.PefisConvert.GetFingerInfoSize_NNT()
在 NNT.NNTFingerProcessBlock.Convert.PEFIS.PefisConvert..ctor()
在 NNT.NNTFingerProcessBlock.FingerProcessFactory..ctor()
在 NNT.NNTFingerProcessBlock.FingerProcessFactory.get_Instance()
在 NeoNetech.LiveFP.Solo.Command.LiveFPInjectDependenciesCommand.Execute()
在 NeoNetech.UI.VisualStudioStyle.MainForm.ExecuteConfigCommand(StringCollection commandIds)
ERROR 11:18:28,566 3696 NeoNetech.UI.VisualStudioStyle.MainForm - Failed to execute command LoadLiveListCommand on start
System.ObjectDisposedException: 無法訪問已釋放的對象。
對象名:“TabControl”。
在 System.Windows.Forms.Control.CreateHandle()
在 System.Windows.Forms.Control.get_Handle()
在 System.Windows.Forms.Control.CreateGraphicsInternal()
在 System.Windows.Forms.Control.CreateGraphics()
在 Crownwood.DotNetMagic.Controls.TabControl.RecalculateSinglelineTabs(Int32 xWidth, Int32 xStartPos, Rectangle tabPosition)
在 Crownwood.DotNetMagic.Controls.TabControl.Recalculate()
在 Crownwood.DotNetMagic.Controls.TabControl.OnInsertedPage(Int32 index, Object value)
在 System.Collections.CollectionBase.System.Collections.IList.Add(Object value)
在 Crownwood.DotNetMagic.Controls.TabPageCollection.Add(TabPage value)
在 NeoNetech.UI.VisualStudioStyle.WindowCollection.AddControl(Control control, String title)
在 NeoNetech.UI.VisualStudioStyle.MainForm.AddWindow(Control control, String title)
在 NeoNetech.LiveFP.Solo.Command.LoadLiveListCommand.Execute()
在 NeoNetech.UI.VisualStudioStyle.MainForm.ExecuteConfigCommand(StringCollection commandIds)

總的來講,猜測都是和dll的兼容性有關,和內存的調用有關。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM