Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 566
  • Last Modified:

API call NetMessageBufferSend in VB.net

It was quite easy to use NetMessageBufferSend() API to broadcast a message in VB6 as the strings domainname, computername, etc were converted to Unicode using strConv. I am having problem in getting the function work in VB.net. Though I have read that the strings in vb.net are stored as unicode, it doesn't seem to accept strings in the API function.

Can someone please help me in locating some examples of NetMesageBufferSend function in vb.net?

Thanks
Souvika  
0
Souvika
Asked:
Souvika
  • 2
1 Solution
 
tshdosCommented:
If you declare the function like this:

Public Declare Unicode Function NetMessageBufferSend ...

it will force all strings to unicode.

(You can also use ...Declare Ansi... for Ansi strings)
0
 
SouvikaAuthor Commented:
Thanks a lot.. it worked.

Souvika
0
 
SouvikaAuthor Commented:
One problem is still there: the messenger service pop up shows funny characters after the message (eg: !???!!!). This was not there in VB6 app.

Any solutions?

Thanks
Souvika
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now