|
Iy shouldn't be nessecary to reinstall every time the xml changes.
You could add a FileSystemWatcher to monitor changes in the xml-file and make the service load the updated xml-file.
|
|
|
|
|
Your design is wrong. You have to use a FileSystemWatcher , handle it's event and load the XML file when it changes.
|
|
|
|
|
I'm building a Windows Installer project using Visual Studio. I've got it set where the app data is installed in the AllUsers folder if the users clicks the "Everyone" radiobutton.
My problem is that when I switch to a non-administrative account, I can start the app but as soon as the program tries to access the AllUsers folder, an "Access denied" exception is thrown! What am I doing wrong?
I've read articles that say your app will be vista compatible if an non-administrative user can access it in XP. (which is what I'm using)
Happy 4th!
Richard
"Make it as simple as possible, but no simpler" Issac Newton
|
|
|
|
|
In the Windows security model, a non-administrative user is not (or at least should not) be able do anything affecting other users.
You can only read from the AllUsers folder. All settings should be stored in a per-user folder, not in your program's installation folder.
|
|
|
|
|
Thanks for the reply. That does shed some light into my problem. However, I am still confused. One of the program features involves writing to a central log when a record is viewed. This log needs to visible for all users. What directory is safe for all types of users?
"Make it as simple as possible, but no simpler" Issac Newton
|
|
|
|
|
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
|
|
|
|