Click here to Skip to main content
15,900,258 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Prograaming in Visual Basic.Net Pin
Garth J Lancaster12-Sep-08 19:53
professionalGarth J Lancaster12-Sep-08 19:53 
JokeRe: Prograaming in Visual Basic.Net Pin
Paul Conrad13-Sep-08 5:06
professionalPaul Conrad13-Sep-08 5:06 
GeneralRe: Prograaming in Visual Basic.Net Pin
Garth J Lancaster13-Sep-08 5:22
professionalGarth J Lancaster13-Sep-08 5:22 
GeneralRe: Prograaming in Visual Basic.Net Pin
Paul Conrad13-Sep-08 5:25
professionalPaul Conrad13-Sep-08 5:25 
GeneralGO GARTH! GO GARTH! Pin
leckey13-Sep-08 15:35
leckey13-Sep-08 15:35 
GeneralRe: GO GARTH! GO GARTH! Pin
Garth J Lancaster13-Sep-08 18:04
professionalGarth J Lancaster13-Sep-08 18:04 
AnswerRe: Prograaming in Visual Basic.Net Pin
Dave Kreskowiak13-Sep-08 5:22
mveDave Kreskowiak13-Sep-08 5:22 
QuestionHow to copy a DAT file from one machine to another within a workgroup with using code in vb6 Pin
D.Manivelan12-Sep-08 19:08
D.Manivelan12-Sep-08 19:08 
How to copy a DAT file from one machine to another within a workgroup with using code in vb6

I am using the below code:

Private Declare Function CopyFile Lib "kernel32" _
Alias "CopyFileA" (ByVal lpExistingFileName As String, _
ByVal lpNewFileName As String, ByVal bFailIfExists As Long) _
As Long
Public Function APIFileCopy(src As String, dest As String, _
Optional FailIfDestExists As Boolean) As Boolean

'PURPOSE: COPY FILES
'PARAMETERS: src: Source File (FullPath)
'dest: Destination File (FullPath)
'FailIfDestExists (Optional):
'Set to true if you don't want to
'overwrite the destination file if
'it exists

'Returns (True if Successful, false otherwise)

'EXAMPLE:
'dim bSuccess as boolean
'bSuccess = APIFileCopy ("C:\MyFile.txt", "D:\MyFile.txt")

Dim lRet As Long
lRet = CopyFile(src, dest, FailIfDestExists)
APIFileCopy = (lRet > 0)

End Function

Private Sub Command1_Click()
Dim Str
Str = APIFileCopy("c:\FeatherTexture.bmp", "\\sim3\D$\FTP\FeatherTexture.bmp", False)
End Sub


The Problem is that whenever I try to copy the file to any of the machine in the woprkgroup, it is not copying. After I open the other computer in the workgroup from my computer using "Run" command and type username and password and got connected to the other computer, it allows me to copy the file. But I dont want to select "Run" command and type username and password, because I want to copy the file to multiple machines in the work group. I doesn't make sense typing user name and password for all the computers in the workgroup in order to copy the file.

Pls provide me some solution to copy the file only by using the code without using the Windows "Run" command
AnswerRe: How to copy a DAT file from one machine to another within a workgroup with using code in vb6 Pin
Garth J Lancaster12-Sep-08 19:42
professionalGarth J Lancaster12-Sep-08 19:42 
AnswerRe: How to copy a DAT file from one machine to another within a workgroup with using code in vb6 Pin
Dave Kreskowiak13-Sep-08 5:01
mveDave Kreskowiak13-Sep-08 5:01 
QuestionWindows Services Pin
Gagan.2012-Sep-08 17:11
Gagan.2012-Sep-08 17:11 
AnswerRe: Windows Services Pin
Eslam Afifi12-Sep-08 18:27
Eslam Afifi12-Sep-08 18:27 
AnswerRe: Windows Services Pin
LloydA11112-Sep-08 22:47
LloydA11112-Sep-08 22:47 
Question[Message Deleted] Pin
AliAmjad12-Sep-08 2:46
AliAmjad12-Sep-08 2:46 
AnswerRe: Concept Clarification Pin
Paul Conrad12-Sep-08 5:44
professionalPaul Conrad12-Sep-08 5:44 
GeneralRe: Concept Clarification Pin
AliAmjad12-Sep-08 7:20
AliAmjad12-Sep-08 7:20 
GeneralRe: Concept Clarification Pin
Paul Conrad12-Sep-08 9:03
professionalPaul Conrad12-Sep-08 9:03 
AnswerRe: Concept Clarification Pin
Jon_Boy12-Sep-08 6:06
Jon_Boy12-Sep-08 6:06 
GeneralRe: Concept Clarification Pin
AliAmjad12-Sep-08 7:25
AliAmjad12-Sep-08 7:25 
GeneralRe: Concept Clarification Pin
AliAmjad12-Sep-08 7:30
AliAmjad12-Sep-08 7:30 
GeneralRe: Concept Clarification Pin
Dave Kreskowiak12-Sep-08 7:49
mveDave Kreskowiak12-Sep-08 7:49 
GeneralRe: Concept Clarification Pin
AliAmjad12-Sep-08 8:07
AliAmjad12-Sep-08 8:07 
GeneralRe: Concept Clarification Pin
Paul Conrad12-Sep-08 9:04
professionalPaul Conrad12-Sep-08 9:04 
GeneralRe: Concept Clarification Pin
AliAmjad12-Sep-08 11:19
AliAmjad12-Sep-08 11:19 
GeneralRe: Concept Clarification Pin
Dave Kreskowiak12-Sep-08 12:18
mveDave Kreskowiak12-Sep-08 12:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.