CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: CreateHardLink

  1. #1
    Join Date
    Oct 2000
    Posts
    28

    CreateHardLink

    There's CreateHardLink API function in Win2K that creates hard links to files.

    Can anyone help me with an example of using it in VB? I do not know how to pass parameters correctly
    TYA


  2. #2
    Join Date
    Apr 2000
    Location
    Southampton, UK
    Posts
    329

    Re: CreateHardLink

    Use this, I haven't tried it but it should work:

    Declare Function CreateHardLink Lib "Kernel32" (lpFileName as string, lpExistingFileName as string, lpSecurityAttributes as Any) as Long



    Then use as

    lngReturn = CreateHardLink ("Myfilename","MyExistingFileName",0&)




    TimCottee
    I know a little about a lot of things and a lot about very little.

    Brainbench MVP For Visual Basic
    http://www.brainbench.com

    MCP, MCSD, MCDBA, CPIM

  3. #3
    Join Date
    Oct 2000
    Posts
    28

    Re: CreateHardLink

    Thanks,
    It works.



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

Featured