Click to See Complete Forum and Search --> : Problem with WIN2K


ramachandranv
February 13th, 2003, 07:41 AM
Hello there,

I have written an application for serial port communication. The application was to send data to an embossing machine and to print it. The problem i am facing is that the application is running 100% perfect on a Win98 system while when i run it on the Win2k the system hangs. I debugged and found the problem. When the embossing system is ready it return a character - 17 to tell that it is ready to recieve data to be embossed. Now on Win98 i am able to capture this signal but when i run the application on Win2k it does not give me the signal !!!!. Is there any problem with Win2k ? The application was a Win32 console based application designed in VC++. I used the normal fucntionality to write to the port

CreateFile, ReadFile and WriteFile.. This is pretty urgent could anybody please help ? Is there any issues with Win2k ? Thanks in advance

KingTermite
February 14th, 2003, 01:26 PM
You might find some answer in the Device Control Block (DCB) strucuture and the SetCommState() function. I'm not sure, but maybe it could lead you in the right direction if not, I hope.

ramachandranv
February 17th, 2003, 08:49 AM
Originally posted by KingTermite
You might find some answer in the Device Control Block (DCB) strucuture and the SetCommState() function. I'm not sure, but maybe it could lead you in the right direction if not, I hope.

Thank you for the quick response. It was greatly appreciated. But i installed VC++ on the production system (Win2k) and it worked ok. Now which is the DLL that makes this happen any idea ? Since it was a console application there was no need of any dll i thought but since it is working now with VC++ being installed i think there is some DLL in play here. Could u throw light on this the reason being in production i might not have VC++ installed. Also when i make the entire application a class i am not getting the signal but if i put the application within a function the whole of the connection / reading and writing is working perfectly. Any help ?

KingTermite
February 17th, 2003, 01:00 PM
I have no idea, I thought it was one of the standard kernal libraries. I just took a quick peek at one of the functions and this is the "quick info".

QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.


Nothing there is VC++ specific. Now you really make want to test my driver on a system that does not have VC++ installed just to be on the safe side.

You might be able to use the Visual Studio tool to trace which DLLs its making calls to. It's in the Visual Studio tools. I can't remember which program it is (Tracer or Spy++ or one of the others). I can show you dynamically what DLLs are being called.