|
You could include the source files in the sollution or you could make a class library wich produces a dll that you could include.
When I said to include a namespace I though you allready got it in a dll...
Niklas Ulvinge aka IDK
|
|
|
|
|
You can compile the classes into an assembly (.dll) by creating a new "Class library" project and copy all .cs files into that project. Then you can reference that assembly in every project where you need the classes.
|
|
|
|
|
Yoyosch wrote:
I have several classes that make a namespace 'CsGL.Basecode'.
What do you mean by that? Have all classes just the same namespace or do you also compile them to a library?
If these classes are available as source files then simply add them to your project by right-clicking on the project folder and selecting "Add existing item..". If they are compiled to a library, you have to reference this library as said by the other poster.
Anyway, if the classes are declared in the namespace "CsGL.Basecode" you cannot access them via "System.CsGL.Basecode", cause your namespace won't be added to the System namespace.
www.troschuetz.de
|
|
|
|
|
how i can use assembly rouitines in C#
like in Visual C++ that we can use assembly routines by typing
asm
{
//... assembly routines
}
|
|
|
|
|
There is no inline assembler in C#. C# compiles to MSIL, not assembly language. The IL code is compiled on-the-fly into processor-specific machine code at runtime. There is no way to put asm code into a C# source file and actually have it compile.
The only way around this is to write your asm code into a Managed C++ module, then call these functions from C#.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is it possible to create inline MSIL?
Niklas Ulvinge aka IDK
|
|
|
|
|
|
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?
|
|
|
|