Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Want to do this in VB - involves C pointers...

Want to do this in VB - involves C pointers...

Scheduled Pinned Locked Moved Visual Basic
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    ns
    wrote on last edited by
    #1

    The Following bit of code:

    ' int nalg = 10
    ' int* score = new int[nalg];
    '
    ' for (int n = 0 ; n < nalg ; n++) score[n] = 10*(n+1);
    '
    '
    ' // call the function
    '
    ' int fusion_score;
    '
    ' Fusion_Method(&nalg, score, &fusion_score);

    How would I write this in VB. Fusion_Method is a function in a C Dll that I am "loadLibrary"ing into the VB calling code. Thanks! Appreciate your help, ns

    C 1 Reply Last reply
    0
    • N ns

      The Following bit of code:

      ' int nalg = 10
      ' int* score = new int[nalg];
      '
      ' for (int n = 0 ; n < nalg ; n++) score[n] = 10*(n+1);
      '
      '
      ' // call the function
      '
      ' int fusion_score;
      '
      ' Fusion_Method(&nalg, score, &fusion_score);

      How would I write this in VB. Fusion_Method is a function in a C Dll that I am "loadLibrary"ing into the VB calling code. Thanks! Appreciate your help, ns

      C Offline
      C Offline
      CT CHANG
      wrote on last edited by
      #2

      Perhasp you can try with the varptr to pass the pointer into the Fusion_Method function. K-PAX? CHANGE THE WAY YOU LOOK AT YOURSELF, OTHERS & THE WORLD...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups