i have made a window application in c# its play multiple videos at a time ... i used DirectX SDK june 2010... its working fine in my machine but it giving an exception in clients machine ... the machine has DirectX11 installed so it's not a problem there ... the exception i am getting is ...
************** Exception Text **************
Error in the application.
-2147220891 (VFW_E_UNSUPPORTED_STREAM)
at Microsoft.DirectX.AudioVideoPlayback.Video.Open(String fileName, Boolean autoRun)
at Microsoft.DirectX.AudioVideoPlayback.Video..ctor(String fileName)
at Video_Project.FormMain.FormMain_Load(Object sender, EventArgs e) in D:\Video_Project\Video_Project\Form1.cs:line 240
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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
pls any one help me on this .....pls i am stuck in this for whole day
To check the machine's installed wmp codecs:
Go to WMP, press alt to get the menu, select Help->About... then click Tech Support Info. It will generate a report which amongst other things lists all the supported audio and video codecs.
Do this on both machines, Hopefully this should reveal the missing codec.
Related
I'm getting an exception in the StartSession method of the Native API sample code, NativeAppWin, in C#. If I'm reading the error correctly it looks like the NMS library does not provide an implementation for CreateConnectionAsync?
Does anyone have any ideas?
What is the version of Apache/NMS in Nuget that we should be using?
I'm using the following.
Apache.NMS 2.0
Apache.NMS.ActiveMQ 1.8
Here's the exception details:
Apache.NMS.NMSConnectionException
HResult=0x80131500
Message=Could not create the IConnectionFactory implementation: Method 'CreateConnectionAsync' in type 'Apache.NMS.ActiveMQ.ConnectionFactory' from assembly 'Apache.NMS.ActiveMQ, Version=1.8.0.0, Culture=neutral, PublicKeyToken=82756feee3957618' does not have an implementation.
Source=Apache.NMS
StackTrace:
at Apache.NMS.NMSConnectionFactory.CreateConnectionFactory(Uri uriProvider, Object[] constructorParams)
at Apache.NMS.NMSConnectionFactory..ctor(Uri uriProvider, Object[] constructorParams)
at NativeAppWin.Form1.StartSession() in C:\Projects\Testers\NativeAPI-DotNet-Demo\NativeAppWin\Form1.cs:line 67
at NativeAppWin.Form1.Form1_Load(Object sender, EventArgs e) in C:\Projects\Testers\NativeAPI-DotNet-Demo\NativeAppWin\Form1.cs:line 141
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.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)
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
TypeLoadException: Method 'CreateConnectionAsync' in type 'Apache.NMS.ActiveMQ.ConnectionFactory' from assembly 'Apache.NMS.ActiveMQ, Version=1.8.0.0, Culture=neutral, PublicKeyToken=82756feee3957618' does not have an implementation.
I changed the version in Nuget for Apache.NMS to 1.8 (to match version of Apache.NMS.ActiveMQ) and it no longer throws the exception. I don't see anything in the Native API documentation that states what versions to use, so I installed the latest on both. Hindsight, not a great idea... and maybe I should have kept the versions the same when given the chance.
It sounds like there are some significant changes in v2.0 so, for Sabre Native API purposes I would try the older v1.8.
I designed a Windows form application many years ago, and due to my lack of experience in programming and not following some professional programming tips to debug it, also I have lost the project source code. I know I had statically defined the printer name in the software, how can I access my source code?
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException (0x80004005): The system cannot find the path specified.
at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
--- End of inner exception stack trace ---
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)
at MehrPouyan.ServiceForm.SendPrint()
at MehrPouyan.ServiceForm.btnPrint_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I solved my problem by decompiling my software and used this link to decompile
I was writing an app for a friend who wanted an easy way to use Morse Code.
I was attempting to use an External Library that I wrote with Morse Code support, and when I try to call it, I get this error, in an External "Control.cs" file. I found happened in both Visual Studio and JB Rider, though Visual Studio gives a different error as it can't debug external sources.
My usings are:
using CainsSharpTools; // <= This is my Library
using System.Diagnostics;
using System.Windows.Forms;
And my function call looks like this:
private void buttonEncode_Click(object sender, System.EventArgs e)
=> textBoxMorse.Text = MorseCode.Parse(textBoxPlain.Text).Value;
The error is
System.IO.FileLoadException: Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at at MorseCoder.Form1.buttonEncode_Click(Object sender, EventArgs e)
at at System.Windows.Forms.Control.OnClick(EventArgs e)
at at System.Windows.Forms.Button.OnClick(EventArgs e)
at at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at at System.Windows.Forms.Control.WndProc(Message& m)
at at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at at System.Windows.Forms.Button.WndProc(Message& m)
at at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at at System.Windows.Forms.Application.Run(Form mainForm)
at MorseCoder.Program.Main() in C:\Users\caina\source\repos\MorseCoder\MorseCoder\Program.cs:19
i needed to use .NET Standard with my Lib
I'm using FWTools and SharpMap (with gdal_sharp) to build an application. And I have a weird error. Loading a raster layer runs great in Debug mode, but in Release it throws an Exception in SharpMap.Layers.GdalRasterLayer in the constructor when calling
_projectionWkt = _gdalDataset.GetProjectionRef();
The full exception is:
{System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at OSGeo.GDAL.GdalPINVOKE.Dataset_GetProjectionRef(HandleRef jarg1)
at OSGeo.GDAL.Dataset.GetProjectionRef()
at SharpMap.Layers.GdalRasterLayer..ctor(String strLayerName, String imageFilename) in d:\Fakultet\IX Semestar\GIS\Projekat\GreenGIS\SharpMap.Extensions\Layers\GdalRasterLayer.cs:line 404
at GreenGIS.Form1.addRasterLayer() in d:\Fakultet\IX Semestar\GIS\Projekat\GreenGIS\GreenGIS\Form1.cs:line 50
at GreenGIS.Form1.toolStripButtonAddVector_Click(Object sender, EventArgs e) in d:\Fakultet\IX Semestar\GIS\Projekat\GreenGIS\GreenGIS\Form1.cs:line 129
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
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 GreenGIS.Program.Main() in d:\Fakultet\IX Semestar\GIS\Projekat\GreenGIS\GreenGIS\Program.cs:line 19}
The weird thing is that in Debug everything works fine. The build setup is exact, both .Net 4.0, x86 Platform.
Any ideas?
Thankyou in advance
I ran into similar problems but after using the current compiled binaries from Link the problem was fixed. I documented the steps that worked for me at http://vipassanaandenvironmentalinformatics.blogspot.co.nz/2013/03/getting-started-with-c-and-gdal.html.
Hope this answer is still of help to others.
It seems to be a problem with Windows 8 and it's DEP implementation along with .Net 4.0. I'm using a C++ dll in a wrapper, and the OS does not let it execute. It could be solved by editing the DLL or turning Data Execution Prevention off.
I've been trying to troubleshoot a Castle ActiveRecord exception for days now. Whenever I attempt to access the database I get an exception with an InnerException value of "An attempt to attach an auto-named database for file database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."
I'm trying to connect to an SQL Server Express 2005 database. I don't have any other database option because the school computers only have SQL Express on them.
My connection settings
hibernate.connection.driver_class
NHibernate.Driver.SqlClientDriver
hibernate.dialect
NHibernate.Dialect.MsSql2005Dialect
hibernate.connection.provider
NHibernate.Connection.DriverConnectionProvider
hibernate.connection.connection_string
Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=database.mdf
This fails to work even if I set AttachDBFilename to an absolute path. User Instance has no effect. The database file is currently in the root of the project mixed in with my WinForms classes.
When using
hibernate.connection.connection_string
Data Source=localhost;Initial Catalog=FinalApp;Integrated Security=True;Pooling=False
I have no problems doing this on my laptop but I can't use the SQL Server 2005 Developer Edition on the school computers.
Full Stack Trace as requested
Castle.ActiveRecord.Framework.ActiveRecordException was unhandled
Message="Could not perform FindAll for Book"
Source="Castle.ActiveRecord"
StackTrace:
at Castle.ActiveRecord.ActiveRecordBase.FindAll(Type targetType, Order[] orders, ICriterion[] criteria) in c:\dev\castle\svn\branches\1.0.x\ActiveRecord\Castle.ActiveRecord\Framework\ActiveRecordBase.cs:line 1022
at Castle.ActiveRecord.ActiveRecordBase.FindAll(Type targetType) in c:\dev\castle\svn\branches\1.0.x\ActiveRecord\Castle.ActiveRecord\Framework\ActiveRecordBase.cs:line 982
at Castle.ActiveRecord.ActiveRecordBase`1.FindAll() in c:\dev\castle\svn\branches\1.0.x\ActiveRecord\Castle.ActiveRecord\Framework\ActiveRecordBase.Generic.cs:line 333
at CSharpFinal.InventoryMain.InventoryMain_Load(Object sender, EventArgs e) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\CSharpFinal\InventoryMain.cs:line 36
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.Show()
at CSharpFinal.Form1.inventoryToolStripMenuItem_Click(Object sender, EventArgs e) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\CSharpFinal\Form1.cs:line 51
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.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.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
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 CSharpFinal.Program.Main() in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\CSharpFinal\Program.cs:line 17
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()
Castle.ActiveRecord.Framework.ActiveRecordException was unhandled
Message="Could not create the schema"
Source="Castle.ActiveRecord"
StackTrace:
at Castle.ActiveRecord.ActiveRecordStarter.CreateSchema() in c:\dev\castle\svn\branches\1.0.x\ActiveRecord\Castle.ActiveRecord\Framework\ActiveRecordStarter.cs:line 212
at CSharpFinal.Form1.reInitializeDatabaseToolStripMenuItem_Click(Object sender, EventArgs e) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\CSharpFinal\Form1.cs:line 65
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.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.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
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 CSharpFinal.Program.Main() in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\CSharpFinal\Program.cs:line 17
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()
InnerException.Message is "An attempt to attach an auto-named database for file database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."
Hmmm, this is sort of a guess, but do you need to specify a database name?
(Initial Catalog in conn string)
It is probably becuase your SQL Express connection string is turning off user instance. If you leave user instance turned on then SQL will attach the database if required, if not it will just open it. If you turn it off then the attach is permenant. Any attempt to use the same connection string again will result in an error because the database already exists.
Becuase you have not attached the database by using that connection string, you will need to detach the database before you can then use the correct connection string.
I suggest you download SQL management studio express, if you haven't already got it. That will let you see the database already attached and detach it easily.
Okay, if that is not the problem can SQL server access the database file? Has it got permissions on that folder? It normally runs as network service, which you can grant access to the file just like any other user. You could eliminate the file permissions as an issue by granting full control to everyone, if that fixes it then you can tweak the permissions down to what is required. I would guess that the SQL server service account will require modify rights on the .mdf file. I don't know where it creates the .ldf for a user instance database. It might need create file rights in the same folder as the .mdf.