|
I have a high configurable pc with MS-Office 2010 package, i have implemented one application(in c++/cli) which will write plenty of data in no'of excel sheet(single workbook)so after writing in 8 sheets suddenly it pop-ups one error message saying"Excel cannot complete this task with available resources Choose less data or close other applications". Task Manager tells me I have plenty of resources left. Does anyone have any ideas as to what might be happening and how to fix it?
Note: I can't reproduce it again since application will do lot of process(almost 4days) to generate 8 sheets
|
|
|
|
|
Given that it is 4 days to generate the 8 sheets, it is my guess that you have a memory leak or a resource/handle leak. I know you say that Task Manager says you have plenty of resources left, but this really sounds like a leak of some kind.
I would start by double checking the freeing of every resource you allocate. Make sure they are freed in a timely manner also.
|
|
|
|
|
Hi David, now i realized that i am not saving the excel file till completion of the report generation so what i am suspecting, each excel sheet will have maximum rows 1048576 that means
1048576 * 8 = 8388608 rows of data(this data is a huge) it holding on RAM. Now what i will do i will save the excel file for each 5 sheets completion and continue to generate report.
In this application i am also using number of Dictionary objects, so i will also take care to freed these objects as per you suggestion.
Thanks for you support
|
|
|
|
|
I have a set of project folders which are compilable using make files and as of now i am compiling using nmake at command prompt.. i want the entire folder structure to be in a project or a solution file has to be built so that i can compile like a regular Project and must be able to place breakpoint in VS6.0 pls help
PS: Code is in plain C and C++ and NO MFC Used ...
|
|
|
|
|
Shyam Kodase wrote: Code is in plain C and C++
Then you would be better off asking in the appropriate forum[^] since this forum is for mangaged C++.
|
|
|
|
|
Shyam Kodase wrote: Code is in plain C and C++ So why have you posted this in the Managed C++/CLI forum?
However, as to your question: The best way to do this would be to leave the existing folders intact until the new projects are all building successfully.
- Using Visual Studio, create a new empty project for the first existing project in your set. This will create a solution folder and a project folder underneath it.
- Copy the source files (via Windows Explorer) from the existing project into the new project folder.
- Using Visual Studio, add the files into the project (header, resource, source etc).
- Build the project and correct any errors.
- Add a new blank project to the solution and repeat the above process.
- Repeat for all remaining projects.
Use the best guess
|
|
|
|
|
I have managed c++ ref type class in DLL. In C# application, I am using the this managed DLL and referring the managed class as below:
CManaged * obj = new CManaged();
with help of pointer to instance, I am accessing the member methods of CManaged class.
Everything is working fine on VS 2010.
Question:
How C# (managed code) handle the pointers?
Is it depend on my Visual Studio version?
|
|
|
|
|
NAVALMAN wrote: Is it depend on my Visual Studio version? No, Visual Studio is an IDE and has nothing to do with the code generation or running of programs.
Use the best guess
|
|
|
|
|
Thanks Richard MacCutchan.
How the pointers are handled in Manged C++?
|
|
|
|
|
What do you mean?Pointers are pointers, nothing more. If you are asking about handing off unmanaged objects to managed code, then you need to look at some of these links[^].
Use the best guess
|
|
|
|
|
NAVALMAN wrote: How C# (managed code) handle the pointers?
Since it is managed C++ it probably doesn't do anything especially clever. If C# is doing anything at all, it is just wrapping it in a small object.
The C# specification might spell it out in detail.
|
|
|
|
|
Thank you
|
|
|
|
|
I have a legacy C++ native code application that implements a class hierachy with some inheritance.
I have to re-implement the application within a managed framework.
TI would like to reuse the unmanged class hierarchy from the managed application and still benefit from the polymorphism built in to my unmanaged class hierarchy.
Do I have to write a C++/CLI wrapper for each unmanaged class in the hierarchy and duplicate the inheritance structure within the wrappers?
|
|
|
|
|
You might do it that way, but it might actually be better to put the native parts into managed DLLs using the wrappers and then using the DLLs from your managed application.
It all depends on what you are trying to do. I wouldn't get too wrapped up in trying to preserve the old hierarchy in the managed world though.
|
|
|
|
|
Assuming that you really do need to expose the full class hierarchy as managed types to managed code then yes, I think you're left duplicating the hierarchy with wrapper ref classes.
If the client managed application is also guaranteed to be C++/CLI (and not C#) it could #include the native class hierarchy intact and use it directly. If you want to allow C# then I'd use wrapper classes with the PIMPL idiom.
Also, hopefully your native classes don't use multiple inheritance since a managed class can only have one non-interface base class.
John
|
|
|
|
|
|
|
Hello!
In my linker I get an error:
[bcc32 Error] Unit1.cpp(109): E2316 'GetScanline' is not a member of 'TBitmapData' Full parser context Unit1.cpp(42): parsing: void _fastcall TForm1::Button1Click(TObject *)
But I can clearly see it here
Embarcadero API TBitmapData
Actually I have only 3 methods in TBitmapData - Pitch, GetPixel and PixelFormat. That is strange.
What should I do to use GetScanline?
I use Embarcadero RAD Studio XE3. And Firemonkey.
Thanks!
|
|
|
|
|
Please post your question (which is not C++/CLI) in one forum only.
Use the best guess
|
|
|
|
|
Sorry. I hurried too much and posted it in the wrong place. Then had to post it where it should be. My bad.
|
|
|
|
|
If you post in the wrong place you can always delete it when you realise your mistake.
Use the best guess
|
|
|
|
|
Hi
my application is in C++ and I need to call a method from application that is in C#
I use Visual Studio 2012 and I am completely new to this.
I tried some of the examples on this site but am frustrated by failure all the time.
I created a C++/CLR project
and used the example at following link, but can't get it to I don't know why it thinks I'm using unmanaged code while I checked the commandline options in my project and there is /clr in it. Is this related VS 2012? please help
http://www.codeproject.com/Articles/10020/Using-managed-code-in-an-unmanaged-application
|
|
|
|
|
Member 9668955 wrote: please help With what? All you have done is tell us that you can't get it to work. You need to provide specific details of the failures and include extracts of the code that is giving the problem. If you are having a problem with the code of an article then you should use the forum at the end of that article to discuss with the author.
Use the best guess
|
|
|
|
|
Dear All Everyone !
If you have book abt VISUAL STUDIO 2005 or 2008, pls send to me with email address: lqlong0302@gmail.com
Thank you very much !
|
|
|
|
|
Greetings All,
I would like to make a GUI, for sensor configuration purpose, with the style of MFC Application Wizard. Basically, I'd like
1. Multiple property sheets, each of which can interact with user inputs.
2. There is a browsing tree to list all the property sheets.
3. One can navigate through the property sheet by "Previous" and "Next" buttons; or, one may select a property sheet by clicking it in the browsing tree.
I program mainly in C++, and know well of VB. I wonder what tool and option would do the trick.
Thanks a lot!
Z.
|
|
|
|