Hi
Can i use instant messaging resource (chat) in Notes Client/Domino 6.5 environment without a Sametime server installed ?
Thanks in advance.
Hi
Can i use instant messaging resource (chat) in Notes Client/Domino 6.5 environment without a Sametime server installed ?
Thanks in advance.
Subject: Instant Messaging without Sametime
Make your own…(its not the same, but you can mess with your colleagues!) Technically, this will give you instant messaging without sametime.
create a standard .exe in vb.
three fields:
Text1 - Label it: “From”
Text2 - Label it: “Send To(Computer Name) (* for all):”
Text3 - Label it: “message”
And a button, “Command1”, label it “Send Message”
create a form, put paste all of this into the general declarations and run it…
Option Explicit
Private Const OPEN_EXISTING = 3
Private Const GENERIC_WRITE = &H40000000
Private Const FILE_SHARE_READ = &H1
Private Const FILE_ATTRIBUTE_NORMAL = &H80
Private Const vbDotEveryone As String = “*”
'User-defined type for passing
'the data to BroadcastMessage
Private Type MailslotMessageData
sMsgFrom As String
sSendTo As String
sMessage As String
End Type
Private Declare Function CreateFile Lib “kernel32” _
Alias “CreateFileA” _
(ByVal lpFileName As String, _
ByVal dwDesiredAccess As Long, _
ByVal dwShareMode As Long, _
ByVal lpSecurityAttributes As Long, _
ByVal dwCreationDisposition As Long, _
ByVal dwFlagsAndAttributes As Long, _
ByVal hTemplateFile As Long) As Long
Private Declare Function WriteFile Lib “kernel32” _
(ByVal hFile As Long, _
ByVal lpBuffer As Any, _
ByVal nNumberOfBytesToWrite As Long, _
lpNumberOfBytesWritten As Long, _
ByVal lpOverlapped As Long) As Long
Private Declare Function CloseHandle Lib “kernel32” _
(ByVal hHandle As Long) As Long
Private Sub Form_Load()
Text1.Text = " "
Text2.Text = " "
With Text3
.MaxLength = 128
.Text = " "
End With
Command1.Caption = “Send Message”
End Sub
Private Sub Command1_Click()
Dim msg As MailslotMessageData
'fill the structure with the
'message data
With msg
.sMsgFrom = Text1.Text
.sSendTo = Text2.Text
.sMessage = Text3.Text
End With
'return the success to a label
Label1.Caption = BroadcastMessage(msg)
End Sub
Private Function BroadcastMessage(msg As MailslotMessageData) As String
Dim hFile As Long
Dim byteswritten As Long
Dim buff As String
Dim sSlotName As String
Dim i As Integer
i = 0
'ensure message type has data
'and either abort transmission
'or set default values
While i < 100
If Len(msg.sMessage) = 0 Then
BroadcastMessage = "No message specified; nothing to do."
Exit Function
End If
If Len(msg.sSendTo) = 0 Then
msg.sSendTo = vbDotEveryone
End If
If Len(msg.sMsgFrom) = 0 Then
msg.sMsgFrom = "Mailslot System Message"
End If
'must be something to do, so…
'the mailslot name is a combination of
'the receiving machine name prefixed
'with double slashes, followed by
'\mailslot\messngr
sSlotName = “\” & msg.sSendTo & “\mailslot\messngr”
'the message transmitted is a
'combination of the from, to and
'message strings separated by null
'characters
buff = msg.sMsgFrom & vbNullChar & _
msg.sSendTo & vbNullChar & _
msg.sMessage & vbNullChar & vbNullChar
'obtain a handle to the mailslot
hFile = CreateFile(sSlotName, _
GENERIC_WRITE, _
FILE_SHARE_READ, _
0&, _
OPEN_EXISTING, _
FILE_ATTRIBUTE_NORMAL, _
0&)
'if it’s a go …
If hFile <> 0 Then
'write the message to the slot and close the file
If WriteFile(hFile, _
buff, _
Len(buff), _
byteswritten, _
0) <> 0 Then
If (Len(buff) = byteswritten) Then
BroadcastMessage = "The message was successfully sent."
Else
BroadcastMessage = "Message sent but bytes written <> message size."
End If 'If (Len(buff)
Else
BroadcastMessage = "Error writing the message."
End If 'If WriteFile
Call CloseHandle(hFile)
End If 'If hFile
i = i + 1
Wend
End Function
‘–end block–’
Subject: RE: Instant Messaging without Sametime
Andrew:
Can I ask what possessed you to do this? LOL!
Wow.
Gregg
Subject: RE: Instant Messaging without Sametime
Haha! Gregg I actually do use it to broadcast emergency announcements over the network once in awhile…and if you wrap the send in a for loop it can work as a good prank against your boss!
Subject: RE: Instant Messaging without Sametime
Hi all,Andrew,it looks a very good tip, but I couldn’t make it work.
May be I’m missing something, an include or something like that. Your help will be appreciated,as I need exctilly what you have done.
Many thanks
Subject: Instant Messaging without Sametime
From the Notes 6.5.1 Help:
“Note: The features described in this topic are available only if your company has an IBM Lotus instant messaging (Sametime) server, and only for Windows versions of IBM Lotus Notes . . .”
So, the short answer is, no.
Gregg