Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
Questionregarfin session state Pin
samasavinirs16-Mar-06 18:08
samasavinirs16-Mar-06 18:08 
Questionload image in asp.net page --using c# Pin
deepak116-Mar-06 17:48
deepak116-Mar-06 17:48 
QuestionExpand/Collapse a category in property grid Pin
Tulika Shrivastava16-Mar-06 17:34
Tulika Shrivastava16-Mar-06 17:34 
QuestionPropertyGrid Control Pin
deepscyberpulse16-Mar-06 16:30
deepscyberpulse16-Mar-06 16:30 
QuestionNo. of pages spooled to printer in C# Pin
Bijon Roy16-Mar-06 14:45
Bijon Roy16-Mar-06 14:45 
QuestionUsing Named Pipes with C#?? Pin
Phil C16-Mar-06 13:55
Phil C16-Mar-06 13:55 
AnswerRe: Using Named Pipes with C#?? Pin
mcljava17-Mar-06 4:46
mcljava17-Mar-06 4:46 
GeneralRe: Using Named Pipes with C#?? Pin
Phil C18-Mar-06 20:41
Phil C18-Mar-06 20:41 
mcljava wrote:
TCP/IP sent to localhost, uses Named Pipes under the hood I'm told. That's a reasonable swap.

Otherwise you have two basic options. If you want to use Named Pipes in C# for a general mechansism then its off to P/Invoke land. But unless you have to interface to an older C/C++ program that used Named Pipes, you might consider leveraging some of C#'s data structures and particularly the TCP classes.

Secondly, if you are using SQL Server, Microsoft has carried over Named Pipes for that. That's easy to take advantage of.


Yeah, but the trick is figuring out how to use these classes and if they will actually work or not.

I have no control over the other program I'm interfacing with, I just have a pair of named pipes for talking and listening and a list of commands I can expect to receive and replies I need to make.

Whether the TCP classes happen to use pipes or not doesn't mean anything to me. I need to open a specific pipe, wait for a command from another program (which is not of my design or control) and give it a response telling it my status. That program uses named pipes and it's the only hook available for communication.


mcljava wrote:
Secondly, if you are using SQL Server, Microsoft has carried over Named Pipes for that. That's easy to take advantage of.


Nope, not using SQL server.

mcljava wrote:
With some effort you can force an implementation in C# but you have to ask: "why am I doing this?"


Well, I'm doing it because that's my job...LOL. Unfortunately every time a new technology comes along half the world jumps on the bandwagon thinking it's the next best thing since cake and the other half is relegated to trying to make it work with all the stuff that's been done before. In this example, I have a c# .NET namespace which is the only way to access one piece of hardware, and a named pipe scheme which is the only way to talk to the master program. I'm caught in the middle and have no say in how either one is done.

I really appreciate you giving this one a shot, truly, but I'm afraid I'm left just as confused as to how to accomplish this as I was before.

Anyone know of any books, texts, articles that covers this, or at least dance around the topic enough that I might glean some ideas?

Could there be some way to tap into named pipes using the Win32 API? The Win32 API examples I've seen all look awfully ugly when brought into C# and none even come close to touching on named pipes as far as I can find.

All hints and suggestions welcomed

Phil
GeneralRe: Using Named Pipes with C#?? Pin
mcljava19-Mar-06 17:29
mcljava19-Mar-06 17:29 
GeneralRe: Using Named Pipes with C#?? Pin
Phil C19-Mar-06 22:59
Phil C19-Mar-06 22:59 
QuestionProblem Occured - IP address Pin
Jijo BP16-Mar-06 13:48
Jijo BP16-Mar-06 13:48 
AnswerRe: Problem Occured - IP address Pin
Phil C16-Mar-06 14:03
Phil C16-Mar-06 14:03 
GeneralRe: Problem Occured - IP address Pin
Jijo BP16-Mar-06 14:54
Jijo BP16-Mar-06 14:54 
GeneralRe: Problem Occured - IP address Pin
Phil C16-Mar-06 15:14
Phil C16-Mar-06 15:14 
QuestionResponse.BinaryWrite to open/save word doc Pin
missy416-Mar-06 13:13
missy416-Mar-06 13:13 
QuestionSOAP and wsdl Pin
allenmpcx16-Mar-06 11:21
allenmpcx16-Mar-06 11:21 
QuestionLimitations on parameters for Interfaces? Pin
Erik Davidson16-Mar-06 10:38
Erik Davidson16-Mar-06 10:38 
AnswerRe: Limitations on parameters for Interfaces? Pin
leppie16-Mar-06 15:02
leppie16-Mar-06 15:02 
GeneralRe: Limitations on parameters for Interfaces? Pin
Erik Davidson16-Mar-06 19:25
Erik Davidson16-Mar-06 19:25 
QuestionRegular Expressions in C# Pin
conrado716-Mar-06 9:52
conrado716-Mar-06 9:52 
AnswerRe: Regular Expressions in C# Pin
Curtis Schlak.16-Mar-06 10:02
Curtis Schlak.16-Mar-06 10:02 
GeneralRe: Regular Expressions in C# Pin
conrado716-Mar-06 11:21
conrado716-Mar-06 11:21 
AnswerRe: Regular Expressions in C# Pin
leppie16-Mar-06 15:08
leppie16-Mar-06 15:08 
GeneralRe: Regular Expressions in C# Pin
conrado717-Mar-06 0:57
conrado717-Mar-06 0:57 
GeneralRe: Regular Expressions in C# Pin
leppie17-Mar-06 1:04
leppie17-Mar-06 1:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.