HELP ME! How do I call these API functions......

How should I call these API functions:


Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long


How does that give you the temp path if it returns a long and not a string?


Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long


What do you put for bFailIfExists?


Thanks,


-Thomas

thomascowell@hotmail.com




Comments

  • : Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long


    : What do you put for bFailIfExists?


    I would guess any non-zero value to make it not copy the file if the destination file already exists, or zero to make it automatically overwrite.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories