My requirment :: I need a COM Component that can interact with Client's PC , read specified file and send File ,that can be of any size and any type ,from client to the file server.the File will be uploaded in the chunks.
Problem :
As far as i know ..COM component can be built in .net 2003 .. in which Micrososft provides 'COM Class Template'
I have build a COM Component through COM class Template in .net 2003.Now i m facing problem in initialization of that componenet via VBScript. I m unable to call that component at client side also.
is the anyone who is brillient enough to tell me the steps to call a COM component(built either in
Vb 6.0 or
Vb.net or C#.net) via VBScript a client side.
Please let u know if have any solution and suggestion
************************************************** *******************
Code of my COM component
************************************************** *******************
Imports System.IO
Namespace InfiniFileUploader
<ComClass(FileUploader.ClassId, FileUploader.InterfaceId, FileUploader.EventsId)> _
Public Class FileUploader
#Region "COM GUIDs"
' These GUIDs provide the COM identity for this class
' and its COM interfaces. If you change them, existing
' clients will no longer be able to access the class.
Public Const ClassId As String = "EBA61BD9-D19C-4A9D-9153-7E227C931A35"
Public Const InterfaceId As String = "DD66706B-FA9B-434C-BC2A-5D2251951365"
Public Const EventsId As String = "2A06E5AA-7DB6-44F4-BD0E-96787E9C5022"
#End Region
Private FPath As String = ""
Private fname As String = ""
Public Property FilePath() As String
Get
Return FPath
End Get
Set(ByVal Value As String)
FPath = Value
End Set
End Property
Public Property FileName() As String
Get
Return fname
End Get
Set(ByVal Value As String)
fname = Value
End Set
End Property
' A creatable COM class must have a Public Sub New()
' with no parameters, otherwise, the class will not be
' registered in the COM registry and cannot be created
' via CreateObject.
Public Sub New()
MyBase.New()
End Sub
Public Function UploadFile() As String
Dim File As FileInfo = New FileInfo(FilePath)
Dim fs As FileStream = New FileStream(FilePath, FileMode.Open, FileAccess.Read)
Return File.Length.ToString
End Function
End Class
End Namespace
Salma Hanif Shaikh