|
You should start using unmanaged code then, kernel32.dll I think. You could also use user32.dll to read system messages. Search http://www.pinvoke.net for sample code.
|
|
|
|
|
since it's a "mass storage device" microsoft has a generic driver for it... that's all I know.
|
|
|
|
|
Cbeck out some article on Coding4Fun on MSDN. That should tell you how to do it.
|
|
|
|
|
I have several classes that make a namespace 'CsGL.Basecode'. In my application i would like to use them (by writing 'using System.CsGL.Basecode'). How to add this namespace into that project easily? Do these classes have to be copied into appropriate folder?
thank you very much for any help
|
|
|
|
|
You have to include them in the refernce file.
Niklas Ulvinge aka IDK
|
|
|
|
|
What is exactly this file name? And did you mean that i have to add them 'manually' or in visual studio?
|
|
|
|
|
In the sollution explorer there should be a reference 'folder' where you can add it. The 'folder' is actualy a file that you can change manualy.
I got Microsoft Visual Studio 2005 Beta 2, I don't know how your VS look like but it should be the same.
Niklas Ulvinge aka IDK
|
|
|
|
|
There is no way to add a reference via VS (I have VS2003 but as you said, that shouldn`t make any difference), because he accepts only 'component files' (and I want to add a namespace which consist of several classes).
In the 'C# project file' there are 2 possibilities where I could add it:
<Reference
Name = "System.XML"
AssemblyName = "System.XML"
HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<File
RelPath = "App.ico"
BuildAction = "Content"
/>
I tried with the reference but still in main class this was not possible to write using System.CsGL.BaseCode
|
|
|
|
|
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
|
|
|
|