troubleshooting Question

What is the "When" keyword in VB6 and a replacement for VarPtr

Avatar of bill_home
bill_home asked on
Visual Basic ClassicVisual Basic.NET
8 Comments1 Solution454 ViewsLast Modified:
Hello All,
     I am converting a VB6 app to vb.net. I came across the code listed below for a "WHEN" statement. I also need a replacement for VarPtr. I read that the "WHEN" is used like a try catch. However it does not seem to make much sense as used below.   Below is the VB6 code for the "WHEN" and "VarPtr".

If When And MSG_BEFORE Then                 ' how would I convert this to vb.net?                            
      zAddMsg(uMsg, IDX_BTABLE)                              
 End If


 FileWrite(hFOut, VarPtr(lngDataID), 4)     'how would I convert this to vb.net?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros