Hello I just joined VBF and just started learning VB. I am creating a simple im client application. Need to encode a string into base64. The problem is that the code I used was for VB6 which contains StrConv function which has been modified in the later versions of VB. Here is the only problem :
Here is the error:
'vbFromUnicode' is not declared. It may be inaccessible due to its protection level.
Here is the EncodeBase64 function:
Here is something I found related to the problem but couldn't understand: http://msdn.microsoft.com/en-us/libr...(v=vs.71).aspx
Please treat me as a total newbie and forgive me if I didn't explain good enough. Any suggestions would be highly appreciated. Thank you!
Code:
Dim ind As String
ind = EncodeBase64(StrConv(vbNullChar + username.Text + vbNullChar + pass.Text, vbFromUnicode))'vbFromUnicode' is not declared. It may be inaccessible due to its protection level.
Here is the EncodeBase64 function:
Code:
Private Function EncodeBase64(ByRef data() As Byte) As String
Dim xml As MSXML2.DOMDocument
Dim node As MSXML2.IXMLDOMElement
xml = New MSXML2.DOMDocument
node = xml.createElement("b64")
node.dataType = "bin.base64"
node.nodeTypedValue = data
EncodeBase64 = node.Text
node = Nothing
node = Nothing
End FunctionPlease treat me as a total newbie and forgive me if I didn't explain good enough. Any suggestions would be highly appreciated. Thank you!