Console Apps please help....

Ariez

Centurion
Joined
Feb 28, 2003
Messages
164
I have several apps written in Turbo C for DOS Point of sales.
I have to retouch most of the code there. and that's a real nightmare.

Questions:
1 can the console Apps in .Net evolve in DOS environment.
2 if yes, i couldnt find any type of graphics library for the console.
is there any ?(I need to design some interface)

please help....
 
There is no graphics for console programs. They are win32 executables that have a text interface instead of a graphical one, they are not DOS progams.
 
Divil, this is bad news for me.
what about the crossplatform, machine independent language claim...???? Are u sure u can't develop for DOS in the .NET environment at all?
 
A lot of POSs are DOS based. A nice portion of my income still comes from old DOS programs I wrote long ago.
You just cant ask a 20 stores retail chain to replace their POSs in this kind of economic atmosphere. Thats a nasty investment.

Divil, i have another question.
im trying to add reference sto dlls to check what they expose (spy).
the 'Add reference" dialog accepts only refs to the ones existing in the the listview. if I browse for another one i get:
"a reference to the xxx.dll could not be added. This is not a valid assembly or COM component..." etc.
is there a turnaround?
 
It sounds like you're trying to added a reference to a native DLL. You can only add references to .NET assemblies, or COM DLLs.
 
The DLLs that .NET wants must be COM DLLs. A COM DLL is a special DLL that contains objects and interfaces. The important part is that a COM DLL is self-describing as it is meant to be interfaced to, even more than a standard C-style DLL. A C-style DLL exposes functions (and a little more), but isn't self-describing.

To use a C-style DLL in .NET you'll have to use DllImport (see the help) and expose the functions yourself. For example, to expose the function SendMessage in the windows DLL "user32.dll", you use:
C#:
[DllImport("user32")]
private static extern int SendMessage(int hwnd, int msg, int wparam, int lparam);

If you want to mainting (not re-write) your old DOS-based programs, you're likely stuck with Turbo-C, Turbo-Pascal, etc. Borland, as far as I know, is the only one who made a good DOS-based compiler for writing robust "windows"-like apps.

.NET is for Windows applications though there are ports for other OS's. I can almost guarantee that there will *never* be a port for DOS as MS owns DOS and won't take the time to do it.

For $600, the retail clients can buy a PIII 700 and upgrade to some version of Windows. The UI enhancements over DOS are well worth it in terms of screen space alone. But if they have their amber screens and like them, I wouldn't try to change it and that means staying with Turbo-C.

-Nerseus
 
Nerseus, that was very helfull. thanx for ur time. here and my other thread.
concerning upgrades, an intergrated back office- Point Of Sale solution can cost 50 grands my friend not including setup and of course not maintenance. Its not about upgrading to windows.
If it was that simple id be unemployed!
 
Back
Top