[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: ActiveX control Message Properties
- Subject: Re: ActiveX control Message Properties
- From: Michael McSharry
- Date: Sun, 25 Jan 2004 21:39:00 +0000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<DIV><FONT face="Arial" size="2">Thank You
Mark, it is a good solution for now.</FONT></DIV>
<BLOCKQUOTE>
<DIV>----- Original Message ----- </DIV>
<DIV><B>From:</B> <A title="mph@xxxxxxx"
href="mailto:mph@xxxxxxx">Mark
Harrison (Yahoo!)</A> </DIV>
<DIV><B>To:</B> <A
title="xAP_developer@xxxxxxx" href="mailto:xAP_developer@xxxxxxx">xAP_developer@xxxxxxx</A>
</DIV>
<DIV><B>Sent:</B> Sunday, January 25, 2004 6:03
AM</DIV>
<DIV><B>Subject:</B> Re: [xAP_developer] ActiveX control
Message Properties</DIV>
<DIV></DIV>Michael,Please see the code stuff (at the bottom of
this message), which is how I do it..As you'll see, I use a lexical parse
of the header, which I pass to the function as a string, rather than using
a specific property/method of the OCX:Regards,Mark----- Original Message
----- From: Michael McSharryTo: <A href="mailto:xAP_developer@xxxxxxx">xAP_developer@xxxxxxx</A>Sent:
Sunday, January 25, 2004 6:27 AMSubject: [xAP_developer] ActiveX control
Message PropertiesI'm using Patrick's ActiveX control for xAP with
success. I am able to setthe properties for the message source
and target, but when I receive amessage and place it in message structure I
am not able to retrieve thesource and target properties. I am
able to use the available methods tocompare these fields and it will return
matches when they occur, but when Ilook at the property directly it always
returns a null string. Is this
bydesign or is there something else that needs to be setup before
readingthese properties?=========== CODE FRAGMENT STARTS
=============Attribute VB_Name = "clsXapMessage"Attribute
VB_GlobalNameSpace = FalseAttribute VB_Creatable = TrueAttribute
VB_PredeclaredId = FalseAttribute VB_Exposed = FalseOption ExplicitPrivate
sHeaderKeyword As StringPrivate lVersion As LongPrivate lHopCount As
LongPrivate sUniqueIdentifier As StringPrivate sClass As StringPrivate
sSource As StringPrivate sTarget As StringPublic Sub
ProcessMessage(sRawMessage As String) On
Error GoTo ProcessMessage_Error Dim
sCurrentMessage As String Dim
lCurrentDelimiterPossition As Long Dim
objMyMessageBlock As clsMessageBlock Dim
objMyKeyValuePair As clsKeyValuePair Dim
sCurrentKeyValuePair As String Dim
sCurrentEqualsPosition As
Long Dim sCurrentBangPosition As
Long Dim sMyKeyWord As
String Dim sMyValue As
String Dim bMyIsHex As
Boolean Dim lHeaderID As
Long Dim lCntr1 As
Long Dim lCntr2 As
Long If sRawMessage = ""
Then
Exit Sub End If
sCurrentMessage = sRawMessage 'Start decoding
the header ChangeStatus "Decoding xAP
message..." lCurrentDelimiterPossition =
InStr(1, sCurrentMessage, "{")
sHeaderKeyword = Mid(sCurrentMessage, 1, lCurrentDelimiterPossition -
1) If Mid(sHeaderKeyword, Len(sHeade
rKeyword), 1) = Chr$(10)
Then
'Some messages don't have the line feed before the first
{ 'so
need to check it it is there and then remove
it
sHeaderKeyword = Mid(sHeaderKeyword, 1, Len(sHeaderKeyword) -
1) End If If
Not (UCase(sHeaderKeyword) = UCase("xap-Header"))
Then
'Don't log
heartbeats
ChangeStatus
""
Exit Sub End If
sCurrentMessage = Mid(sCurrentMessage, lCurrentDelimiterPossition +
2,Len(sCurrentMessage)) lCurrentDelimite
rPossition = InStr(1, sCurrentMessage,
Chr$(10)) lVersion =
CLng(Mid(sCurrentMessage, 3, lCurrentDelimiterPossition -
3)) sCurrentMessage = Mid(sCurrentMessage,
lCurrentDelimiterPossition +
1,Len(sCurrentMessage))
lCurrentDelimiterPossition = InStr(1, sCurrentMessage,
Chr$(10)) lHopCount =
CLng(Mid(sCurrentMessage, 5, lCurrentDelimiterPossition
-5)) sCurrentMessage = Mid(sCurrentMessage,
lCurrentDelimiterPossition +
1,Len(sCurrentMessage))
lCurrentDelimiterPossition = InStr(1, sCurrentMessage,
Chr$(10)) sUniqueIdentifier =
Mid(sCurrentMessage, 5, lCurrentDelimiterPossition
-5) sCurrentMessage = Mid(sCurrentMessage,
lCurrentDelimiterPossition +
1,Len(sCurrentMessage))
lCurrentDelimiterPossition = InStr(1, sCurrentMessage,
Chr$(10)) &am
p;nbsp; sClass = Mid(sCurrentMessage, 7,
lCurrentDelimiterPossition - 7)
sCurrentMessage = Mid(sCurrentMessage, lCurrentDelimiterPossition +
1,Len(sCurrentMessage))
lCurrentDelimiterPossition = InStr(1, sCurrentMessage,
Chr$(10)) sSource = Mid(sCurrentMessage, 8,
lCurrentDelimiterPossition - 8)
sCurrentMessage = Mid(sCurrentMessage, lCurrentDelimiterPossition +
1,Len(sCurrentMessage))
lCurrentDelimiterPossition = InStr(1, sCurrentMessage,
"}") If Not
lCurrentDelimiterPossition = 1
Then
'Target is
optional
sTarget = Mid(sCurrentMessage, 8, lCurrentDelimiterPossition -
9) End If<TT>
<HR width="500">
<B>Yahoo! Groups Links</B>
<UL>
<LI>To visit your group on the web, go to:<A href="http://groups.yahoo.com/group/xAP_developer/">http://groups.yahoo.com/group/xAP_developer/</A>
<LI>To unsubscribe from this group, send an email to:<A
href="mailto:xAP_developer-unsubscribe@xxxxxxx?subject=Unsubscribe">xAP_developer-unsubscribe@xxxxxxx</A>
<LI>Your use of Yahoo! Groups is subject to the <A href="http://docs.yahoo.com/info/terms/">Yahoo!
Terms of Service</A>.
</LI></UL></TT></BLOCKQUOTE>
xAP_Development Main Index |
xAP_Development Thread Index |
xAP_Development Home |
Archives Home
|