When I try to compile the following code I recieve the error:
error BC30541 Name 'vbNullChar' is not declared
Can anyone help?
Thanks,
Steve
Here's the code.
Namespace SteveUtils
Public Class Message
Private nRet As Integer
Private strServer As String
Private strFrom As String
Private strTo As String
Private strMsg As String
Private Declare Unicode Function NetMessageBufferSend
Lib "NetAPI32.dll" _
(ByVal Server As String, ByVal SendTo As String,
ByVal From As String, _
ByVal Message As String, ByVal MsgLen As Integer)
As Integer
Public Function Send() as Integer
Dim strServer As String
Dim strFrom As String
Dim strTo As String
Dim strMsg As String
strFrom = "Helpdesk Manager"
strTo = "boris"
strServer = vbNullChar
strMsg = "Test Assembly Message"
Return NetMessageBufferSend(strServer, strTo,
strFrom, strMsg, strMsg.Length * 2)
End Function
End Class
End NameSpace