473,320 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Memory issue!!

I have placed MS comm control on Test

dialog, While initiate the dialog it is occupying around 2MB space, I am

unable to free this space. I am giving the snippets of the code.

MSComm m_ctlComm;

m_ctlComm.SetCommPort(1);

m_ctlComm.SetInBufferSize(1024);

m_ctlComm.SetOutBufferSize(512);

m_ctlComm.SetSettings("9600,n,8,1");

m_ctlComm.SetInputMode(1);//0 - Text and 1 - Binary.

m_ctlComm.SetRThreshold(0);// To Raise OnCommEvent() method.

m_ctlComm.SetSThreshold(0);

try

{

m_ctlComm.SetPortOpen(TRUE);

}

catch(CException* e)

{

AfxMessageBox("Port is already open. ",MB_ICONSTOP);

return FALSE;

}

After executing this code, it was occupying aroung 2MB space, and I

am unable to release this space, even after closing the dialog in SDI

application. Can you help me to release these memory?

I understand that MSComm control creates an extra copy of data
when GetInput(...) is invoked, and that can be solved by using Attach method
of COleVariant. Is that it Is this applicable to "etPortOpen " method also?

Please help !!

Nov 17 '05 #1
0 898

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jason | last post by:
We are developing a VB.NET database application, using windows forms and Microsoft Access. The application requires dynamic reports, where the users change data on the forms, if a report is...
7
by: David Jacques | last post by:
I have to reformat a string from the form "SRID=4269;POINT(-90.673 69.4310000006199)" to GeometryFromText('POINT (-141.095 68.5430000006417)',4269) ); I have a function to do this by...
5
by: Jim | last post by:
I am developing an ASP.Net HTTP Module used to log requests and responses. To offload the logging, the module saves the request information to a queue which is accessed by another thread to...
1
by: Cy Huckaba | last post by:
We are running our company website on a win2k server running .NET framework 1.0 and IIS 5. The pages consist of mostly static content built from a combination of custom controls (dll is only 148k...
1
by: Mahesh | last post by:
Whenever you upload files via HTTP Post, the file is stored in the memory of the aspnet_wp.exe process, and never deallocates completely (if you are lucky a few MB gets released). One of the config...
3
by: bamapookie | last post by:
I am new to VB, but not new to programming. I am using VB.Net 2003 and I have written a small app to monitor several running processes and everything is fine except the memory usage. When the app...
0
by: Maxwell | last post by:
Hello, I recently completed a MC++ (VS2003) DLL that wraps a non MFC C++ DLL and need to use it in a MC++ Console Application (no forms/guis of any kind just output to console). Trouble is...
3
by: =?Utf-8?B?SmltSGVhdmV5?= | last post by:
I have a program which is looping through a data reader, taking the record which is read, creating an instance of a class which respresents that record, and then inserting that record into a...
7
by: prakashdehury | last post by:
Hi, I have a c# console exe Based on input it consumes arround 1-3 gb of memory I am trying to run it on win2003 box with 8GB of ram. Once the consumed memory goes beyound 1 GM the process...
0
by: mikomty | last post by:
I get the following error message when trying to write/read to a Data Acquisition Switch Unit 34970A using IEEE. Attempted to read or write protected memory issue. This is often an indication that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.