Jump to content
Xtreme .Net Talk

Recommended Posts

Guest Mystic_Slayer
Posted

Hello All,

 

i've just upgraded my code from Visual Basic 6 to Visual Basic.net.

But have Some probs with it:

 

I've used the following code:

 

Private Function SwapEndian(ByVal dw As Long) As Long

CopyMemory(VarPtr(SwapEndian) + 3, dw, 1)

CopyMemory(VarPtr(SwapEndian) + 2, VarPtr(dw) + 1, 1)

CopyMemory(VarPtr(SwapEndian) + 1, VarPtr(dw) + 2, 1)

CopyMemory(VarPtr(SwapEndian, VarPtr(dw) + 3, 1)

End Function

 

I've got the problem in Visual Basic.net that my VarPtr is not Valid.

What Can I do To Solve This Problem?

 

Allready thanks

Guest Mystic_Slayer
Posted

I need the function for the environment variable for Windows.

So I made this, but we're upgrading from 6 to .net

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...