Hi,
please don't tell me there is no other posibility to access the serial
port than using the createfile(...) func?
I was so convinced of .NET until this! Can somebody please provide me
with an answer, which shows I'm wrong!?!
Martin 7 4505
mphanke wrote: Hi,
please don't tell me there is no other posibility to access the serial port than using the createfile(...) func? I was so convinced of .NET until this! Can somebody please provide me with an answer, which shows I'm wrong!?!
Martin
The .Net Framwork v1.1 doesn't include a communications class library...
BUT, you can use MSCOMM from visual basic 6 in .Net
Look at this like for details: http://www.devhood.com/tutorials/tut...utorial_id=320
I'm using this method in one of my projects and it seems to be running
smoothly.
Jamie
mphanke wrote: Hi,
please don't tell me there is no other posibility to access the serial port than using the createfile(...) func? I was so convinced of .NET until this! Can somebody please provide me with an answer, which shows I'm wrong!?!
Martin
In this version It's the only way.
Hi Martin,
Beside the community's reply, I will provide you another MSDN article about
serial port communication, FYI:
"Use P/Invoke to Develop a .NET Base Class Library for Serial Device
Communications" http://msdn.microsoft.com/msdnmag/is...netserialcomm/
The more I want to point out is that, if you want to specify Serial Ports
larger than COM9, you need different syntax, please refer to: http://support.microsoft.com/default.aspx?scid=kb;[LN];115831
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Hi Martin,
Does our reply make sense to you? Do you still have concern on this issue?
Please feel free to feedback. Thanks
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Hi,
decided to use the P/Invoke solution. It works pretty good! Eventhough
it was a little bit hard in the beginning to figure out why the COM1 and
the LCD where not talking with eachother [Dough...] but you shouldn't
communicate Unicode with this type of hardware ;-)
Thanks for your help,
Martin
Jeffrey Tan[MSFT] wrote: Hi Martin,
Does our reply make sense to you? Do you still have concern on this issue?
Please feel free to feedback. Thanks
Best regards, Jeffrey Tan Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.
Hi Martin,
Thanks for your feedback.
I am glad we can help you. If you need further help, please feel free to
post.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jamil |
last post by:
I have a device connected through serial port of my desk top PC
running Windows 2000. The device is sending some data as serial stream
asynchronously. I need to do the follwings:
1) Open the COM1 port of the PC
2) Read the data coming from the connected device
3) Save the data into a file
4) After writing all the data, the COM1 port should be closed
Please refer me any sample code either in C or C++ which I could run
|
by: Ramakant Kasar |
last post by:
Hi,
If an application is reading data from a serial port, How can I open the
same serial port with another application?
Any idea? Please help.
Thanks,
Ramakant K.
|
by: Michael Chong |
last post by:
I wrote a program that communicate with SerialComm. In every 300
milliseconds, my program continuously send & receive data via the serial
port once the program starts.
My program is once in a while, the serial port seems corrupted because when
my data is sent, it doesn't go through the serial port, so as same to
receive process. In order to fix this, I have to close the port and reopen
the port again.
Why?!! Is there any way to fix...
|
by: Leandro Berti via DotNetMonster.com |
last post by:
Hi All,
I wrote a code to do serial communication with an equipament.
When i use the code outside of threaded class it seens work properly,
but when i put inside a class and execute a thread in the first seconds the
communication is ok, later i receive read/write error.
I?ve been in MSDN site and there i discover that the read/write error is a
INVALID_HANDLE problem. But why??? I just create the serial communication
file and use it....
|
by: joe bloggs |
last post by:
I am writing a mobile application to interface with a legacy system and I am
planning to use web services to communicate with this system. The legacy
system receives data through a serial port. What I would like to do is make
the serial port accessible via a web service.
The web service and the legacy application would be running on the same
machine. The mobile application would access the web service via a network
connection. It...
| |
by: Lonifasiko |
last post by:
Hi,
I've been able to communicate using HyperTerminal with my device via
serial port COM1. I just send a command and device switches on. I just
need that to start playing with it. This way, I understand device and
serial communication work wihout problems.
Now I want to do the same with C# code. As simple as that.
I open the serial port with the configuration manufacturer gives me,
|
by: chapeau_melon |
last post by:
Hello,
I'm basicly not a programmer...
I found some C++ codes on the net that almost satisfy me needs, wich
is to communicate with an other device that sends data to me, wich I
have to receive and save into a file.
But here is the problem :
I have a copy of the MS-DOS KERMIT communication program.
|
by: ghjk |
last post by:
I want to read sms from GSM modem using C# in serial communication. I wrote the code. But i want to do it automatically. I put my code here and please tell me how can i do it automatically.
public partial class SMS : Form
{
//create an Serial Port object
SerialPort sp = new SerialPort();
public SMS()
{
|
by: cnixuser |
last post by:
Hello, I have a basic application written which is designed to data over a serial cable and then receive a response back. I am not getting any triggers to my data received event. I have tried connecting the pc I am running this application on to another PC which is also sending hex characters ;however, when I run the application I am getting no trigger of the data received event and am completely clueless as to why. Any help that could be...
|
by: Adrian Chen |
last post by:
please help me! I come across a problem.
Now I develop a finger print management system which is based on B/S.When
users click a button in the web pages, a device connected to the COM1 serial
port of the client machine starts to work.
Now I wrote the code which is in charge of serial communication in the
..aspx.cx pages, but then I found that when uses click the button, it is the
server's serial port that starts to work,not the clients!!
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |