|
Can anybody share some knowldge on how to detect un used regisrty key from a system nd deleting those unused keys.
regards,
|
|
|
|
|
There is no way to tell if a registry key may be used in the future or not.
Don't go deleting registry keys you think might no be in use, you'll only screw things up.
If you want to clean up your registry, go get a tool like CCleaner.
(I once read some good advice regarding the registry. It went something like this. "If you have to be told how to use the registry, you shouldn't be using it." )
Simon
|
|
|
|
|
Delete them, if windows or a program breaks, they were not unused. Sorry, that really is the best advice possible.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
hello,
m working on win forms using C#.net i use Appupdater to update version. My application gets updated but the application doesnt restart. When i manually start the application it starts with new version. How do i relaunch my application after Updation?
|
|
|
|
|
|
in C#.net 1.1 i dnt have Application.Restart();
|
|
|
|
|
Wow, never seen that one before You learn something new everyday, thanks
|
|
|
|
|
leppie wrote: Wow, never seen that one before
do you really mean it ?
|
|
|
|
|
N a v a n e e t h wrote: do you really mean it ?
Yes, no joke. I have never needed that
|
|
|
|
|
Ohh then I am delighted that I could able to help you. Thanks.
|
|
|
|
|
|
<pre> I am trying to access a C DLL from C# .The problem i am facing when i pass a structure to the C dll function .I am passing the structure by out Keyword.here is the code
--------------------------------------------------OneStruct .dll----------------------------------------------------------------
#include<iostream.h>
#include<conio.h>
#include<malloc.h>
#include<string.h>
extern "C"
{
typedef struct
{
unsigned long * var1;
float * var2;
}Esp;
typedef struct
{
char * var3;
char * var4;
}Real;
__declspec(dllexport) void GetValue(Esp * villa,Real * rud) //when function gets called i added the watch on villa and it shows me that CXX0017:Error:Symbol 'villa' not found
{
rud->var3 = (char*)malloc(50);
memset(rud->var3, 0x00, 50);
rud->var4= (char*)malloc(50);
memset(rud->var4, 0x00, 50);
strcpy(rud->var3, "robhino");
strcpy(rud->var4,"zidane");
unsigned long a=9999;
villa->var1=&a;
float b=15.6f;
villa->var2=&b;
}
}
--------------------------------------------------------------------------------------------------------------------------------
----------------------------------HandleOneStruct----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace HandleOneStruct
{
[StructLayout(LayoutKind.Sequential)]
public struct Esp
{
public IntPtr var1;
public IntPtr var2;
}
[StructLayout(LayoutKind.Sequential)]
public struct Real
{
public string var3;
public string var4;
}
class LibWrap
{
[DllImport("OneStruct.dll")]
public static extern void GetValue(out Esp villa,out Real rud);
}
class Program
{
static void Main(string[] args)
{
Esp villa;
Real rud;
//villa.var1=Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof (Esp)));
//villa.var2 =Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(Esp)));
//villa.var1 = new IntPtr(11);
//villa.var2 = new IntPtr(19);
LibWrap.GetValue(out villa,out rud);
Console.WriteLine(rud.var3);
Console.WriteLine(rud.var4);
Console.Read();
}
}
}
---------------------------------------------------------------------------------
When i debugg this code i am getting value of rud structre variable as robhino zidane correctly but the value of villa structre varibale are 12345,12346(some address i guess).where as i want the value villa->var1=9999 and villa->var2=15.6f.i really don't know how to get the values of var1=9999 and var2=15.6f .can anyone guide me how to get the desired result.what i need to do to run this code successfully .Is there any other way to run this code please tell me.
Give me usefull link for this topic if possible ?One more thing if i want to intialize IntPtr varible with long value or long * then how can i do this?
Any help Appreciated.
Thanks in Advance.
</pre>
|
|
|
|
|
You need to Marshal the IntPtr to int or float.
|
|
|
|
|
Hello everyone,
When I use bu or bm to set a breakpoint into a process running C#, there is always error message like -- "Operation not supported by integrated managed debugging."
How to make WinDbg support .Net application debug?
(I made a search to find some similar questions, but not quite helpful.)
thanks in advance,
George
|
|
|
|
|
Acording to Wikipedia, there's an extension for debuggin CLR apps.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Can you provide a link please? Or keywords to search?
regards,
George
|
|
|
|
|
|
Thanks Simon!
I have using .load to load the SOS package. And I have tried I can use extension commands like
!threads.
But when I use bu or bm to set a breakpoint, for example, bu Foo (Foo is a function in class FooUtility), there is error message like -- "Operation not supported by integrated managed debugging.
". How to solve it?
regards,
George
|
|
|
|
|
Sorry, I've no idea what the problem is. I'm no WinDbg expert.
I'd recommend getting a good guide, like the John Robbins book and starting with a simple app.
Simon
|
|
|
|
|
Thanks all the same, Simon!
Do you have any suggestions for a more specific forum?
regards,
George
|
|
|
|
|
|
Thanks all the same, Simon!
regards,
George
|
|
|
|
|
Hello,
I have a DataGridView with a DataGridViewCheckBoxColumn. I want to be
able to have the checkbox display in an indeterminate state, so I've
set the ThreeState property to True. However, I want the indeterminate
state to only be set programatically - whenever the user clicks the
checkbox, it should only toggle between Checked and Unchecked.
Now, this is the default behaviour of a standard CheckBox control - as
detailed in the CheckBox.ThreeState property documentation:
"the CheckState property value can only be set to the Indeterminate
value of System.Windows.Forms.CheckState in code and not by user
interaction"
How would I achieve this with DataGridView? I'm committing the changes
to the checkbox cells immediately by catching the
CurrentCellDirtyStateChanged event and calling CommitEdit as suggested
in the documentation for DataGridView. However, if I try catching the
indeterminate state in this event or in CellValueChanged, and setting
Value to CheckState.Unchecked, the cell's Value property changes but
the display does not update until the control loses focus or another
row is selected.
As this is the default for the CheckBox control, I'm sure it can't be
that difficult to get the DataGridView to do it. What am I missing?
Thanks in advance for your help,
Steven
|
|
|
|
|
Hi
I have a desktop application with a back-end as web service. Web service is hosted on server with Windows Authentication option.
All users do settings in provided setting form using desktop application and hit test connection and it succeeds for all except one user. When this unique user click test button he gets 401: access denied message. if he copy that web service URL in web browser and enters same credentials as in setting forms it works. So only the application fails to connect with web service.
Any help would be highly appreciated to resolve this issue.
Best Regards
Rizwan Bashir
|
|
|
|
|
Check the text encoding.
BTW why not hook up the debugger and see what happens?
|
|
|
|