Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

To obtain the string value sent using Send()

369 views
Skip to first unread message

Bikash

unread,
Apr 28, 2000, 3:00:00 AM4/28/00
to
Hi,

How to obtain the string value sent using Send() function in Powerbuilder.

For e.g :

1024 - is the pbm_custom01

Send( Handle(my_app),1024,0,"this is a test string")

Now my question is how can I get the value of the string in the event
mapped to pbm_custom01 of the application to which I have
sent the message.

Can anyone help me.
Thanks in Advance

Bikash

Roy Kiesler [TeamSybase]

unread,
Apr 28, 2000, 3:00:00 AM4/28/00
to
string PassedString

PassedString = String( Message.LongParm, "address" )

--
pbm_hopethishelps,
Roy Kiesler [TeamSybase]
Sybase Developers Network (SDN) - http:///www.sybase.com/sdn

"Bikash" <bikashprasa...@ushacomm.co.in> wrote in message
news:o1nGh9Ss$GA....@forums.sybase.com...

Bikash

unread,
Apr 28, 2000, 3:00:00 AM4/28/00
to
Hi Roy,

I used the following code

string PassedString
PassedString = String( Message.LongParm, "address" )

but this is giving a Dr Watson.
I am using the 7.02 version of PB

Regards
Bikash

Roy Kiesler [TeamSybase] <SPAM_FREE...@noblestar.com> wrote in message
news:BxpXVLUs$GA....@forums.sybase.com...

Bikash

unread,
Apr 28, 2000, 3:00:00 AM4/28/00
to
To be more specific I am using the Send() function to send message to
another powerbuilder
application with string as a parameter. And I am trying to obtain the value
of the string in
the another application.

Roy Kiesler [TeamSybase]

unread,
Apr 28, 2000, 3:00:00 AM4/28/00
to
You are using the wrong handle in the statement:

Send( Handle(my_app),1024,0,"this is a test string")

Use:

Send( Handle( <some window> ),1024,0,"this is a test string")

The window referenced by <some window> should implement a user event mapped
to pbm_custom01.

--
pbm_hopethishelps,
Roy Kiesler [TeamSybase]
Sybase Developers Network (SDN) - http:///www.sybase.com/sdn

"Bikash" <bikashprasa...@ushacomm.co.in> wrote in message

news:WL9XOcUs$GA....@forums.sybase.com...


> Hi Roy,
>
> I used the following code
>

> string PassedString
> PassedString = String( Message.LongParm, "address" )
>

> but this is giving a Dr Watson.
> I am using the 7.02 version of PB
>
> Regards

Roy Kiesler [TeamSybase]

unread,
Apr 28, 2000, 3:00:00 AM4/28/00
to
You should be sending the message to a valid **window** handle. You can get
a valid window handle of another app by using the FindWindowA Win32 API,
based on that window's title or registered clasname.

--
pbm_hopethishelps,
Roy Kiesler [TeamSybase]
Sybase Developers Network (SDN) - http:///www.sybase.com/sdn


"Bikash" <bikashprasa...@ushacomm.co.in> wrote in message

news:nujwzeUs$GA....@forums.sybase.com...


> To be more specific I am using the Send() function to send message to
> another powerbuilder

> application with string as a parameter. And I am trying to obtain the


value
> of the string in

> the another application.

Bikash

unread,
Apr 28, 2000, 3:00:00 AM4/28/00
to
Hi Roy,

I am using the following code

application 1 ( test1.exe )
------------
instance variable

long il_handle

open event of application
il_handle = FindWindowA( 0,"test")
timer(3)

Timer Event
Send(il_handle,1024,0,"this is a test message")

application 2 ( test.exe)
-----------------------

Application Open Event
open(w_test)


In this I have a user event which is mapped to pbm_custom01 in this window
and has the following code

String ls_str
ls_str = String(Message.LongParm,"address")
Message("Message",ls_str)

But then also it is giving Dr. Watson.
Help required..


Roy Kiesler [TeamSybase] <SPAM_FREE...@noblestar.com> wrote in message

news:5pYVagUs$GA....@forums.sybase.com...

Roy Kiesler [TeamSybase]

unread,
Apr 28, 2000, 3:00:00 AM4/28/00
to
Silly me! end of day -- you cannot use "address" between two different
applications, as one application cannot reach into the memory address space
of another.

If you need to pass non-numeric (string or otherwise) information using
Send(), you have to use the WM_COPYDATA message an the means of IPC -- not a
trivial task!

Another option is to use shared memory (via memory mapped files, for
example). Once again, this is not for the faint at heart.

--
pbm_hopethishelps,
Roy Kiesler [TeamSybase]
Sybase Developers Network (SDN) - http:///www.sybase.com/sdn

"Bikash" <bikashprasa...@ushacomm.co.in> wrote in message

news:aVHyC3Us$GA....@forums.sybase.com...

BobC.

unread,
Apr 30, 2000, 3:00:00 AM4/30/00
to
Why not communicate via the registry? One writes, the other reads. Or via a
flat file?

bob_c...@yahoo.com

0 new messages