Re: C# messaging



Sorry, didn't mention that.
Both are windows applications.
(C# will not be a win service)

I was thinking of windows messages (SendMessage)
But how is this in C#? Unable to find any doc about it.
Sending, receiving messages.
RegisterWindowMessage() i C#

[DllImport("user32.dll")]
int RegisterWindowMessage(????? lpString);
What should be used instead of LPCTSTR?


"dlgproc" <dlgproc@xxxxxxxxxxxxxxxxxxxxxxxxx> skrev i melding
news:4D8E9D17-D8B7-4862-9630-C7402C672CA4@xxxxxxxxxxxxxxxx
> Is your C program Windows based or DOS based?
>
> If both the C and C# are Windows based (they create a window) you can send
> and receive regular windows messages between the 2 applications using
> SendMessage().
>
> If your C program is DOS based, you may be able to launch it as a child
> process from your C# program and redirect it's STDIN and STDOUT to send
> and
> receive text from it.
>
> Hope this helps.
> Regards,
> DlgProc
>
> "GTi" wrote:
>
>> Do anyone have a simple solution how I can send a simple message (int)
>> from a C program to a C# program/service ?
>> Preferred both ways C <-> C#
>>
>> (Windows messages - how ?)
>>
>> It must be extremely easy and in-memory (no disk media).
>>
>> Best regards,
>> Newbie GTi
>>
>>
>>


.



Relevant Pages

  • Re: How to: distinguish ShutDown Message from Restart Message
    ... cases Windows will be shut down. ... You can't use windows messages for that. ... I use Windows API ExitWindowEx to exit windows XP. ... > so I can deny its logging in? ...
    (microsoft.public.win32.programmer.messaging)
  • Computer humor
    ... The following are new Windows messages that are under consideration ... (Y/N) ... User Error: Intelligence Resource Level Insufficient ...
    (sci.med.transcription)
  • Re: User defined mesage in C#?
    ... those user defined windows messages. ... With a delegate, you can use Control.Invokeor Control.BeginInvokeand PostMessage, respectively) to have a method run on the GUI thread. ... Events don't in and of themselves address the cross-thread issue, and they still require the use of delegates. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: inter-process communication
    ... Callback function will get all the information to whoever is asking for it. ... We have a dll which makes/monitors system changes. ... would need to use a registered windows message with a unique string. ... If windows messages are not the way to go, ...
    (microsoft.public.vc.mfc)
  • Re: Windows messages not delivered to COM service project.
    ... If you have created the window using CreateWindow in the WinMain ... the windows messages mysteriously get lost (i ... GetMessage function. ...
    (microsoft.public.vc.atl)