DesignCAD User Forum
September 07, 2010, 02:03:42 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
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
DesignCAD User Forum
>
DesignCAD SDK
>
COM, OLE Automation, .NET
>
A null reference pointer was passed to the stub
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: A null reference pointer was passed to the stub (Read 1040 times)
Rifolino
Newbie
Posts: 2
A null reference pointer was passed to the stub
«
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
Re: A null reference pointer was passed to the stub
«
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
Re: A null reference pointer was passed to the stub
«
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
Re: A null reference pointer was passed to the stub
«
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
Re: A null reference pointer was passed to the stub
«
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
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General DesignCAD Topics
-----------------------------
=> News and Announcements
=> General Discussion
=> Looking For Help?
=> Tips and Tricks
=> Feature Requests
=> Totally Off-Topic
-----------------------------
DesignCAD SDK
-----------------------------
=> SDK General Discussion
=> COM, OLE Automation, .NET
=> BasicCAD
=> SDK Errata
=> User Contributions
=> SDK Feature Requests
Loading...