|
|
How do I decompile it then?
Niklas Ulvinge aka IDK
|
|
|
|
|
|
I have an application that run a reg.exe program , but when I start the process , cmd appear in the screen for awhile that reg.exe running although I've set the style property of StartInfo to Hidden. Any idea?
Thanks
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
Um, why are you even running reg? You can probably do what you need directly...
Matt Gerrans
|
|
|
|
|
I want to read some remote registry key , I know about OpenRemoteBaseKey but I think its easier for me to get all the result with reg.exe. and also as in MSDN for OpenRemoteBaseKey :
In order for a key to be opened remotely, both machines (the service, and client) must be running the remote registry service, and have remote administration enabled.
But reg.exe at least do not need the client to have this service started , as I tested.
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
-- modified at 6:29 Sunday 18th September, 2005
|
|
|
|
|
Did you try WMI? It is pretty easy to set up interop stuff to use WMI.
Matt Gerrans
|
|
|
|
|
Matt Gerrans wrote:
Did you try WMI?
Yah , But didn't find a way to query registry with WMI locally or remotelly. Do you know a way? Anyway , thanks for your reply.
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
I think what your looking for is the ProcessStartInfo.CreateNoWindow property. Just set it to false.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yah,thanks ,thats it , but I have to set it to true.
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
Whoops! Cranial-Rectal inversion on my part!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm designing a forum system. This has to mantain memory *at least* 50,000 users and 1,000,000 messages. I've build a little test program, that creates those volumes of data. I created it so to create every time different strings. The messages are from 200 to 1,600 char long.
The result is that all this data require less than 5 MB of memory (according to the opinion of Windows TaskManager).
Is this measurement correct?
Any suggestion would be really appreciated.
Thanks
Tozzi is right: Gaia is getting rid of us. Do you feel the way you hate or do you hate the way you feel?
|
|
|
|
|
Do you plan to keep all that data in memory? That won't work, I can tell you that right away. Don't you have a database?
Simple math:
200 characters = 400 byte
times 1,000,000 = 400,000,000 byte = 400 megabyte
1600 characters = 3200 byte
times 1,000,000 = 3,200,000,000 byte = 3.2 gigabyte
So, the messages alone will use somewhere between 400 megabyte and 3.2 gigabyte.
You should use something more accurate than the task manager to measure memory usage, like CLR Profiler.
---
b { font-weight: normal; }
|
|
|
|
|
Actually there is a DB, but I wish to keep as much data as possible in memory to increase performances, expecially because the DB is stored on another machine and the internal network is not really fast because of its existing traffic.
4 MB seemed too little to me also.
Guffa wrote:
You should use something more accurate than the task manager to measure memory usage, like CLR Profiler
I know it, but I haven't nothing like that. Do you know some free Profiler?
Thanks for the help, you made my situation more clear.
Tozzi is right: Gaia is getting rid of us. Do you feel the way you hate or do you hate the way you feel?
|
|
|
|
|
Dario Solera wrote:
Do you know some free Profiler?
CLR Profiler[^]?
|
|
|
|
|
I didn't knew it. Thanks!
Tozzi is right: Gaia is getting rid of us. Do you feel the way you hate or do you hate the way you feel?
|
|
|
|
|
I've understood what is the problem.
The random generated strings, simulating the message body, was not really random, but always the same char sequence. Since the framework optimizes the repeated strings, the memory usage was very low.
Now the test app consumes hundreds MB of memory.
I'm going to develop some kind of buffering system, using self-organizing linked lists to keep in memory the most used data and discard old/unused messages. The data exceeding the memory I can use has necessarily to be read from the DB.
Thanks to all for the help.
Tozzi is right: Gaia is getting rid of us. Do you feel the way you hate or do you hate the way you feel?
|
|
|
|
|
Hey! Is it possible to bind the Ndisprot driver ( used in the RawEthernet example on this site ) to the Microsoft Loopback adapter? When the adapter is installed, the Enumerate adapters method only picks up the "real" ethernet card.
If anyone knows how to do this ( or if its possible ), please let me know.
Thank you very much!
Rick
|
|
|
|
|
i've created a project that has like namespace the name PR_proj
now i want to create a dll that contain a form i can link to my main solution so i can by this one run this dll form and by pressing OK button return some values to the main.
How can create the dll?
Must have the same namespace of the main?
How can use it in my form, that is how do i call it as an internal form?
|
|
|
|
|
Make a new class library. And compile it.
Then include the library, wich is compiled to an DLL and then use it.
You don't have to use the same namespace.
Niklas Ulvinge aka IDK
|
|
|
|
|
how can i compile a class as a dll?
|
|
|
|
|
I think you'll need to start a new project that's a classlibrary. When you compile it it outputs an dll
Niklas Ulvinge aka IDK
|
|
|
|
|
You can also create a dll manually without using VS Studio, i use notepad and batch files for programming and creating a dll is an easy task:
With explorer browse to the folder where your sources (.cs files) are located (the files that your dll will use) and create a text file with notepad and add the following 2 lines to this new file:
csc.exe /target:library /out:MyLibrary.dll *.cs
pause
Save the file, close it and now rename its extension from .txt to .bat, this is a batch file. Now doble click on it (open it) and it will open a DOS window and will start the compiling process. The first line you added to the file will create your dll and the second will prevent the window to close and it will keep it open so you can see the compiler's output in case something goes wrong.
|
|
|
|
|
hi to all,
i have sifted through the many remoting turoials and come up with this basic implementation to understand the workings .. but ...
i changed the RemoteData (public interface method) contents to reflect that it is on another computer, changed to "server says hello", while the local copy is "local copy".
the server RemoteData object is never called, why is this so? it always returns "local copy" when the client is started.
can someone explain this to me please?
sorry about the code tags, but needed for the xml
-------- the server
<code>
using System;
using System.Runtime.Remoting;
using StationUpdate;
namespace SimpleServer
{
/// <summary>
/// The remoting server
/// </summary>
public class RemotingServer
{
public RemotingServer()
{
}
private static RemoteData rd=null;
static void Main(string [] args)
{
RemotingConfiguration.Configure("SimpleServer.exe.config");
rd = new RemoteData();
RemotingServices.Marshal(rd,"RemoteData");
Console.WriteLine("Press return to exit");
Console.ReadLine();
}
}
}
</code>
-------- the server config
<code>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="8000" />
</channels>
<service>
<wellknown mode="SingleCall" type="Remoting.StationUpdate.RemoteData,Remoting.StationUpdate" objectUri="RemoteData" />
</service>
</application>
</system.runtime.remoting>
</configuration>
</code>
-------- the client
<code>
using System;
using System.Runtime.Remoting;
using StationUpdate;
namespace SimpleClient
{
/// <summary>
/// Summary description for SimpleClient.
/// </summary>
public class SimpleClient
{
public SimpleClient() { }
static void Main(string[] args)
{
RemotingConfiguration.Configure("SimpleClient.exe.config");
RemoteData robj = new RemoteData();
Console.WriteLine(robj.Hello());
Console.ReadLine();
}
}
}
</code>
-------- client config -- pesca is anothe host on my LAN
<code>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name = "SimpleClient">
<client>
<wellknown type="Remoting.StationUpdate.RemoteData,Remoting.StationUpdate" url="tcp://pesca:8000/RemoteData"/>
</client>
<channels>
<channel ref="tcp" port="0"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>
</code>
-------- the remote object
<code>
using System;
using System.Runtime.Remoting.Lifetime;
namespace StationUpdate
{
/// <summary>
/// The remote object
/// </summary>
public class RemoteData : System.MarshalByRefObject
{
public RemoteData()
{
Console.WriteLine("RemoteData Constructor Called");
}
public override object InitializeLifetimeService()
{
return null;
}
public string Hello()
{
//return "server says hello";
return "local copy";
}
}
}
</code>
|
|
|
|
|
i want to know is there any possibility to increase the height of rows of listview control in c# or is there any other customized control on CP that i can use to achieve this purpose.
2nd problem is this i want to add a date time picker control into a column of a list view how can i achieve this plz help me
|
|
|
|