User (Legacy) Posted November 13, 2003 Report Posted November 13, 2003 Hello! I uses ChartFX client/server and I found out that some time the method export returned me empty picture when I try to export picture from chart. Same behaviour you could look when you want simply show chart but it repeat only when there are a few application are runed in the system and these applications intensivly use CreateCompatibleBitmap. I learned this problem and knew that in the export method you use API function CreateCompatibleBitmap which creates bitmap in the system paged pool but it is limited by system and it is one per whole system. You should use CreateDIBSection to create bitmap in the user memory. Thanks and goodluck!
Software FX Posted November 13, 2003 Report Posted November 13, 2003 You are incorrect when saying "CreateCompatibleBitmap which creates bitmap in the system paged pool but it is limited by system and it is one per whole system". This is not true and can be easily proved by a little program. Simply write a program that calls this API many times, you can have a LOT of these created at the same time. You mentioned you are calling the Export method. What parameters are you passing to it ? You also failed to mention what version of Chart FX you are using (Client/Server, Internet ?, Version number ?). -- FP Software FX, Inc.
User (Legacy) Posted November 14, 2003 Author Report Posted November 14, 2003 Hello! #include "stdafx.h" #include "windows.h" int main(int argc, char* argv[]) {//printf("Hello World!\n"); HDC hdc = ::GetDC(0); HBITMAP hBmp;// = 1; long nCount = 0; do { hBmp = ::CreateCompatibleBitmap( hdc, 400,400 ); if(hBmp) nCount++; } while( hBmp ); printf( "Count of DDB bitmaps = %d", nCount ); getchar(); return 0; } You could run this test and know how many bitmap can be created on your system. On some computer in my company nCount was only 28 and if you create a few of this test you will know that the count of this bitmap one for whole system. The count of bitmap depend on a system and configuration. But a lot of application in a system uses this API function and creates bitmap. Best regards Kirill "SoftwareFX Support" <support@softwarefx.com> wrote in message news:ucDtEjfqDHA.1900@WEBSERVER1... > You are incorrect when saying "CreateCompatibleBitmap which creates bitmap > in the system paged pool but it > is limited by system and it is one per whole system". This is not true and > can be easily proved by a little program. Simply write a program that calls > this API many times, you can have a LOT of these created at the same time. > > You mentioned you are calling the Export method. What parameters are you > passing to it ? > > You also failed to mention what version of Chart FX you are using > (Client/Server, Internet ?, Version number ?). > > -- > FP > Software FX, Inc. > >
Software FX Posted November 14, 2003 Report Posted November 14, 2003 What OS where these computers running ? Let me clarify that Chart FX RELEASES the bitmap as soon as the export operation finishes, so this mean that even in this case where only 28 can be created (this is probably windows 9x systems) you can have 28 Threads SIMULTANEOUSLY creating a chart. You can however export as many charts as you want sequentially. If this is not the case, please let me know. If the case is that after calling export SEQUENTIALLY you get a failure this might be a bug that we need to look into. Are you running Chart FX in a "server" type of application where many threads are created ? Can you elaborate a little bit about your architecture ? -- FP Software FX, Inc.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.