|
Thanks leppie,
leppie wrote: Having local rights on a remote PC in a domain will not give you domain permissions.
Could you explain what do you mean "Having local rights on a remote PC in a domain will not give you domain permissions." please?
In my situation, the remote machine name is TestMachine, and my domain account name (I am using my domain acconut name to access the remote machine) belongs to the Administrator Group of the remote machine named TestMachine. And you think the privilege is still not enough?
regards,
George
|
|
|
|
|
I have a class called Graph.cs and in this class I set the values of some data from another class called Data.cs. I then try and read this data from another class called DrawGraph.cs, but I can't seem to read the data I set before this is because it is creatinga new instance of the Graph.cs class is there anyway around this.
Thanks
"When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson
|
|
|
|
|
fix your code, it's obvioulsy broken. You're creating a new class instance, they don't create themselves.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Christian Graus wrote: You're creating a new class instance, they don't create themselves
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Christian Graus wrote: You're creating a new class instance, they don't create themselves.
That's why this C# fad will never last.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I had the same question here with no positive answers and did a lot of reading finding the answer in Delegates and Event handling - do a search in the articles in Delegates and Event handling. It ends up a long and tedious process of three pages of coding to fix. I got fed up and just posted the variables as public static and then everything can see it allways. Very crude and non conforming to OOP, but quick !!
cheers
Ian
|
|
|
|
|
I have MDI Form with background image in c#.
MDI Form Contains controls like button ,splitter etc.
When form repainted it flickers each time. how to avoid flickering of controls.
|
|
|
|
|
turn on double buffering. SetStyle is what you need to call.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi all
as is known to all,the char '<','>','&' is XML format.
but when i want to write a string that contain a '<' or '>' or '&'
in a XML,i could replace it such as :
<code>
string XMLstring = x[y].ToString();
XMLstring = XMLstring.Trim();
XMLstring = XMLstring.Replace("&", "&");
XMLstring = XMLstring.Replace(">", ">");
XMLstring = XMLstring.Replace("<", "<");
excelDoc.Write("<Cell ss:StyleID=\"StringLiteral\">" +
"<Data ss:Type=\"String\">");
excelDoc.Write(XMLstring);
</code>
but i failed :
<code>excelDoc.Write("<Cell ss:StyleID=\"BoldColumn\"><Data ss:Type=\"String\">");</code>
what should i do ?
Thanks!
|
|
|
|
|
That's not a good idea. Put the text in a CDATA[^] section.
|
|
|
|
|
If excelDoc is an XmlDocument it'll handle all that for you.
|
|
|
|
|
|
Hello everyone,
If I have enough priveleges, how could I get and access the services on a remote computer if I know the remote computer machine name? For example, I want to enumerate all the services on a remote computer and stop a service if its name matches some rules?
thanks in advance,
George
|
|
|
|
|
Process.GetProcesses(machineName)[^] gives a list of processes running on the specified machine. For authenticating remote machine, I think you should impersonate the user as Process.GetProcesses is not allowing to supply any user credentials.
|
|
|
|
|
What means "impersonate the user as Process.GetProcesses is not allowing to supply any user credentials."? I read a couple of times but do not know what you mean. Could you say in some other words please?
regards,
George
|
|
|
|
|
Process.GetProcesses is not allowing to supply user credentials for the remote machine. So you need to use some impersonation techniques to authenticate the remote machine. I haven't used but I think WindowsImpersonationContext[^] class can be used for this.
|
|
|
|
|
Thanks N a v a n e e t h!
I read the link but confused about what means "impersonation operation" or so-called impersonation technologies, does it a hacking technologies which someone acts (pretents) to be someone else? Could you clarify or provide some reference document about this technique please?
regards,
George
|
|
|
|
|
|
Cool, Uros!
regards,
George
|
|
|
|
|
|
Thanks Tom,
The link your provided is very helpful. After reading it, I am confused about what means "This would be useful, because the Service Control Manager (SCM) Microsoft Management Console snap-in does not support custom commands." -- custom commands means? Could you show me an example please?
regards,
George
|
|
|
|
|
Hi friends
How to use a common source class (.cs) file in different project files without copying into project's folder.
thanks in advance
-RisKhan-
|
|
|
|
|
What a bout compling the class to DLL
and the add it to the ref
Have Fun
Never forget it
|
|
|
|
|
Hello,
You have to think Classes not file.
The best solution is to create a Class libraby project (DLL) that contains your classes
Then if you want to use it, you reference it in your current project.
That's it !
|
|
|
|
|
i think above solutions are good
thanks
-RisKhan-
|
|
|
|