Click here to Skip to main content
15,900,724 members
Home / Discussions / C#
   

C#

 
GeneralRe: unable to cast object of type 'X' to type 'X' [modified] Pin
Martin#9-Jul-07 22:49
Martin#9-Jul-07 22:49 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Vikram A Punathambekar10-Jul-07 0:47
Vikram A Punathambekar10-Jul-07 0:47 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Martin#10-Jul-07 1:18
Martin#10-Jul-07 1:18 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Vikram A Punathambekar10-Jul-07 4:30
Vikram A Punathambekar10-Jul-07 4:30 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Martin#10-Jul-07 4:39
Martin#10-Jul-07 4:39 
AnswerRe: unable to cast object of type 'X' to type 'X' Pin
AFSEKI10-Jul-07 6:31
AFSEKI10-Jul-07 6:31 
QuestionSend a string to another program Pin
suntromantralalalala9-Jul-07 5:08
suntromantralalalala9-Jul-07 5:08 
AnswerRe: Send a string to another program Pin
Luc Pattyn9-Jul-07 6:51
sitebuilderLuc Pattyn9-Jul-07 6:51 
Hi,

there are many ways to do this. Basically you need to:
1. either store the data at an agreed location (say a file), then signal it has
been updated (or wait for a FileWatcher to notice it);
2. or send it as a message to the process directly; this combines the info and
the signal.

2.can be done using different techniques; in each case it is assumed you are
in charge of the code at both ends; and most often you will need several
P/Invoke operations calling win32 functions:
- sockets dont need win32; I stopped doing it because my firewall (ZoneAlarm)
threw up some dialogs when I did
- SendMessage (needs a buffer in the destination process' memory, see
VirtualAllocEx, and WriteProcessMemory and the like
- named pipes; this is the way I currently use; uses CreateNamedPipe,
ConnectNamedPipe, WriteFile, ReadFile and the like.
- MSMQ (Microsoft Message Queues); I havent tried this one yet.
- and probably more

All of them will take some code (say 50 to 100 lines, to set it up and tear
it down correctly at both ends).

On all of these a lot of articles and documentation is available, both on
CodeProject and MSDN.

Smile | :)



QuestionIterating through all values of an ORed enum variable... Pin
Shy Agam9-Jul-07 5:05
Shy Agam9-Jul-07 5:05 
AnswerRe: Iterating through all values of an ORed enum variable... Pin
Martin#9-Jul-07 5:39
Martin#9-Jul-07 5:39 
AnswerRe: Iterating through all values of an ORed enum variable... Pin
Luc Pattyn9-Jul-07 7:08
sitebuilderLuc Pattyn9-Jul-07 7:08 
GeneralRe: Iterating through all values of an ORed enum variable... Pin
PhilDanger9-Jul-07 7:20
PhilDanger9-Jul-07 7:20 
GeneralRe: Iterating through all values of an ORed enum variable... Pin
Shy Agam9-Jul-07 8:12
Shy Agam9-Jul-07 8:12 
GeneralRe: Iterating through all values of an ORed enum variable... Pin
Luc Pattyn9-Jul-07 8:20
sitebuilderLuc Pattyn9-Jul-07 8:20 
GeneralRe: Iterating through all values of an ORed enum variable... Pin
Luc Pattyn9-Jul-07 8:44
sitebuilderLuc Pattyn9-Jul-07 8:44 
GeneralRe: Iterating through all values of an ORed enum variable... Pin
Shy Agam9-Jul-07 8:51
Shy Agam9-Jul-07 8:51 
GeneralRe: Iterating through all values of an ORed enum variable... Pin
Martin#9-Jul-07 9:06
Martin#9-Jul-07 9:06 
GeneralRe: Iterating through all values of an ORed enum variable... Pin
Luc Pattyn9-Jul-07 9:18
sitebuilderLuc Pattyn9-Jul-07 9:18 
GeneralRe: Iterating through all values of an ORed enum variable... Pin
Luc Pattyn9-Jul-07 9:27
sitebuilderLuc Pattyn9-Jul-07 9:27 
GeneralRe: Iterating through all values of an ORed enum variable... Pin
Martin#9-Jul-07 9:54
Martin#9-Jul-07 9:54 
AnswerRe: Iterating through all values of an ORed enum variable... Pin
PhilDanger9-Jul-07 7:17
PhilDanger9-Jul-07 7:17 
GeneralRe: Iterating through all values of an ORed enum variable... Pin
Shy Agam9-Jul-07 8:02
Shy Agam9-Jul-07 8:02 
AnswerRe: Iterating through all values of an ORed enum variable... Pin
PhilDanger9-Jul-07 10:55
PhilDanger9-Jul-07 10:55 
QuestionHow to play at the same time 2 or more sounds Pin
mayhem709-Jul-07 4:58
mayhem709-Jul-07 4:58 
AnswerRe: How to play at the same time 2 or more sounds Pin
mav.northwind9-Jul-07 19:21
mav.northwind9-Jul-07 19:21 

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.