DesignCAD User Forum
September 07, 2010, 02:03:42 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: DesignCAD 3D Max 20 now available for purchase. See News and Announcements for more details.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: A null reference pointer was passed to the stub  (Read 1040 times)
Rifolino
Newbie
*
Posts: 2


« on: September 21, 2009, 08:08:54 AM »

Hello,
I worked with DesignCad15 and the samples SDK-Delphi-Samples (Delphi6)worked well.
After I have installed DesignCad17 I get with some of the Delphi-Samples the Error "A null reference pointer was passed to the stub" when I am comiling the delphi-samples.
For example the sample HATCHTEST
The error "A null reference pointer was passed to the stub" appeares here:
      SetLength(HatchObj, 11);
     DcHatch.DrawType := dcHatchDefault;
Does anyone has an solution for this problem?
Thanks
Regards
Rifolino
Logged
DrollTroll
Elusive Lurker Under Bridges
Administrator
*****
Posts: 1037



« Reply #1 on: September 23, 2009, 04:34:53 PM »

Hrmmm... just tried it, worked fine for me.

Did you change the code to
GetActiveOleObject('DesignCAD.Application.17')
and
CreateOleObject('DesignCAD.Application.17')
?

Otherwise it may be trying to target the wrong (possibly not-installed) version of DesignCAD...
Logged
dcadRob
Sr. Member
****
Posts: 320



« Reply #2 on: September 24, 2009, 12:51:39 PM »

Could this be caused by linking to the wrong type library in the Delphi program?
Logged
DrollTroll
Elusive Lurker Under Bridges
Administrator
*****
Posts: 1037



« Reply #3 on: September 25, 2009, 01:59:26 PM »

That is a possibility. I suggest removing DesignCAD_TLB from your uses clauses, then re-import the type library, making sure it's for the correct version, and add back in your DesignCAD_TLB uses. Mark where you save the imported _TLB.pas file, also -- you may need to adjust your directory paths in the project options.
Logged
Rifolino
Newbie
*
Posts: 2


« Reply #4 on: October 15, 2009, 11:54:30 AM »

Thanks dcabRob and DollTroll,
You gave me the correct advice. It was the wrong library.
Regards from Germany!
Rifolino
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!