|
Thanks for any assistance ahead of time. My question is in general more of a .NET question, but since I'm a C#/C++ person and C# is the ideal .NET language, I'm gonna take a chance posting here. I work for a government contractor and a lot of the things we handle are real-time applications. Data collection, analysis, derived data, etc. and all of it is coming down the pipe in real-time. I am a HUGE .NET fan and advocate, I went to training for C# and use it whenever I can, but when I run into something real-time I always end up going back to VC++ (probably developed in the .NET IDE, but not managed code).
Example: I had to rewrite a program that took real-time data from a program, calculated derived data from the input, then passed the original along with the derived back into the main program. The program was much more simple to write in C# with the use of the Code-DOM, but it hit us with 60-100% CPU usage when we hit it with real data. After the rewrite (In VC++ 6 & MFC), we have virtually no limit on the speed we can process samples and our CPU usage has gone back to 3% - 6%.
I have heard the same stories and worries from people at NASA, GM and other groups. In other words, what happens to all of the real-time applications when Longhorn, Indigo, Yukon and the rest make managed code the game and real-time is not possible? I know that Microsoft has said they are moving to a total managed code scheme eventually. This puts a lot of organizations, including a huge part of the U.S. government out looking for new solutions.
|
|
|
|
|
Hang on, what were you using CodeDOM for?? It's for generating code at run-time.
I have to defer to Rico Mariani: Know what things cost[^]. It sounds a little like you may have used some 'cool' techniques that were too slow for what you needed.
.NET isn't really suitable for truly real-time systems because you can never predict when a garbage collection is going to occur, nor how long it will take.
You'll still be able to write and use unmanaged C++ programs on Longhorn, IIRC. The new Avalon GUI system is .NET-only, but your data collection and manipulation code is in a separate process already, right? You can keep this architecture, using some form of communication channel or shared memory to communicate with the presentation process if necessary. You can also have hybrid managed/unmanaged processes, with some threads managed and others unmanaged if you wish.
|
|
|
|
|
Sorry, I should have been a little more clear. The derived calculations on that particular program are loaded in by an engineer, who writes his derived calcs. in C#. However, that is only done once at the beginning of the program, then loaded in memory as a seperate assembly (all using the Code-DOM). The new version does the same thing using .dll's, etc. The real-time part of the program though is basically a message, data, timing pump that just pulls the data, fires processing if necessary and pumps it back on schedule. No 'cool' techniques really inside of either version.
You said:
You'll still be able to write and use unmanaged C++ programs on Longhorn, IIRC. The new Avalon GUI system is .NET-only, but your data collection and manipulation code is in a separate process already, right?
Is that so? I really haven't heard that. I read that there would be an entirely new Windows API, (not Win32) and I thought that the new API was built on .NET. If that's not true and it will just be an updated API that we can interface with natively, that will be better than .NET managed under the hood.
Granted, it's impossible to get true real-time out of Windows anyway since it has a 12 millisec. window it may or may not hit for your instructions, but with .NET under the hood, even our soft real-time stuff would probably have to be ported. Do you know of any references to this subject (Real-time references, new Longhorn API, etc.?) that might be helpful to me?
Brian
|
|
|
|
|
Hi,
I've got 2 programs that share a common class StatusWrapper.
This class contains a private class of statusobjects.
In program 1 I am creating a socket, and allowing you to connect on a specific port, then request a StatusWrapper information block.
In program 2 I connect to the port that program 1 has created, and make the request for the object.
Program 1 then serializes this object, and transmits it on the socket to program 2.
I cannot get program 2 do deserialize the object as it is reporting an exception that the assembly for program 1 cannot be located.
How can I send data like this across to programs?
Please help
|
|
|
|
|
Did you copy the class StatusWrapper, or is it in an assembly referenced by both application?
|
|
|
|
|
Hi Guys,
In Dot Net we can apply a class with a Guid attribute, for example:
[GuidAttribute(“F964DC24-8969-452d-A2CA-A9F07fBDD6BE”)]
Public class ClassName
{}
And then the class will have a fixed Guid which is returned whenever you call ClassNameInstance.GetType().Guid
Classes that don’t have a Guid attribute assigned to them during implementation , will have a new Guid regenerated every time you compile, and this new Guid will be the result when using the GetType().Guid on the class instance.
My Q is: Is there any way I can know from the class instance if the Guid that I got back from GetType().Guid is a fixed one that was assigned at implementation, or is it a newly generated one that the compiler regenerates every time I compile…
Cheers,
Zac.
|
|
|
|
|
Hi all,
I am attempting to execute an assembly from a UNC path (e.g. \\sydxyz\share) but I always get the CLR error message "Application has generated an exception that could not be handled".
The permissions on the share are correct and I have tried generating the assembly with a strong name, altered security profile etc.. as in the .NET Code Access Security documentation, but to no avail.
However, if I map that network share to a drive letter (net use z: \\sydxyz\share) and run the program it works with no problems.
I've looked at the Intranet_Zone security etc... etc... and now am suspecting that an Active Directory (global) group policy is somehow getting in the way?
Has anyone seen this before or have any ideas where to start?
TIA
...Steve
|
|
|
|
|
|
Colin,
Thanks, however I managed to trace the problem to be a combination of Framework 1.0 and network shares with spaces in their names (e.g. "\\sydxyz\is share").
There is an undocumented bug in the Framework 1.0 code which has been fixed in 1.1 (ASURT#127619 - obtained from Microsoft support). This is not yet in TechNet or MSDN.
...Steve
|
|
|
|
|
I know how to create an MDI Container Form, but is there a way to create and MDI Container control? For instance, I want to create a panel that can contain Form objects. Everything I've tried so far has resulted in various explosions in my code
Josh
Find a penny, pick it up, and all day long you'll have a back-ache...
|
|
|
|
|
I think it's easier to just create a control that has a windowss border around it.
|
|
|
|
|
What is the difference between the .NET Compact Framework and the .NET Framework?
Thanks
Ralph
|
|
|
|
|
.NET CF is smaller and leaner - It is designed for Windows CE devices like the Pocket PC.
Notable differences are:
* No ASP.NET support (after all who in their right mind is going to run a web server off a PocketPC device).
* Limited XML support - No XPath for instance.
* Reduced functionality on Windows Forms controls
* Changed functionality on Windows Forms controls (due to the different input methods [e.g. concept of right-click altered to hold-click] and form factor of the device)
* Many overloaded versions of methods don't exist.
* No printing support (although you can buy third party components that do printing [ScotRail use something like this for issuing tickets on the train itself - a Pocket PC based ticketing issuing device, the Pocket PC plugs into a printer and Credit Card scanner])
There are more. However MSDN indicated on each class, method & property whether it is supported.
--Colin Mackay--
EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
|
|
|
|
|
How would I capture the user's screen resolution using the .NET Framework?
Thanks in advance.
Happy Programming!
WWW::CodeProject::BNEACETP
|
|
|
|
|
Hello!
I'm a beginner in programming with vb.net and I have many problems!
I'm searching for an query analyzer control wich I can use in the .net framework like the MS-Query-Analyzer.
With this control I would like to show tables from an sql-database.
Only a control, not a full programm!!
Could you help me?
I can't explain it very well in english!
|
|
|
|
|
You only want to show tables? So you don't need that control,You could query from INFORMATION_SCHEMA . ANd show the result in a TreeView. Your query could be like this:
SELECT * FROM INFORMATION_SCHEMA.TABLES
For more options see online book.
Mazy
No sig. available now.
|
|
|
|
|
I want to show tables, but I also want to show the connections or constraints between the tables and I think I can't do it with an TreeView.
My boss ment that we need a control to handle that.
He said that it could be like the MS-Query-Analyzer.
You know, you can move the tables in this program and make constraints between them.
Or do you know how I can integrate the MS-Query-Analyzer-Tool in the development environment?
Thank you for replying!
|
|
|
|
|
I don't think such a thing exist cause as I told you you can get all those informations with simple queries. You can show Contstranit or any object in database with getting information from INFORMATION_SCHEMA,then you can show and handle it in a way you want. I don't know about any integrated tool.
Mazy
No sig. available now.
|
|
|
|
|
Thank you for that information.
I'm trying to do this!
|
|
|
|
|
Hi,
I am having a new requirement of converting my existing Web site code (Developed using Microsoft.NET and Microsoft Commerce Server 2002) to full-fledged Modular Approach implemented code. Does any one come across in this path, pls do drop your messages over here. Thanks in advance.
Always I am here to share all my pleasures with Code
|
|
|
|
|
I am experimenting with the ArrayList class in the .NET Framework and I am having a problem retreiving an object stored in it to call/use its members.
For example:
If I have a class named MyObject and I add three (or more) instances of them to the ArrayList instance named testArray like:
Dim obj As New MyObject
Dim obj1 As New MyObject
Dim obj2 As New MyObject
testArray.Add(obj)
testArray.Add(obj1)
testArray.Add(obj2)
How would I be able to index one of the instances to use/access its members. I would expect to do it like this (assuming that MyObject has a Name property):
' Accessing the first item in the ArrayList.
testArray.Item(0).Name = "New Name"
This doesn't seem to want to work. Intellisense, instead of showing the members of the class stored, it shows the GetType() function only. Anybody have any ideas?
Thanks in advance.
Happy Programming!
WWW::CodeProject::BNEACETP
|
|
|
|
|
bneacetp wrote:
' Accessing the first item in the ArrayList.
testArray.Item(0).Name = "New Name"
I figured it out. It compiles and runs well. Intellisense just doesn't show the members of the class.
Happy Programming!
WWW::CodeProject::BNEACETP
|
|
|
|
|
Alternatively:
CType(testArray.Item(0), MyObject).Name It's a good idea to cast if you're performing a lot of operations on the same object, because there's overhead involved in System.Object 's late binding. Prefer to early-bind if you can.
|
|
|
|
|
Thanks for the information.
Happy Programming!
WWW::CodeProject::BNEACETP
|
|
|
|
|
What are the prospects for a low pause-time garbage collector being added to .NET?
(I have a server that is written in .NET, and low latency is important for this server. The server can tolerate many garbage collections, but each garbage collection must be quick. Latencies as long as about 1/3 of a second would be OK; longer is problematic. A garbage collector with pause times of less than .1 second would be great.)
|
|
|
|