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. Which one is good for Performance [modified]

Which one is good for Performance [modified]

Scheduled Pinned Locked Moved Visual Basic
jsonperformancequestion
11 Posts 5 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.
  • I indian143

    Hi, I have to create a method which will be called for 5400 times roghly which creates a directory and put the data of the user in it. For performance wise which one is good either 1. MkDir Left$(strPathName, lngPos) 2. Windows API or 3. FSO. which one gives more performance. Whats the DLL to be included for Windows API? Thanks, Aleem Mohammad.

    Thanks & Regards, Md. Abdul Aleem NIIT technologies

    modified on Thursday, November 13, 2008 3:08 AM

    R Offline
    R Offline
    Rajesh Anuhya
    wrote on last edited by
    #2

    Windows API Gives u good for Performance :-O :-O :-O :-O

    Rajesh B --> A Poor Workman Blames His Tools <--

    I 1 Reply Last reply
    0
    • R Rajesh Anuhya

      Windows API Gives u good for Performance :-O :-O :-O :-O

      Rajesh B --> A Poor Workman Blames His Tools <--

      I Offline
      I Offline
      indian143
      wrote on last edited by
      #3

      Hi, Can u please tell me which dll file should be enclosed to write this method or in which class "CreateDirectory()" function exists. If possible some small code snippet. Thanks, Aleem Mohammad.

      Thanks & Regards, Md. Abdul Aleem NIIT technologies

      modified on Thursday, November 13, 2008 5:05 AM

      R 1 Reply Last reply
      0
      • I indian143

        Hi, Can u please tell me which dll file should be enclosed to write this method or in which class "CreateDirectory()" function exists. If possible some small code snippet. Thanks, Aleem Mohammad.

        Thanks & Regards, Md. Abdul Aleem NIIT technologies

        modified on Thursday, November 13, 2008 5:05 AM

        R Offline
        R Offline
        Rajesh Anuhya
        wrote on last edited by
        #4

        just look in http://www.astercity.net/~azakrze3/html/win32_api_functios.html

        Rajesh B --> A Poor Workman Blames His Tools <--

        I 1 Reply Last reply
        0
        • R Rajesh Anuhya

          just look in http://www.astercity.net/~azakrze3/html/win32_api_functios.html

          Rajesh B --> A Poor Workman Blames His Tools <--

          I Offline
          I Offline
          indian143
          wrote on last edited by
          #5

          Hi, I am able to work it out with FileSystemObject as below but the same code I want to write with Windows API, can anybody please help me in sorting out this problem.

          Dim fso As New FileSystemObject
          Dim fold1 As Folder
          If Not (fso.FolderExists("C:\Fold1")) Then
          fold1 = fso.CreateFolder("C:\Fold1")
          End If

          Thanks, Aleem Mohammad.

          Thanks & Regards, Md. Abdul Aleem NIIT technologies

          S 1 Reply Last reply
          0
          • I indian143

            Hi, I am able to work it out with FileSystemObject as below but the same code I want to write with Windows API, can anybody please help me in sorting out this problem.

            Dim fso As New FileSystemObject
            Dim fold1 As Folder
            If Not (fso.FolderExists("C:\Fold1")) Then
            fold1 = fso.CreateFolder("C:\Fold1")
            End If

            Thanks, Aleem Mohammad.

            Thanks & Regards, Md. Abdul Aleem NIIT technologies

            S Offline
            S Offline
            sph3rex
            wrote on last edited by
            #6

            From the cycle "writing your code in 24 hours from scratches". Seriously take the time and read a few resources yourself rather than asking everything on forums. Not to mention the fact that if you dun really understand what's going on in the copied code you will be unable to debug it if something occurs. Then probably we'll get a new round of "questions".

            I 1 Reply Last reply
            0
            • S sph3rex

              From the cycle "writing your code in 24 hours from scratches". Seriously take the time and read a few resources yourself rather than asking everything on forums. Not to mention the fact that if you dun really understand what's going on in the copied code you will be unable to debug it if something occurs. Then probably we'll get a new round of "questions".

              I Offline
              I Offline
              indian143
              wrote on last edited by
              #7

              Sorry friend it is completed but still I tried as a human I have to ask to others. Sorry if am disturbing u. And thanks a lot for the help u all have given me. Thanks a Lot, Aleem Mohammad.

              Thanks & Regards, Md. Abdul Aleem NIIT technologies

              D 1 Reply Last reply
              0
              • I indian143

                Hi, I have to create a method which will be called for 5400 times roghly which creates a directory and put the data of the user in it. For performance wise which one is good either 1. MkDir Left$(strPathName, lngPos) 2. Windows API or 3. FSO. which one gives more performance. Whats the DLL to be included for Windows API? Thanks, Aleem Mohammad.

                Thanks & Regards, Md. Abdul Aleem NIIT technologies

                modified on Thursday, November 13, 2008 3:08 AM

                D Offline
                D Offline
                DrukenProgrammer
                wrote on last edited by
                #8

                Never Add dlls when you can use it from the namespace

                I 1 Reply Last reply
                0
                • D DrukenProgrammer

                  Never Add dlls when you can use it from the namespace

                  I Offline
                  I Offline
                  indian143
                  wrote on last edited by
                  #9

                  Hi, yes I havent added any dll but I was confusing. Thanks a lot friend. Aleem Mohammad

                  Thanks & Regards, Md. Abdul Aleem NIIT technologies

                  D 1 Reply Last reply
                  0
                  • I indian143

                    Hi, yes I havent added any dll but I was confusing. Thanks a lot friend. Aleem Mohammad

                    Thanks & Regards, Md. Abdul Aleem NIIT technologies

                    D Offline
                    D Offline
                    Dave Kreskowiak
                    wrote on last edited by
                    #10

                    You don't need the Windows API to do this. It's not going to give you a performance benefit. You're creating a directory on a drive, not calculating PI to 1,000,000 digits. Keep your code simple and easy to maintain. Use the FileSystemObject to do this. If you do this with the Windows API, you're going to get lost, very, VERY quickly and write about 50 times the code you need to write to do this little job.

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                         2006, 2007, 2008

                    1 Reply Last reply
                    0
                    • I indian143

                      Sorry friend it is completed but still I tried as a human I have to ask to others. Sorry if am disturbing u. And thanks a lot for the help u all have given me. Thanks a Lot, Aleem Mohammad.

                      Thanks & Regards, Md. Abdul Aleem NIIT technologies

                      D Offline
                      D Offline
                      Dave Kreskowiak
                      wrote on last edited by
                      #11

                      You're not disturbing us. We're just pointing out that your overcomplicating your code and your going to run into too many walls that you don't need to run into.

                      A guide to posting questions on CodeProject[^]
                      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                           2006, 2007, 2008

                      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