بسم الله الرحمن الرحيم
برنامجي يقوم بالربط بين الخلوي و الحاسوب بواسطة البلوتووث
استخدمت عالخلوي لغة j2me
و اللغة عالحاسوب هي visual basic
كتب البرنامج بلغة vb6 و قمت بتحويله ال vb.net لكن الان
عندما اقوم بعمل Build تتم الامور بشكل ناجح
و حتى عند تشغيله تبقى الامور سليمه لكن عند اتصال الخلوي الى الجهاز يظهر الخطأ التالي
{"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."}
و مع العلم ان البرنامج لا يظهر موقع الخطا في الكود
وارجو منكم توضيح الخطأ و كيفية تصحيحه
حيث اني استعمل Buffer من حجم 255 و عند تصغيره الى 128 يعمل البرنامج دون اخطاء لكن ليس بشكل صحيح
و اقوم بتخزين المرسلات من الخلوي الى الجهاز في مصفوفة من نوع بايت
و شكرا
System.AccessViolationException was unhandled
Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNat
veMethods.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(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicat
onModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String
] commandLine)
at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
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()
