below is the code for running and capturing image from the webcam

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'Jpeg compression quality 
        Dim nQuality As Short = 45
        'Shout a picture from my webcam 
        Dim cam As CAMSERVERLib.Camera = New CAMSERVERLib.CameraClass()
        Dim picture As Byte()
        'Add the hour to the jpeg picture 
        Dim ms As New MemoryStream(picture)
        Dim bmp As New Bitmap(ms)
        Dim g As Graphics = Graphics.FromImage(bmp)
        Dim strDate As String = DateTime.Now.ToLongDateString() + " - " + DateTime.Now.ToLongTimeString()
        Dim drawFormat As New StringFormat()
        drawFormat.Alignment = StringAlignment.Center
        g.DrawString(strDate, New Font(FontFamily.GenericSansSerif, 12), New SolidBrush(Color.Black), New RectangleF(1, 1, 320, 240), drawFormat)
        g.DrawString(strDate, New Font(FontFamily.GenericSansSerif, 12), New SolidBrush(Color.White), New RectangleF(0, 0, 320, 240), drawFormat)
        'Get codecs 
        Dim icf As ImageCodecInfo() = ImageCodecInfo.GetImageEncoders()
        Dim encps As New EncoderParameters(1)
        Dim encp As New EncoderParameter(System.Drawing.Imaging.Encoder.Quality, CLng(nQuality))
        'Set quality 
        encps.Param(0) = encp
        bmp.Save(Response.OutputStream, icf(1), encps)
        g.Dispose()
        bmp.Dispose()
    End Sub

i have registered the dlls and they are successfully got registered. but when i am running this i'm getting the following error
Retrieving the COM class factory for component with CLSID {D6BA1539-8473-497C-92C3-8ECF63DAC0F3} failed due to the following error: 80040154can anyone can tell me why this error is occuring

yup, i did googling for the answer..................but the solution is very vague to be understood..........evn though i have successfully registered to the required dll interop.camserverlib.dll....it's giving the error....................

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.