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. Catching return value form .exe

Catching return value form .exe

Scheduled Pinned Locked Moved Visual Basic
linuxhelpquestion
6 Posts 4 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.
  • X Offline
    X Offline
    Xanty
    wrote on last edited by
    #1

    Hi! I've a .exe program writen in ANSI C that returns the real hard drive serial member. From VB i'm calling it doing like: MyApp = Shell("Diskid32.exe", 0), but Shell function returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero, but not the programs output! Can anyone help me with this? Thank you for your time

    R A 2 Replies Last reply
    0
    • X Xanty

      Hi! I've a .exe program writen in ANSI C that returns the real hard drive serial member. From VB i'm calling it doing like: MyApp = Shell("Diskid32.exe", 0), but Shell function returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero, but not the programs output! Can anyone help me with this? Thank you for your time

      R Offline
      R Offline
      Ray Cassick
      wrote on last edited by
      #2

      Why not just go here: http://www.mvps.org/vbnet/index.html?code/disk/volumelabel.htm[^]


      Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
      George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."


      X 1 Reply Last reply
      0
      • R Ray Cassick

        Why not just go here: http://www.mvps.org/vbnet/index.html?code/disk/volumelabel.htm[^]


        Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
        George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."


        X Offline
        X Offline
        Xanty
        wrote on last edited by
        #3

        Thank you for answering but what i need is the manufacturer serial number not the volume's! If i know a way of doing it with VB please tell me!

        A 1 Reply Last reply
        0
        • X Xanty

          Thank you for answering but what i need is the manufacturer serial number not the volume's! If i know a way of doing it with VB please tell me!

          A Offline
          A Offline
          Andy H
          wrote on last edited by
          #4

          Take a look at this URL for your solution: http://www.blackbeltvb.com/index.htm?free.htm

          1 Reply Last reply
          0
          • X Xanty

            Hi! I've a .exe program writen in ANSI C that returns the real hard drive serial member. From VB i'm calling it doing like: MyApp = Shell("Diskid32.exe", 0), but Shell function returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero, but not the programs output! Can anyone help me with this? Thank you for your time

            A Offline
            A Offline
            Anonymous
            wrote on last edited by
            #5

            Well, I found the source for the utility your using. It's at http://www.codeguru.com/system/DiskId32.shtml. The only problem is, your going to have to recode it to be directly usable in VB, possibly as a DLL. The easier way to do it is to pipe the output from the program to a text file with something like: MyApp = Shell("Diskid32.exe > log.txt", 0) You might have to use another method to get this to launch properly. But, in any case, what your going to have to do is open the log.txt file and parse it up to pull the information out of it. It's better than writing a custom DLL to do the job...

            X 1 Reply Last reply
            0
            • A Anonymous

              Well, I found the source for the utility your using. It's at http://www.codeguru.com/system/DiskId32.shtml. The only problem is, your going to have to recode it to be directly usable in VB, possibly as a DLL. The easier way to do it is to pipe the output from the program to a text file with something like: MyApp = Shell("Diskid32.exe > log.txt", 0) You might have to use another method to get this to launch properly. But, in any case, what your going to have to do is open the log.txt file and parse it up to pull the information out of it. It's better than writing a custom DLL to do the job...

              X Offline
              X Offline
              Xanty
              wrote on last edited by
              #6

              Thank you all! What i did was: I edited the c++ code to write the hard drive serial number to a file, that is imediatilly read and erased from the vb code, its not the best solution but i guess it shall work... Thank you once more

              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