Error in CreateCompatibleBitmap 0x00000057

Q&A for C, C++, and/or C# developers using DPlot
Post Reply
highlycaffeinated
Posts: 6
Joined: Fri Dec 12, 2008 9:43 pm

Error in CreateCompatibleBitmap 0x00000057

Post by highlycaffeinated »

Hello-

I am running into an problem trying to call dplot.DPlot_GetBitmap(docNum, 200, 50) from my C# program. The error message I am getting is "Error in CreateCompatibleBitmap=0x00000057, size=2089890447w x 570h. Obviously I don't really want a bitmap that is 2 billion pixels wide...I only asked for 200! I verified that my docNum parameter is valid and looking at DPlot, the plot appears to be correct. Any ideas why this might be happening?

Thanks,
David
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

David,
What version of DPlot are you running? Another user had a very strange problem with DPlot not correctly interpreting values sent by DDE. It turned out to be a weird interaction between compressing dplot.exe with UPX and... well, something. I could never duplicate the problem on any of my systems but he has seen this on several XP systems. Version 2.2.2.5 doesn't use UPX, and his problem went away.

(I'm glad to hear you don't want a 2 billion pixel-wide bitmap. I actually have had stranger requests :-))
Visualize Your Data
support@dplot.com
highlycaffeinated
Posts: 6
Joined: Fri Dec 12, 2008 9:43 pm

Post by highlycaffeinated »

Hi David,

Thanks for your response. I am (now) using DPlot Jr v2.2.2.5 having just updated from 2.1.9.x. Unfortunately, I'm still seeing the same error. I suspect it is something specific to the plot I've created as I'm able to get bitmaps of other plots just fine. Any other ideas of where to look?

Thanks
David
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Just one: Try using [SetImageCrop(0)] to see if that makes a difference.

If it doesn't... if you can send your source to me please do that.
Visualize Your Data
support@dplot.com
highlycaffeinated
Posts: 6
Joined: Fri Dec 12, 2008 9:43 pm

Post by highlycaffeinated »

Thanks for the suggestion. I tried the SetImageCrop command and it didn't solve the problem. I've e-mailed you the relevant source. Hopefully you'll find some clues in there.

Thanks again,
David
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

File received, thanks. Will get to the bottom of this tonight. For now... soccer time.
Visualize Your Data
support@dplot.com
Post Reply