Click here to Skip to main content
13,198,467 members (65,050 online)
Click here to Skip to main content
Add your own
alternative version


12 bookmarked
Posted 22 Jun 2006


, 22 Jun 2006
Rate this:
Please Sign up or sign in to vote.
IPC using custom windows messanging by win32 api


Hi actually i'm not that professional to submit a material, but as our need arises we
do search for program snaps. I have used many programs and studied them.This program 
basically is the small part of what i was required to do.But i found this as a small 
and easy programm to start with.

 This is actually all about windows messanging. While performing a task there arose a 
 need to develop the application that interact with the other application. This is the
 extract that you'd like to see.

<FONT COLOR=black>
the easiest steps for interprocess communication are:--

application one:-

1) declare similar message and register it
2) make an identification of it self so that other application can search that.
        Dim Params As CreateParams = New CreateParams
        Params.Caption = <caption goes here>
3) use wndproc method to listen pre-registered windows message and act accordingly

application two:-

1) declare windows message.
2) Register windows message
3) find window (params used here) to which message are to be issued(actually to windows 

message queue)
4) post message using postmessage windows command
the basic windows api used -

    Private Declare Function RegisterWindowMessage Lib "user32" Alias _       "RegisterWindowMessageA" _
(ByVal lpString As String) As IntPtr
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr

Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" _
(ByVal hwnd As IntPtr, ByVal wMsg As IntPtr, ByVal wParam As Integer, _
ByVal lParam As Integer) As IntPtr

the constructor -
    Public Sub New()
        '''''Creating Window based on globally known name, and create handle
        '''''so we can start listening to Window Messages.
        Dim Params As CreateParams = New CreateParams
        Params.Caption = GLOBAL_IDENTITY_ONE
    End Sub

My special thanks to  minja whos post is really helpful.
Your comments and questions are invited.



This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

K edar V
India India
Kedar Vaijanapurkar

You may also be interested in...


Comments and Discussions

Generalhelpful Pin
Jarw AI19-Oct-06 4:56
memberJarw AI19-Oct-06 4:56 
GeneralRe: helpful Pin
Kedar V19-Oct-06 19:26
memberKedar V19-Oct-06 19:26 
Generallooks Pin
chix_v29-Jun-06 1:08
memberchix_v29-Jun-06 1:08 
hay why dont you keep your post very clean like other ones
i think looks does matter
GeneralRe: looks Pin
Kedar V4-Jul-06 19:47
memberKedar V4-Jul-06 19:47 

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171020.1 | Last Updated 22 Jun 2006
Article Copyright 2006 by K edar V
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid