|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
WinPopup compatible instant messenger for corporate networks
How to realize this function? like Bopup Messenger or winpopup?
Bopup Messenger detail: Bopup Messenger is an Award-Winning instant messenger that enables you to communicate with other users connected across the same LAN, similar to WinPopup and net send. Improved mechanism of sending messages makes messaging faster and at the same time economically uses system memory and resources of a computer. The program features an intuitive interface offering an easy-to-use, clear menu and multilingual support. In addition to basic communication options, Bopup Messenger also offers you more features and functions. http://www.blabsoft.com/products/messenger/
__________________
Being a Code Headman !
|
|
#2
|
|||
|
|||
|
I find a way to do it!
Send a message in a WinPopup format to a computer on the network: Private Declare Function NetMessageBufferSend Lib _ "NETAPI32.DLL" (yServer As Any, yToName As Byte, _ yFromName As Any, yMsg As Byte, ByVal lSize As Long) As Long Private Const NERR_Success As Long = 0& Public Function BroadcastMessage(sToUser As String, _ sFromUser As String, sMessage As String) As Boolean Dim yToName() As Byte Dim yFromName() As Byte Dim yMsg() As Byte Dim l As Long yToName = sToUser & vbNullChar yFromName = sFromUser & vbNullChar yMsg = sMessage & vbNullChar If NetMessageBufferSend(ByVal 0&, yToName(0), ByVal 0&, _ yMsg(0), UBound(yMsg)) = NERR_Success Then BroadcastMessage = True End If End Function Private Sub Command1_Click() Dim x As Boolean x = BroadcastMessage(TxtTo.Text, TxtFrom.Text, TxtMsg.Text) If x Then MsgBox "Message Sent" Else MsgBox "Message Not Sent" End If End Sub But i can't send any message! any one can help me!? |
|
#3
|
|||
|
|||
|
I use the winapi function:
"NetMessageBufferSend" to realize it! Pay Attention to: you must open Messager Service! Module1: Option Explicit Private Declare Function NetMessageBufferSend Lib "netapi32.dll" _ (ByVal servername As String, _ ByVal msgname As String, _ ByVal fromname As String, _ ByVal Buffer As String, _ ByVal BufSize As Long) As Long Private Const NERR_SUCCESS As Long = 0 Private Const NERR_BASE As Long = 2100 Private Const NERR_NetworkError As Long = (NERR_BASE + 36) Private Const NERR_NameNotFound As Long = (NERR_BASE + 173) Private Const NERR_UseNotFound As Long = (NERR_BASE + 150) Private Const ERROR_ACCESS_DENIED As Long = 5 Private Const ERROR_BAD_NETPATH As Long = 53 Private Const ERROR_NOT_SUPPORTED As Long = 50 Private Const ERROR_INVALID_PARAMETER As Long = 87 Private Const ERROR_INVALID_NAME As Long = 123 Public Function NetSendMessage(ByVal sSendTo As String, ByVal sMessage As String) As Long Dim ret As Long 'conversion of strings sSendTo = StrConv(sSendTo, vbUnicode) sMessage = StrConv(sMessage, vbUnicode) 'transmitting message to net comp. NetSendMessage = NetMessageBufferSend(vbNullString, sSendTo, vbNullString, _ sMessage, Len(sMessage)) End Function 'desc. of api err. Public Function NetSendErrorMessage(ErrNum As Long) As String Select Case ErrNum Case NERR_SUCCESS NetSendErrorMessage = "The message was successfully sent" Case NERR_NameNotFound NetSendErrorMessage = "Send To not found" Case NERR_NetworkError NetSendErrorMessage = "General network error occurred" Case NERR_UseNotFound NetSendErrorMessage = "Network connection not found" Case ERROR_ACCESS_DENIED NetSendErrorMessage = "Access to computer denied" Case ERROR_BAD_NETPATH NetSendErrorMessage = "Sent From server name not found." Case ERROR_INVALID_PARAMETER NetSendErrorMessage = "Invalid parameter(s) specified." Case ERROR_NOT_SUPPORTED NetSendErrorMessage = "Network request not supported." Case ERROR_INVALID_NAME NetSendErrorMessage = "Illegal character or malformed name." Case Else NetSendErrorMessage = "Unknown error executing command." End Select End Function Form1: Private Sub Command1_Click() Dim ret As Long ret = NetSendMessage(Text1.Text, Text2.Text) If ret <> 0 Then MsgBox NetSendErrorMessage(ret), vbCritical, "Error" Else MsgBox NetSendErrorMessage(ret), vbInformation, "NetSend" End If End Sub |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > WinPopup compatible instant messenger for corporate networks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|