Hi,
I am trying to use the dplotlib.dll in BorlandC++.
I set the preferences as:
memset(&dplot,0,sizeof(DPlot));
dplot.Version = DPLOT_DDE_VERSION;
dplot.DataFormat = DATA_XYYY;
dplot.MaxCurves = 1;
dplot.MaxPoints = NP;
dplot.NumCurves = 2;
dplot.Scale = SCALE_LINEARX_LINEARY;
dplot.LegendX = 0.05F;
dplot.LegendY = 0.05F;
dplot.NP[0] = NP;
And commands as
sprintf(cmds,"[ManualScale(0,0,1,30)][TickInterval(1,0.5,0.25)]"
"[Caption(\"DPLOTLIB XY Test\")]"
"[GeneralOptions(0x00000020,1)]"
"[Color(1,255,0,0)][Color(2,0,0,255)]"
"[TextFont(1, 8, 0,0,0,0,0,\"Arial\")]"
"[TextFont(2,12,700,0,0,0,0,\"Arial\")]"
"[TextFont(4,10, 0,0,0,0,0,\"Arial\")]"
"[TextFont(5,10, 0,0,0,0,0,\"Arial\")]"
"[TextFont(6,10, 0,0,0,0,0,\"Arial\")]"
"[ClearEditFlag()]");
When I call dPlot_Plot8 the return value is "0" and a blank Plot gets opened and it raises exception?
Did I miss out something?
cheers, hare
Using with Borland C++ Builder 5
Moderator: DPlotAdmin
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
This:
But... the DLL should catch all of those problems and shouldn't cause a crash. If you fix the above and still have problems then most likely the problem is in the interface, something like using _cdecl instead of _stdcall.
Either way, please let me know how this works out.
can't be right. MaxCurves must be greater than or equal to NumCurves. Also you're setting the number of points in the first curve (dplot.NP[0]=NP), but not the second (assuming there is a second curve; if there isn't then set NumCurves=1).dplot.MaxCurves = 1;
dplot.MaxPoints = NP;
dplot.NumCurves = 2;
But... the DLL should catch all of those problems and shouldn't cause a crash. If you fix the above and still have problems then most likely the problem is in the interface, something like using _cdecl instead of _stdcall.
Either way, please let me know how this works out.
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Whoops, you're right: that isn't trapped like I thought it was. It will be in the next release.
Visualize Your Data
support@dplot.com
support@dplot.com