Results 1 to 20 of 20

Thread: Help converting C# to VB [Resolved]

Threaded View

  1. #1

    Thread Starter
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840

    Help converting C# to VB [Resolved]

    Hi.

    I'm trying to port some image processing code I found on Code Project.

    The code is C#, but I'm trying to port it to VB and there's a line I can figure out.
    I tried the converter on Developerfusion but that couldn't figure it out either, so I'm hoping some of you brainiacs here can crack it

    VB Code:
    1. BitmapData bmData = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
    2. System.IntPtr Scan0 = bmData.Scan0;
    3.  
    4. 'This is the line that bugs me.
    5. byte * p = (byte *)(void *)Scan0

    I believe it creates an array of bytes starting from the memoryhandle that Scan0 points to?!?

    Perhaps I need some marshal, but wouldn't know where to begin.
    Last edited by pax; Jul 19th, 2004 at 06:01 AM.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width