|
This is like asking how to run a binary without the runtime environment. You simply can't.
.Net IL only makes sense in the CLR. I suppose you could write a scanner and research how to forward translate all IL to an equivient assembly on x86 but the cost of writing such a system would be astronomical. So much so it would be more costly than the application is worth. Far more costly than just installing the .Net Framework.
|
|
|
|
|
I have to ask a silly question but it drives me crazy.I'm working on VS.2005 Beta 2 and i'm desperately looking for ConfigurationPropertyAttribute and ConfigurationElement.According to MSDN Library of the product and msdn2.microsoft.com and a handful of online examples those classes are under the namespace System.Configuration.In my situation they are nowhere.I search the whole framework with Lutz Roeder's Reflector but they don't exist in any namespace.I can't find them under intellisence and the thing goes on.We are talking about a real pain in the &$@. Somebody answer i would appreciate it.
|
|
|
|
|
The initial namespace System.Configuration does not contain those classes.If you add a reference to the dependency "System.configuration.dll" (the exact casing) then... voila the missing classes.
|
|
|
|
|
I'm working with a team of developers, and we are working with several languages.
We have a program, written in C++ that gets data from several source, and assembles a large data object, filled with information that is updated every second.
On the data in this object, quite a bit of processing must be done, and more data returned.
The processing could be done in C++ - this would simply the matter quite a bit, however, I would prefer keep the data mining encapsulated in that program, and to do the processing on that data in another encapsulated program written in C#.
I need a way to transmit data from that C++ application to my C# application, and then transmit data back.
I've no idea how to deal with this, and am looking for information on where to start.
Thank you!
-- modified at 3:00 Monday 24th October, 2005
|
|
|
|
|
After quite a bit of reading, I'm thinking that I may need to use sockets to do this, with which I've never dealt before. I saw some examples of TCP based sockets and UDP based sockets - I think UDP would be the better choice. But I've still no idea how to really use sockets, or if this is really the best choice.
Can someone with experience verify this for me? Should I be using Sockets and UDP?
|
|
|
|
|
you can use the Win32API-function SendMessage or memory mapped files.
'A programmer ist just a tool which converts caffeine into code'
|
|
|
|
|
hey all,
i have just started learing .net c#....
i wish to develop a LAN messenger say jst like MSN which in which u dont have to add anyone jst as the person will b in LAN he will be online and vice versa..
there is one called IP Messenger...bt it is not having much features.....
the bsic thing wht i am lookin is a code of how to detect IP ....
do let me know abt it....its my final year project for my collage ...
if there are any links for this plz link me ...thnks
Kamaldeep Singh
|
|
|
|
|
Hello Mr.floack
I am a M.s Software Engineering student and i am interested in network related projects. I tried out your PACKET CAPTURE AND ANALYSER and set up the initial solution and added myclasses and pacanal to the soultion. After building and executing it its showing the following error
Please resolve my doubt and also clariy where can i get the file npf.sys. I checked out the site which you have mentioned in the codeproject forums but it contains some other versions of the file. Which one is best suitable for me.
THe error message is
THE PROJECT WITH AN OUTPUT TYPE OF CLASS LIBRARY CANNOT BE STARTED DIRECTLY
IN ORDER TO DEBUG THE PROJECT GO TO DEBUGGING TAB UNDER THE CONFIGURATION SETTINGS IN PROJECT PROPERTIES"
Bye
Devaraj
devauniversal@yahoo.co.in
|
|
|
|
|
Hi friends .I am working on a project and in that I need to get all the processes running on remote computer which I can but the problem is that I have to shut down one exe which I am unable to do .Any help please .
|
|
|
|
|
Hi all.
For example, Unzip tool that accepts Drag & Drop files to Windows Explorer.
I want to do same function that process Dragged files before Drop to Explorer.
How can this be done.
Thanks in advance. Sorry about my poor English.
|
|
|
|
|
something like
HRESULT SetFrequency(CComPtr tuner, long Freq);
Should I use managed c++ or directly call a dll?
I am a new bee in interop. Can you show me how to write this Marshal expression?
Thank you!!!
|
|
|
|
|
Seeing as it returns a HRESULT, I presume it's a COM object. In which case, you right click on references in your solution explorer, choose add reference, select COM and browse to the COM object. Then you'll get a class which wraps the methods that the cOM object exposes.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ohh, it just a function not a method in COM object.
Maybe it is a good idea to first pack it into a COM and use this function as a part of COM object.
But is there a way wrap just this function?
Thanks!
|
|
|
|
|
Fu Chen wrote: Ohh, it just a function not a method in COM object.
Then why does it return a HRESULT ?
Fu Chen wrote: Maybe it is a good idea to first pack it into a COM and use this function as a part of COM object.
In my book, that's a much easier way to get C# interop than using MC++, unless you either don't know anything about COM, or know at least as much about MC++.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi..
Anyone there could help me out with some design problems i encounter... I need to design a web page using C# web application but somehow i am unfamiliar of the toolbar i'm using.I'm design a web page jus like a user log in and retriving data out.. Anyone who has done this similiar project as me don't mind sharing with me.. Thankz..
Thank =)
|
|
|
|
|
Cheese_kid wrote: but somehow i am unfamiliar of the toolbar i'm using
How do you mean ? What toolbar ?
Cheese_kid wrote: Anyone who has done this similiar project as me don't mind sharing with me.. Thankz..
What do you have so far ? Have you used ASP.NET at all before ? it sounds to me like the tutorials on this site, or the MSDN site ( msdn.microsoft.com ) would go a long way to answering your questions.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Here is a gateway. The TCP/IP Property of my Ethernet card has set the IP address of the gateway.All my ip packet outside the LAN is resent by the gateway.
Now I want to create a proxy server and want to resend all the request of client to the gateway.Then return the response of the gateway to the client.
If the request is HTTP , I have to parse the content.
Is there a method by which I need not parse the content , just only resend?
Thanks!
|
|
|
|
|
I'm having a relatively complex problem with the PropertyGrid. Here it is:
I've got a complex class heirarchy. Each object in the heirarchy is easily referenced/retrieved by Guid (they all implement a common interface that has the Guid as a property). I've created a custom PropertyConverter to get the list of possible values that the object should allow (it pulls this from the object heirarchy). I've also created a custom property descriptor object that will return my custom property converter if the property's values are pulled from the object heirarchy. The object in question that I'm using to test also implements ICustomTypeDescriptor. The only method not passed off to the static TypeDescriptor object is the GetProperties() method. Instead of using the standard property descriptor, I'm using my custom property descriptor.
Now, here's the deal. I can get a string description of the appropriate objects to appear in the drop down list in the property grid. However, when I select a value, I get an error indicating that it couldn't convert from the data type in the property grid to the type of object I want. What I would like to do is retrieve the Guid of the object I selected. Do I just need to implement the CanConvertFrom, CanConvertTo, ConvertFrom, and ConvertTo methods in my PropertyConverter? Obviously, the selected value will need to be converted back to be used in the PropertyGrid as well.
Is this the right approach?
Thanks,
Will
|
|
|
|
|
I wrote the following code:
class Class1
{
[STAThread]
static void Main(string[] args)
{
Class1 x = new Class1();
x.DoIt();
}
public void DoIt()
{
try
{
Class2.GetIt();
}
catch(Exception)
{
}
}
}
public class Class2
{
static Class2()
{
throw new InvalidCastException("dummy");
}
public static string GetIt()
{
return "";
}
}
In .NET 1.1 the static ctor exception is not caught and whole application crashes. In .NET 2.0 it catches the exception, and everything is fine.
Is this a bug in 1.1 that was fixed in 2.0, or "by design" which is different between the .NET versions?
Anyway, how can I catch a static ctor exception in .NET 1.1?
Ami
-- modified at 16:30 Sunday 23rd October, 2005
|
|
|
|
|
Ofcourse it will crash, because there is no static classes in .NET 1.1, you can't make a class static.
The difference will be in http://www.msdn.microsoft.com/netframework.
"Praying." Is this only what I can do for him ?
|
|
|
|
|
You're wrong. He's not making a static class ( which is just a bit of syntactic sugar in C# 2.0 ), he's creating a static constructor, which you can most definately do in C# 1.1.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
OH, sorry, I've read the code wrong, .
"Praying." Is this only what I can do for him ?
|
|
|
|
|
Ami Bar wrote: Anyway, how can I catch a static ctor exception in .NET 1.1?
It actually works for me in VS2003 (C#1.1) I can't imagine why it would not work for you. I just copied and pasted your code into a new project.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: It actually works for me in VS2003 (C#1.1) I can't imagine why it would not work for you. I just copied and pasted your code into a new project.
I've just checked the code again to make sure, and it still crashes. I've even cleard all the exceptions (Debug -> Expections... -> Clear All).
When I run it in debug, it breaks into the debugger pointing to the 'throw new InvalidCastException("dummy");' statment.
Ami
|
|
|
|
|
Oh, I see. Yes, I don't think there's ever any guarentee as to when a static constructor will be called, only that it's called before your class is used. As such, you are probably right, and the problem is that the language spec does not help you even remotely, you can't count on being able to throw an exception in a static constructor and catch it. In fact, throwing exceptions in constructors is generally a bad idea in any case.
Christian Graus - Microsoft MVP - C++
|
|
|
|