Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB.Net
#1
I've started to convert my source to VB.Net and I've hit a snag.

With the byte array packet system Dugor designed, he uses a function called "GetAddress" and then calls it with the addressof for each sub that handles a packet.

In VB6, this is a perfect method to use. In VB.Net, it bitches, saying:

Code:
'AddressOf' expression cannot be converted to 'Long' because 'Long' is not a delegate type.

Here's an example of how AddressOf is used:
Code:
HandleDataSub(modEnumerations.ClientPackets.CGetClasses) = GetAddress(AddressOf HandleGetClasses)

And here's the GetAddress function:

Code:
Public Function GetAddress(ByVal FunAddr As Long) As Long
        GetAddress = FunAddr
    End Function

Anyone here know anything about VB.Net? I'm using VB2008..

Once I figure this out, I can keep moving, but I'm at a loss.

Thanks guys. Big Grin
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)