Giter Club home page Giter Club logo

Comments (8)

zalintyre avatar zalintyre commented on July 23, 2024

From the error message I guess your class H264_DVR_DEVICEINFO needs a [Serializable] attribute on top. The error message is not related to out parameters.

Kind Regards,
Franz

from legacywrapper.

ante75 avatar ante75 commented on July 23, 2024

Thanks for the help,
I added [Serializable]
Now the mistake became this
System.Runtime.Serialization.SerializationException:
'End of stream reached before the analysis is complete.'

from legacywrapper.

zalintyre avatar zalintyre commented on July 23, 2024

Hi,
can you paste some details of the Exception (stacktrace, message, etc)?

from legacywrapper.

ante75 avatar ante75 commented on July 23, 2024

I copied the exception details, can you understand something?

Si รจ verificata l'eccezione System.Runtime.Serialization.SerializationException
  HResult=0x8013150C
  Messaggio=Fine del flusso raggiunta prima del termine dell'analisi.
  Origine=mscorlib
  Analisi dello stack:
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
   at LegacyWrapperClient.Client.WrapperClient.Invoke[T](String function, Object[] args) in D:\Programmierung\CSharp\LegacyWrapper\LegacyWrapperClient\Client\WrapperClient.cs:line 75
   at TestVideo.XMSDK.WrapperH264_DVR_Login(String sDVRIP, UInt16 wDVRPort, String sUserName, String sPassword, H264_DVR_DEVICEINFO& lpDeviceInfo, Int32& error, SocketStyle socketstyle) in C:\Users\Operatore\Desktop\ZDIR\TEST VIDEO\TestVideo\TestVideo\XMSDK.cs:line 595
   at TestVideo.MainWindow.Window_Loaded(Object sender, RoutedEventArgs e) in C:\Users\Operatore\Desktop\ZDIR\TEST VIDEO\TestVideo\TestVideo\MainWindow.xaml.cs:line 131
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

from legacywrapper.

zalintyre avatar zalintyre commented on July 23, 2024

Looking for the HResult code with this link tells me that A mismatch has occurred between the runtime type of the array and the sub type recorded in the metadata.

So can you check all your type definitions for your delegate match the function in your dll?

from legacywrapper.

ante75 avatar ante75 commented on July 23, 2024

this is the original call:

H264_DVR_DEVICEINFO dvrdevInfo = new H264_DVR_DEVICEINFO();
int nError;
int nLoginID = XMSDK.H264_DVR_Login(ip, port, User, Password, out dvrdevInfo, out nError, SocketStyle.TCPSOCKET);

I can not understand what it refers to the error
COR_E_SERIALIZATION
0x8013150c
A mismatch has occurred between the runtime type of the array and the sub type recorded in the metadata.

from legacywrapper.

zalintyre avatar zalintyre commented on July 23, 2024

Have you got a proper API description of your desired function and its parameters at hand?

from legacywrapper.

ante75 avatar ante75 commented on July 23, 2024

I try to find some information

For the moment thank you

from legacywrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.