-
- out of memory exception
by gsada
- 6 Replies
- Last post
by gsada
- hi,
System configuration : windows 2000, 2GB RAM
virtual memory: 2GB to 4GB(Initial - Max)
when I am running my application in mfc I am getting out of memory exception.
My application is consisting of a huge data and In my application I am initializing 7000000 objects and each object is holding 50 bytes.
Before allocating the memory for 7 million objects my process
-
- Using multiple threading on multiple-CPU computer
by Liu Lei
- 11 Replies
- Last post
by Liu Lei
- hi, ppl
I am currently using C++ (Visual Studio .Net 2003) for a software design.
The objective is to distribute work among multiple CPU so as to improve efficiency. The code I deployed is as follows:
Thread1 = new Thread( new ThreadStart( this , &Form1::FreezeProcess));
Thread2 = new Thread( new ThreadStart( this , &Form1::BlockinessProcess));
Thread3 = new
-
- This application has failed to start because the application configuration is incorect. Reinstalling the application may fix thi
by Predoni Traian
- 14 Replies
- Last post
by Simple Samples
- Hello, I have created a small program: #include <stdio.h> int main(){ printf("Hello world.\n"); getchar(); return 0; } If I test by running it from Visual Studion is working perfectly. But if I try to test this program by moving the hello.exe file on other machine that do not have Visual Studion installed then I have an error. The error is: "F:\hello.exe This application h
-
- VS 2005 and Qt QString
by TDobmeye
- 14 Replies
- Last post
by TDobmeye
- I am trying to convert a QString to a std: tring using VS 2005 and Qt 4.3.0. There is a function in QString::toStdString( ) that returns a std: tring and I have used this many times when I used VS 2003 and Qt 4.3.0 but I was recently forced to upgrade to VS 2005. Now I have been crashing in a function and I have narrowed it down to this call. I have commented out everything but this one line for c
-
- Load & Play AVI streams with MCIWndOpenInterface
by sdancer75
- 2 Replies
- Last post
by sdancer75
- Hi,
How can i load & play an AviStream using the OpenInterface macro My code compiles just fine but it does not show anything. What's wrong here
void CWrapperDlg: nPlayAVI() { // Create the window like you would any Windows control. m_mciWnd.Create(WS_CHILD | WS_VISIBLE | MCIWNDF_NOPLAYBAR | MCIWNDF_NOERRORDLG | MCIWNDF_NOTIFYERROR, CRect(0, 0, 300,300), this, 1234); // Open the AV
-
- What are a few good Beginner C++ Books?
by quicksilverpoet
- 7 Replies
- Last post
by Zyphon
- I'm just starting to learn to program and I'm trying to find good books for people without any knowledge of C++ or any language. Can anyone give me a few suggestions
-
- typical problem with vector push_back
by SU_Anonymous
- 6 Replies
- Last post
by SU_Anonymous
- Hi im facing a very strange problem: whenever i use vector push_back, then after like 20 push_backs, my program makes the system physical memory to shoot to around around 1.5 GB , execution gets so slow that it's almost dead and after some more time prog gets stuck at a point Below is the snippet where i think the prob shld be. can ne1 figure out the bug void AND::buildObject (const string& g
-
- errors LNK2028, LNK2020, LNK2001, LNK2019
by Mikon
- 1 Replies
- Last post
by Marius Bancila
- Hi all, I'm trying to use mySQL++ within a Visual C++ windows form project, but am not having any luck. I am currently experiencing the following errors when trying to build (copy+pasted, some of the lines are very long): ------ Build started: Project: APOSSv2, Configuration: Debug Win32 ------ Linking... Creating library E:\Uni\CP3046\Visual C++ Project\APOSSv2\Debug\APOSSv2.lib and object E:
-
- Windows Security
by Bodanapu Padmaja
- 1 Replies
- Last post
by Ramkrishna Pawar
- Hi,
I want to use LookupPrivilegeName() function to identify the name of the privilege. but I am not able to get the required information.
The description which I want to get is for SE_AUDIT_NAME . Similarly I am using the function LookupPrivilegeValue function for same privilege. But it is giving an error saying that the specified privilege doesnot exist. When use GetLastError() getting
-
- mspdbsrv.exe consumes more than 500MB of memory
by elviin
- 7 Replies
- Last post
by Brian Kramer
- vs 2005 beta2, exp. ed. Is it common for this tool to consume such amount of memory Then it's almost impossible to do anything with your desktop.
-
- how to add a child window in MFC dialog?
by slac
- 2 Replies
- Last post
by Pintu Shukla
- Hi,
I am trying to add a child window in MFC dialog in order to display images but I don't know how to do it. Any suggestions Thanks!
-
- bug? name lookup in class scope occurs ambiguity.
by ffaannccyy
- 3 Replies
- Last post
by einaros
- Code Block #include<iostream> using namespace std; struct A { int a; }; struct B1:public A { int a; B1(){a=1;A::a=11;} }; struct B2:public A { int a; B2(){a=2;A::a=22;} }; struct C :public B1,public B2 { void foo() { cout<<C::B1::A::a; //ambiguous, vc8 is ok, 11 cout<<C::B2::A::a; //ambiguous, vc8 is ok, 22 cout<<C::B1::a; //ok. 1 cout<<C::B2::a; //ok.
-
- Why is casting needed in this example
by RedKMan
- 3 Replies
- Last post
by Brian Kramer
- I am a little stuck understanding why casting is needed in the following example (Example taken from MSDN website):-
// A simple program that uses LoadLibrary and // GetProcAddress to access myPuts from Myputs.dll. #include <stdio.h> #include <windows.h> typedef int (*MYPROC)(LPTSTR); VOID main(VOID) { HINSTANCE hinstLib; MYPROC ProcAdd; BOOL fFreeResult, fRunTimeLinkSucces
-
- Read and write USB stick
by nocturna_gr
- 3 Replies
- Last post
by nocturna_gr
- Hi, i need to write a simple app for reading and writing a USB stick. Can somebody point me to a link or some sample code can i do it with C# I am a newbie, so any help appreciated... Thanks
-
- cli::array does not meet constraint 'System::Collections::Generic::IList<T> ^'
by Thinbeast
- 5 Replies
- Last post
by einaros
- I have the following class defined in C#:
Code Snippet
public class A < T , B > where B : class , System . Collections . Generic . IList < T >
{
}
public class B < T > : A < T , T [] >
{
}
but when I use them in C++ CLI
Code Snippet
ref class C
{
public :
void Main ()
-
- Why I can't complie below code in VS2005
by Aiden seo
- 9 Replies
- Last post
by Marius Bancila
- Because of std::swap function, I can't compile below function. but if I don't specify template parameter, it is compiled very well.
I wonder why I can't specify template parameter when I use swap function, but if include <utility> instead of <vector>, I can use std::swap specifing template paramter.
I think it's Microsoft STL library bug..., it is needed to fix it.
#include &l
-
- Interlocked issues
by DPotages
- 10 Replies
- Last post
by DPotages
- Hi, I'm working with Vs2003, targeting multiple
platforms and processors (including multicores). I'd like to replace some of the windows'
CriticalSections used in our code for something faster. As using volatile
(especially with 2003) is not very thread safe (no memory barriers, etc), i went for interlocked
operations. Since the code i was suppose to patch was using something that looks like
-
- Can not alloc memory when vb.NET application use dll written by C++!
by Tran Hoai Phuogn
- 7 Replies
- Last post
by Tran Hoai Phuogn
- HI all, I wrote a dll program in C++ for Pocket PC application (eVC4), in this dll, have line code to allocate memory: pMem = ((void*)calloc(1, iSize)); . When I create application in C++ to use this dll, it is ok! But when I create application in VB.NET to use this dll, sometime (not always) can not calloc memory, that mean pMem = NULL. I guest that this proplem is lack of HEAP, but I am not sure
-
- A reliable screenshot method
by HieiOtaki
- 3 Replies
- Last post
by Big Bill
- Hi there, I am seeking a reliable screenshot method that I can use to copy the contents of my form and export them to an external bitmap. I've tried the Form.DrawtoBitmap() method, but ran into many errors with objects being drawn incorrectly or not at all. The form itself has a few standard controls on it, along with a webBrowser, which I heard does not support Drawtobitmap(). Is there any other
-
- DLL to return a value to a calling function.
by Mapa3matuk
- 3 Replies
- Last post
by Simple Samples
- Hi guyz,
i have created a DLL and a function that calls is , it all works ok. Now i want the DLL to return something back to the calling function. I think i have set DLL to return modified string, but what is the syntaxis in the calling function to get that return valued
For example i pass a string to DLL , DLL modifies the string and then passes modified string back to the calling func
-
- linking error
by Beck.Yang
- 3 Replies
- Last post
by Beck.Yang
- Dear all, when I complie my project that needed to link ddk library, I got linking error below:
Linking... Searching libraries Searching C:\Coreco\Sapera\Lib\corapi.lib: Searching C:\WINDDK\3790.1830\lib\crt\i386\libcmt.lib: Searching C:\WINDDK\3790.1830\lib\crt\i386\libcpmt.lib: Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\kernel32.lib: Searching C:\Progra
-
- Debugger hangs when editing code
by yanivsag
- 28 Replies
- Last post
by yanivsag
- Hi, I've recently upgraded to VS2005 from vc6 and my greatest problem is this: I'm debugging my app (a very large one in terms of modules and lines) and if i try to edit the code when a breakpoint is hit (in order to try edit&continue) visual studio hangs and i keep getting the "visual studio delay notification" in my task bar. Has anyone came up with this matter Any suggestions tha
-
- Any suggestions?
by dellthinker
- 3 Replies
- Last post
by Simple Samples
- Hi all. Im trying to make a function to try to attempt something, but when it fails try "one" more time and then move on to the next thing. So far i've made something that doesnt look close to what i have to do.
Code Snippet
#include <iostream> #include <string> #include <windows.h> using namespace std; int main() { string test="Testing this";
-
- R6031 - Attempt to initialize the CRT more than once
by skeil
- 11 Replies
- Last post
by ron2464
- Hi, when starting my application (built with VS2005), I get the error message "R6031 - Attempt to initialize the CRT more than once. This indicates a bug in your application." The application is native C++, but it links some native and some mixed DLLs. Some mixed DLLs again link native DLLs, see protocol below. The strange thing is that it works on other computers. Also strange is, that
-
- Questions
by idos
- 2 Replies
- Last post
by idos
- Hi, I am trying to work with bit variables so here is what I do class myclass { unsigned int value:16; }; int main() { char ar[1024]; myclass * m; m = (myclass*)ar; m->value = 10; for(int i = 0 ; i < 2 ; i ++) printBits(ar[ i ]); // my own method that print bits of char } But what I get is not 00000000000001010 can someone please tell me why Thank you in advance