J
Jeff Jeff
hello,
Me again.
When i try to write the registry with this code :
objRegistryKey = CERegistry.CurrentUser(objDevice.Session);
objRegistryKey = objRegistryKey.OpenSubKey(@"Software\Microsoft\Shell\StartMenu");
if (objRegistryKey != null)
objRegistryKey.SetValue("Order", objListIcones);
where objListIcones is a string[].
I get the following errors :
System.ArgumentException was unhandled
Message="The output byte buffer is too small to contain the encoded data,
encoding 'Unicode' fallback 'System.Text.EncoderReplacementFallback'.\r\nParameter
name: bytes"
Source="mscorlib"
ParamName="bytes"
StackTrace:
at System.Text.Encoding.ThrowBytesOverflow()
at System.Text.Encoding.ThrowBytesOverflow(EncoderNLS encoder, Boolean
nothingEncoded)
at System.Text.UnicodeEncoding.GetBytes(Char* chars, Int32 charCount,
Byte* bytes, Int32 byteCount, EncoderNLS encoder)
at System.Text.UnicodeEncoding.GetBytes(String s, Int32 charIndex,
Int32 charCount, Byte[] bytes, Int32 byteIndex)
at Microsoft.WindowsMobile.Rapi.CERegistryKey.SetValue(String name,
Object value)
at TweakWM6.Main.cmdUpdateIcone_Click(Object sender, EventArgs e)
in C:\Data\Dev\TweakWM6\TweakWM6\Main.cs:line 316
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.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.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 TweakWM6.Program.Main() in C:\Data\Dev\TweakWM6\TweakWM6\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()
Any clue for this error ?
Thanks for your time
WBR,
Jeff
mailto:[email protected]
Me again.
When i try to write the registry with this code :
objRegistryKey = CERegistry.CurrentUser(objDevice.Session);
objRegistryKey = objRegistryKey.OpenSubKey(@"Software\Microsoft\Shell\StartMenu");
if (objRegistryKey != null)
objRegistryKey.SetValue("Order", objListIcones);
where objListIcones is a string[].
I get the following errors :
System.ArgumentException was unhandled
Message="The output byte buffer is too small to contain the encoded data,
encoding 'Unicode' fallback 'System.Text.EncoderReplacementFallback'.\r\nParameter
name: bytes"
Source="mscorlib"
ParamName="bytes"
StackTrace:
at System.Text.Encoding.ThrowBytesOverflow()
at System.Text.Encoding.ThrowBytesOverflow(EncoderNLS encoder, Boolean
nothingEncoded)
at System.Text.UnicodeEncoding.GetBytes(Char* chars, Int32 charCount,
Byte* bytes, Int32 byteCount, EncoderNLS encoder)
at System.Text.UnicodeEncoding.GetBytes(String s, Int32 charIndex,
Int32 charCount, Byte[] bytes, Int32 byteIndex)
at Microsoft.WindowsMobile.Rapi.CERegistryKey.SetValue(String name,
Object value)
at TweakWM6.Main.cmdUpdateIcone_Click(Object sender, EventArgs e)
in C:\Data\Dev\TweakWM6\TweakWM6\Main.cs:line 316
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.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.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 TweakWM6.Program.Main() in C:\Data\Dev\TweakWM6\TweakWM6\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()
Any clue for this error ?
Thanks for your time
WBR,
Jeff
mailto:[email protected]