... does not contain any types that can be registered for COM Interop.



I am trying to register a .Net class for COM interop in VS2005. When I went
to add a class there was no "COM class" as a template, so I am trying to
code it myself. But I keep getting "... does not contain any types that can
be registered for COM Interop." as a warning during compile and the COM
object does not get registered.

Any ideas? (code below)

thanks

using System;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Collections.Generic;
using System.Text;
using Captcha;
using System.Runtime.InteropServices;

namespace ImageProcessing{

[Guid("D6F88E95-8A27-4ae6-B6DE-0542A0FC7039")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface _Captchas
{
[DispId(1)]
Boolean createImage(string s, int width, int height, string familyName,
string filename);
}
[Guid("13FE32AD-4BF8-495f-AB4D-6C61BD463EA4")]
[ClassInterface(ClassInterfaceType.AutoDual)]
[ProgId("ImageProcessing.Captchas")]
public class Captchas : _Captchas
{
public Boolean createImage(string s, int width, int height, string
familyName, string filename)
{
CaptchaImage ci = new CaptchaImage(s, width, height, familyName);
ci.Image.Save(filename, ImageFormat.Jpeg);
return true;
}
}
}



.



Relevant Pages

  • [REVS] Defeating Voice Captchas
    ... Defeating Voice Captchas ... Jochem van der Vorm has written a elegant paper and proof of concept to ... Later Jochem found a post about voice captchas. ... int samplerate; ...
    (Securiteam)
  • Re: flatulent-0.0.3
    ... > in most image bases captchas) this works all of the time. ... require 'flatulent' ... def deflatulent string ...
    (comp.lang.ruby)
  • Re: ... does not contain any types that can be registered for COM Interop.
    ... Boolean createImage(string s, int width, int height, string familyName, ... public class Captchas: _Captchas ...
    (microsoft.public.dotnet.general)
  • Re: flatulent-0.0.3
    ... in most image bases captchas) this works all of the time. ... require 'deflatulent' ... def deflatulent string ...
    (comp.lang.ruby)
  • Re: simple 47 bits newbe ;_0
    ... > mov ax,0240 ... > int 21 ... > How the int 21 knows that it has to print the ax register and not the bx or dx or else register? ... You seem to be mixing putting the address of a string in a register, and putting the contents of the string in a register. ...
    (alt.lang.asm)