• 4768阅读
  • 1回复

Cannot run the .exe file on another machine [复制链接]

上一主题 下一主题
离线dragon0962
 

只看楼主 倒序阅读 使用道具 楼主  发表于: 2018-05-08
Hi all,
I have the problem with the project. (https://github.com/iamguofeng/VideoPlayer)
When i build project with x86 (both release and debug) mode , It worked very well on my computer.
But when i copy the myplayer.exe ( include all files in same folder with it) to another PC , It has the following error:

System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)at myplayer.PlayerForm.InitializeComponent() in D:\AllPlayer\VideoPlayer-master\myplayer\myplayer\MainForm.Designer.cs:line 5xx
at myplayer.PlayerForm..ctor() in D:\AllPlayer\VideoPlayer-master\myplayer\myplayer\MainForm.cs:line 1xx

Then I checked again , and I discovered the cause was due to the variable
    private static AxAPlayer3Lib.AxPlayer player;Then I searched google , and i found " C#免注册调用Aplayer" thread ! But i don't understand!
Could you please help me to solve the above problem !
Thanks !
Full log:

System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
   at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
   at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
   at System.Windows.Forms.AxHost.CreateInstance()
   at System.Windows.Forms.AxHost.GetOcxCreate()
   at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
   at System.Windows.Forms.AxHost.CreateHandle()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.AxHost.EndInit()
   at myplayer.PlayerForm.InitializeComponent() in D:\AllPlayer\VideoPlayer-master\myplayer\myplayer\MainForm.Designer.cs:line 570
   at myplayer.PlayerForm..ctor() in D:\AllPlayer\VideoPlayer-master\myplayer\myplayer\MainForm.cs:line 140  That line is -> ((System.ComponentModel.ISupportInitialize)(this.player)).EndInit();


离线aplayer

只看该作者 沙发  发表于: 2018-05-11
Hi, Thanks for using APlayer,  You need set the output to x86 arch.

快速回复
限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
上一个 下一个