|
You don't "reload the Registry". You have to notify or reload the component that uses those registry values to get it to see the changes, IF that component exposes such functionality. If not, you have no choice but to restart the system for those changes to take effect.
What changes are you making??
|
|
|
|
|
Dave Kreskowiak wrote: What changes are you making??
I am deleting some registry entries used by an application.
But even if the entries got deleted the application keeps on running until it restarts.
So, Isn't there a way to do this thru coding?
(like when we install some application then upon complete installation, the whole explorer(all open windows) got refreshed, i think it reloading os/reg)
Dave Kreskowiak wrote: You have to notify or reload the component that uses those registry values to get it to see the changes,
How can i notify an application to check or reload itself?
regards
|
|
|
|
|
Hum Dum wrote: So, Isn't there a way to do this thru coding?
(like when we install some application then upon complete installation, the whole explorer(all open windows) got
The O/S and/or Explorer and/or the registry does NOT get reloaded right before the users eyes.
Hum Dum wrote: How can i notify an application to check or reload itself?
The notification method, if any, depends on what needs to be notified. For example, changing the background image is a broadcast message to Explorer sent using a specific API in Windows. But, this method ONLY works if the app (Explorer) is listening for it. It will NOT work with other applications.
Hum Dum wrote: I am deleting some registry entries used by an application.
But even if the entries got deleted the application keeps on running until it restarts.
This is true. Most applications will not see any changes you make to their registry settings until the app is restarted. Most applications will, also, NOT expose any method to tell them that they need to reload their registry settings. Your best (read: most reliable) course of action is to stop the app and restart it.
|
|
|
|
|
If the changes are to a part that Explorer uses then just killing the Explorer process works as well, but please don't
Better inform the user that the changes will only apply after rebooting and letting him do it himself..
|
|
|
|
|
harold aptroot wrote: just killing the Explorer process
I tried to do this, but it only works in xp, vista OS.
On windows 2000 its not working, screen simply got blank if i kill the explorer ,
Any other help would be appreciated.
regards
|
|
|
|
|
Ok well it's a very bad thing to do anyway.. Standard practice is to ask whether to reboot now or later.
|
|
|
|
|
Hi,
In my application there is three ports listening, each have corresponding AsyncCallback method, ie 3 AsyncCallback method in the application. These three AsyncCallback methods are working as thread.These are ready to accept messages at any time.
How can i block or wait first and second AsyncCallback method while the third AsyncCallback methord is executing.
So after the execution of the third AsyncCallback method, next message in the queue is ready to execute, it can be in first , second or third AsyncCallback method.
Yhankyou
YPKI
|
|
|
|
|
|
|
hello experts
I have scanner thr' which i am scanning barcode.I want to do coding for same.when device trigger clicked,textbox must show respective barcode no.
Give me any useful link or code for same.
|
|
|
|
|
Barcode scanners generally come with an API, or mimic keyboard entry depending on the make/model. There is no way whatsoever for anyone to answer your question without knowing which type of scanner you are using.
KIDYA wrote: Give me any useful link or code for same.
Even if you had worded that sentence politely (ie, with the addition of the word please) nobody is going to help you unless you help yourself.
|
|
|
|
|
Then what is my work? i m new wid this.is there any operations want to do wid API? or it will installed automatically when set up of scanner install.
|
|
|
|
|
That sentence makes no sense. "wid" is not a word in the English language (Although freakishly enough its my wife's pet name for her dad dont ask!)
|
|
|
|
|
Apparently, wid is the new with. Just like his name is the new word for fail.
|
|
|
|
|
Set the focus to your text box and pull the trigger.
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: pull the trigger.
stick'em up
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
hi,
I want to ask how to convert this C struct into C#.net
typedef struct _MT_EVENT {
#if _WIN32
LARGE_INTEGER TimeStamp; // In FILETIME format
#elif LINUX
struct timeval TimeStamp; // In gettimeofday() format
#endif
ULONG UserStatus; // Not used by API
ULONG EventCode; // Event Code
ULONG SubReason; // Event sub-reason
ULONG XtraInfo; // Extra information, e.g. termination
ULONG FuncCode; // Function active when this event occurred
USHORT Board; // Board ID
USHORT Channel; // Global Channel ID (GCI)
PVOID ptrBuffer; // Related play/record buffer pointer
ULONG DataLength; // Byte length of data accessed (played/recorded)
PVOID ptrXtraBuffer; // Pointer to xtra buffer
ULONG XtraBufferLength; // Length of buffer pointed by ptrXtraBuffer
ULONG XtraDataLength; // Length of data in buffer pointed by ptrXtraBuffer
ULONG EventFlag; // Falgs of the following:
// bit 0x00000001: 1 - Appl created the event
// 0 - NTi DLL created the event
// bit 0x00000002: 1 - Appl allocated ptrtraBuffer
// 0 - NTi DLL allocated ptrXtraBuffer
} MT_EVENT, *PMT_EVENT;
|
|
|
|
|
Check out the code MS provides for the Windows Mobile Gps, http://msdn.microsoft.com/en-us/library/ms881362.aspx[^] (Sample code comes with the SDK)
It contains many C structs written in C#, fairly cool. (Although, the sample like all MS samples doesn't work out of the box)
|
|
|
|
|
I'm not so hot on all that interop stuff and its a guess, but you could try this:
[StructLayout(LayoutKind.Sequential)]
public struct _MT_EVENT
{
public long TimeStamp;
public ulong UserStatus;
public ulong EventCode;
public ulong SubReason;
public ulong XtraInfo;
public ulong FuncCode;
public ushort Board;
public ushort Channel;
public IntPtr ptrBuffer;
public ulong DataLength;
public IntPtr ptrXtraBuffer;
public ulong XtraBufferLength;
public ulong XtraDataLength;
public ulong EventFlag;
}
Regards,
Rob Philpott.
|
|
|
|
|
size warning: in.NET long/ulong are 64-bit integers, in most other languages when targettingt a 32-bit CPU they just take 32-bit.
http://www.pinvoke.net[^] holds lots of useful interop stuff, however it also contains some mistakes, frequently passing a pointer as int (should be IntPtr).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
That is the primary reason I encourage (require) programmers on my teams not to use int and long in C# and instead require Int32 and Int64. The same issue comes up a lot in database programming. I am absolutely sick and tired of seeing cast errors in code because a programmer doesn't know what type they are using.
|
|
|
|
|
|
Hi,
I have a string with value "111733394601234567094987654321" . Now i want to divide this with 636. I convert it to double , then im getting 1.1173339460123456E+29 . but these both values are differnt finally im
getting wrong output. can anyone help me.....
Thanks
Prathap
|
|
|
|
|
There is no way you can do that with doubles. Since the value is too big even for a 64 bit integer, you should use some 128-bit integer class. See for example this[^] or Google for some more.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
The latest .NET 4.0 (and Visual Studio 2010) is in beta and offers a BitInteger class which would easily take care of your big integer division, yielding accurate quotient and remainder values.
There also have been some articles on home-brew BigInteger classes here on CP (with varying functionality and quality).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|