How to solve the error about the "Automation Sample For VB.NET"
I'm beginner Programmer of Image-Pro Premier 9.2. I need some support to fix this error .
I need to develop some customized program which use Image-Pro Premier on VB.NET2010 of Windows7.
I refer to the sample Program that you provide to the developers.
C:\Program Files\Media Cybernetics\Image-Pro Premier 9.2\Automation\Samples\VB.NET\MediaCy.Automation.Samples.VBClient.
I compiled this solution without any error and I run this . Main Form showed normally.
and then I pushed "Attach" Button . then it showed "Exception Error" on the below point.
Private Sub BackgroundWorker1_DoWork(sender As System.Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
Try
_session = New Session("Image-Pro Premier 9.2 64-bit", 60)
I need to develop some customized program which use Image-Pro Premier on VB.NET2010 of Windows7.
I refer to the sample Program that you provide to the developers.
C:\Program Files\Media Cybernetics\Image-Pro Premier 9.2\Automation\Samples\VB.NET\MediaCy.Automation.Samples.VBClient.
I compiled this solution without any error and I run this . Main Form showed normally.
and then I pushed "Attach" Button . then it showed "Exception Error" on the below point.
Private Sub BackgroundWorker1_DoWork(sender As System.Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
Try
_session = New Session("Image-Pro Premier 9.2 64-bit", 60)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
I can't solve this by myself about this error . Could you give me some advise.
MsgBox(ex.Message)
End Try
End Sub
I can't solve this by myself about this error . Could you give me some advise.
0
Best Answer
-
Nakamura-san,
Are you running Image-Pro Premier 64-bit or 32-bit? If you are running the 32-bit version you need to change the Session parameter to "Image-Pro Premier 9.2".
Pierre0
Answers
Could you please include all the exception information? Either a screenshot of the message box or even better a full dump of the exception in Visual Studio would be very useful to diagnose the error.
Thanks,
Pierre
TO) Pierre-san
Thank you for your quick reply . below is the details from Visual studio .
I am sorry this include some Japanese message due to language Setting .
I am not sure this is enough for you or not. but could you please check this.
System.Reflection.TargetInvocationException がキャッチされました
HResult=-2146232828
Message=呼び出しのターゲットが例外をスローしました。
Source=mscorlib
StackTrace:
場所 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
場所 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
場所 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
場所 System.ServiceModel.Description.TypeLoader.GetKnownTypes(Object[] knownTypeAttributes, ICustomAttributeProvider provider)
場所 System.ServiceModel.Description.TypeLoader.UpdateOperationsWithInterfaceAttributes(ContractDescription contractDesc, ContractReflectionInfo reflectionInfo)
場所 System.ServiceModel.Description.TypeLoader.LoadContractDescriptionHelper(Type contractType, Type serviceType, Object serviceImplementation)
場所 System.ServiceModel.ChannelFactory`1.CreateDescription()
場所 System.ServiceModel.ChannelFactory.InitializeEndpoint(Binding binding, EndpointAddress address)
場所 System.ServiceModel.ChannelFactory`1..ctor(Binding binding, EndpointAddress remoteAddress)
場所 System.ServiceModel.ChannelFactory`1.CreateChannel(Binding binding, EndpointAddress endpointAddress)
場所 MediaCy.Automation.Server.Connect(String uri, String exepath, Int32 timeout)
場所 MediaCy.Automation.Proxy.Session..ctor(String product, Int32 timeout)
場所 MediaCy.Automation.Samples.VBClient.Form1.BackgroundWorker1_DoWork(Object sender, DoWorkEventArgs e) 場所 C:\Program Files\Media Cybernetics\Image-Pro Premier 9.2\Automation\Samples\VB.NET\MediaCy.Automation.Samples.VBClient\Form1.vb:行 95
InnerException: System.IO.DirectoryNotFoundException
HResult=-2147024893
Message=パス 'C:\Program Files\Media Cybernetics\Image-Pro Premier 9.2\Automation\Samples\VB.NET\MediaCy.Automation.Samples.VBClient\bin\Debug\Automation' の一部が見つかりませんでした。
Source=mscorlib
StackTrace:
場所 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
場所 System.IO.FileSystemEnumerableIterator`1.CommonInit()
場所 System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
場所 System.IO.Directory.GetFiles(String path, String searchPattern)
場所 Microsoft.VisualBasic.FileIO.FileSystem.FindPaths(FileOrDirectory FileOrDirectory, String directory, String wildCard)
場所 Microsoft.VisualBasic.FileIO.FileSystem.FindFilesOrDirectories(FileOrDirectory FileOrDirectory, String directory, SearchOption searchType, String[] wildcards, Collection`1 Results)
場所 Microsoft.VisualBasic.FileIO.FileSystem.FindFilesOrDirectories(FileOrDirectory FileOrDirectory, String directory, SearchOption searchType, String[] wildcards)
場所 Microsoft.VisualBasic.MyServices.FileSystemProxy.GetFiles(String directory, SearchOption searchType, String[] wildcards)
場所 MediaCy.Automation.Server.GetKnownTypes(ICustomAttributeProvider provider)
InnerException:
The key information is InnerException:System.IO.DirectoryNotFoundException with the message following. One requirement is that the sample executable needs to be in the Image-Pro Premier executable's folder C:\Program Files\Media Cybernetics\Image-Pro Premier 9.2.
Pierre
パス 'C:\Program Files\Media Cybernetics\Image-Pro Premier 9.2\Automation\Samples\VB.NET\MediaCy.Automation.Samples.VBClient\bin\Debug\Automation' の一部が見つかりませんでした。
Pierre-san
Thank you for your nice advise. I tried to copy the Sample Program exe module from Release folder into "C:\Program Files\Media Cybernetics\Image-Pro Premier 9.2".
That was great ! , The Program did work .
But... Another Error happend as below Message in the Message Box.
===== Message =====
Could not connect to server net.pipe://localhost/Image-Pro Premier 9.2 64it.
================
My environment is Only on my PC. Premier 9.2 and Visual Studio has installed on my PC, Not the Server.
I'm so sorry bother your working , But ... could you give me more advise about this ?
Pierre-san.
Thank you so much for your great advise,
Actually , I am sure I use Image-Pro Premier 64 bit Version ,
So, by your advise, I tried to compile Sample Program as a 64 bit Version , Not x86.
and tryied to run again it. The Result was very nice. Attach was done successfully.
I really appreciate to you ,you gave me a best advise. Thank you so much .
I will be able to sleep tonight.