Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I m seeking your help for the following. I have a code which sends a binary file data to a Serial port engine frame by frame. For this I have a micro-controller attached with my system to perform the communication.Everytime i run the program a request for port open is sent to the microcontroller and after the port opens the communication occurs.

Now my task is i need to create a desktop shortcut(for eg my EXE).This shortcut when clicked should directly request for port open and carry forward the communication and after communication when the application is closed it should quit the process. While the same process when done through my main program the port should not open or close. ie no action regarding this should happen.

Pls help me regarding this. Thanks in advance.
Posted
Comments
Sergey Alexandrovich Kryukov 4-Oct-11 1:28am    
Do you want to create desktop shortcut programmatically? If so, why? If not, it's just a context menu item in Windows...
--SA
Member 7979279 4-Oct-11 1:31am    
No i can even give the exe as a shortcut. This is a bootloader application so for user convenience we are just planning to enable communication in a single click, instead of running the program again and again.

1 solution

Read the following article. All what you need is there.

Serial Communication using C# and Whidbey[^]
 
Share this answer
 
Comments
Member 7979279 4-Oct-11 1:24am    
Hi. I refferred this article but it explains the communcation using Sp. I already have a dll file which establishes connection between the h/w and s/w. What i want is a desktop shortcut to communicate with my program.
CodingLover 4-Oct-11 1:32am    
So that means you want to have a shortcut to carry on the complete process?
Member 7979279 4-Oct-11 1:33am    
Ya exactly. :) Like if we use exe as a shortcut we once again need to run the program to get the output. Instead i just need a single click to do all
this
CodingLover 4-Oct-11 1:38am    
So at the moment, you are doing the connection open, send data, read data and close the connection are done through different levels, or the different events. Am I correct?
Member 7979279 4-Oct-11 1:43am    
Ya these are separate functions in my program. Each receives an ack from the h/w and carries out the next process..like first port open -> ack
send bytes->ack , write -> ack, read(written bytes)->ack and finally close. Each of these is a function in my program.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900