I am getting this error
{System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {D6BA1539-8473-497C-92C3-8ECF63DAC0F3} failed due to the following error: 80040154.
at ASP.webform1_aspx.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\WebcamPicture\WebForm1.aspx:line 21}
while executing the following code
System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter();
short nQuality = 45;
CAMSERVERLib.Camera cam = new CAMSERVERLib.CameraClass();
byte[] picture = (byte[])cam.GrabFrame(nQuality);
MemoryStream ms = new MemoryStream(picture);
Bitmap bmp = new Bitmap(ms);
Graphics g = Graphics.FromImage(bmp);
string strDate = DateTime.Now.ToLongDateString() + " - " + DateTime.Now.ToLongTimeString();
StringFormat drawFormat = 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
);
ImageCodecInfo[] icf = ImageCodecInfo.GetImageEncoders();
EncoderParameters encps = new EncoderParameters(1);
EncoderParameter encp = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, (long)nQuality);
encps.Param[0] = encp;
bmp.Save(Response.OutputStream, icf[1], encps);
g.Dispose();
bmp.Dispose();
I have sucessfully register the dll iusing regasm. but why iam getting this error please tell me.
[edit]Code block added - OriginalGriff[/edit]