查看完整版本: [-- Cannot run the .exe file on another machine --]

APlayer 开发者论坛 -> APlayer 讨论区 -> Cannot run the .exe file on another machine [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

dragon0962 2018-05-08 17:55

Cannot run the .exe file on another machine

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 17:41
Hi, Thanks for using APlayer,  You need set the output to x86 arch.



查看完整版本: [-- Cannot run the .exe file on another machine --] [-- top --]


Powered by phpwind v8.7 Code ©2003-2011 phpwind
Time 0.007678 second(s),query:0 Gzip enabled