Is that an activeX ctrl?
An activeX can not be created correctly with operator new;
Since activex is one application of COMs,you should use IUnknown or IDispatch(if automation surported) to manipulate the methords.Also,MFC provides some classes to simplify the corresponding coding work.

解决方案 »

  1.   

    Hr5Scanner is not a COM, It is a Function of Class in SDK, and it's Constructure function is Hr5Scanner();I change the code as follow:Hr5Scanner  m_Scanner;the same error show;
      

  2.   

    有没有人知道是怎么回事啊???
    我用的SDK不是控件.是第三方开发的类.
    大家都放假了?? 没人回答问题了??
      

  3.   

    如果不是控件,而是类,那么不需要注册,也不能注册和在 ActiveX control test Container装入。
      

  4.   

    If I only use define:Hr5Scanner*  m_pScanner;It is right and can be register.
    but if I add new:m_pScanner = new Hr5Scanner();Error is occured
      

  5.   

    我要做的是控件, Hr5Scanner是我用的SDK中的一个类.请问这是为什么??
      

  6.   

    别着急啊,大家如果没用过Hr5Scanner确实不知道怎么回事。
    我都是直接用twain sdk做扫描程序的,你说的这个东西在什么地方下载的?
      

  7.   

    不是下载的,是别人的商业品,我想问的是,在ActiveX中用SDK是不是要在工程中加什么设置?
      

  8.   

    你注册的时候是用的什么版本?unicode debug,unicode release,还是debug,release?
      

  9.   

    还有,你可以自己写一个简单的类放入,看会不会有问题,如果没有那证明是你的hr5scanner有问题
      

  10.   

    我用MFC的类没有问题,可我不知道SDK哪儿有问题...
      

  11.   

    Hr5Scanner的代码不是我的,我也看不到...
      

  12.   

    initalize是在哪里调用的?谁调用过这个函数?
      

  13.   

    我unicode debug,unicode release,debug,release都用了,没有一个可以注册的...
      

  14.   

    把你的程序发到[email protected]不要你的SDK
      

  15.   

    程序发到[email protected]了,收吧....
      

  16.   

    我在我的机器上试过了,我new了一个第三方OpenGL的类对象,但是没问题呀。
      

  17.   

    你是不是注册时一直不动,VC一直处于Linking....状态?
    还是提示了什么错误信息?
      

  18.   

    谢谢大家,问题解决了,我只要把SDK带来的2个DLL放在OCX目录下,就没问题了.Thanks all body here very much....