Click here to Skip to main content
15,901,001 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionManaged code calling unmanaged code often fails(locks) Pin
Like2Byte8-Feb-07 10:34
Like2Byte8-Feb-07 10:34 
AnswerRe: Managed code calling unmanaged code often fails(locks) Pin
led mike8-Feb-07 11:38
led mike8-Feb-07 11:38 
GeneralRe: Managed code calling unmanaged code often fails(locks) Pin
Like2Byte8-Feb-07 12:06
Like2Byte8-Feb-07 12:06 
QuestionProperty Declaration: Make A List? Pin
W Balboos, GHB8-Feb-07 6:12
W Balboos, GHB8-Feb-07 6:12 
QuestionAssigning data to a specific instance of a form. Pin
MAW307-Feb-07 20:16
MAW307-Feb-07 20:16 
AnswerRe: Assigning data to a specific instance of a form. Pin
Christian Graus7-Feb-07 21:22
protectorChristian Graus7-Feb-07 21:22 
GeneralRe: Assigning data to a specific instance of a form. Pin
MAW308-Feb-07 13:56
MAW308-Feb-07 13:56 
QuestionIs this normal or is there a bug?? Pin
zoleero7-Feb-07 11:24
zoleero7-Feb-07 11:24 
I have been using the debugger for a while now, but that did not help me much. I tested the code below:

double endTime = 0.0;
System::DateTime startTime = System::DateTime::Now;
int lower = -1000;
int upper = 1000;
int totalNumberOfCalculations = (upper-(lower-1))*(upper-(lower-1));
array<Calculation^>^ calculations = gcnew array<Calculation^>(totalNumberOfCalculations);
int i = lower;
int j = lower;
int arrayIndex = 0;
while(i <= upper)
{
while(j <= upper)
{
calculations[arrayIndex] = gcnew Calculation(i, Calculation::SUBTRACTION, j);
arrayIndex++;
j++;
}
j=lower;
i++;
}
System::TimeSpan elapsedTime = System::DateTime::Now - startTime;
endTime = elapsedTime.TotalSeconds;
double newEndTime = endTime;

First a question about the code and debugger: I put breakpoints at the start and end of this code. And then I put a watch on the variable endTime to se the time it took to run the code. The problem is that the variable had the value of 0.0000000000 until i added the final row of code "double newEndTime = endTime;". Why is that?? Do I have to use a variable's value to se the value??

I tested the above code and it took about 1.5 seconds to run on my computer. When I changed the lower and upper values to -5000 and 5000 the computer got hung up. And when I changed the lower and upper values to -10000 and 10000 I got this message:

"An unhandled exception of type 'System.OutOfMemoryException' occurred"

Does this mean that my computer can not generate all calculations between -10000 and 10000 (like: 10000 - 7893, -8512 - 2113, 9875 - 3213 and so on...)??

I would have hoped for my application to being able to generate calculations up to at least 100 000 and maybe up to 1 000 000.

If it is to any help for you, my computer specifications are:

AMD Athlon XP 2200+ 1.80 GHz
512 MB RAM


Under given circumstances; is my computer to slow or is there a bug in my code??

best regards, Andreas
QuestionAccessing USB webcam from c++ Pin
MrVanx7-Feb-07 8:32
MrVanx7-Feb-07 8:32 
AnswerRe: Accessing USB webcam from c++ Pin
Mark Salsbery7-Feb-07 10:09
Mark Salsbery7-Feb-07 10:09 
AnswerRe: Accessing USB webcam from c++ Pin
Like2Byte9-Feb-07 2:44
Like2Byte9-Feb-07 2:44 
GeneralRe: Accessing USB webcam from c++ Pin
MrVanx11-Feb-07 7:44
MrVanx11-Feb-07 7:44 
Questioncpu usage per thread Pin
yoaz6-Feb-07 23:26
yoaz6-Feb-07 23:26 
QuestionMersenne twister Pin
zoleero6-Feb-07 14:53
zoleero6-Feb-07 14:53 
AnswerRe: Mersenne twister Pin
User 5838526-Feb-07 15:52
User 5838526-Feb-07 15:52 
AnswerRe: Mersenne twister Pin
Mark Salsbery6-Feb-07 16:21
Mark Salsbery6-Feb-07 16:21 
Questionnew Operator in .dll Pin
W Balboos, GHB6-Feb-07 8:33
W Balboos, GHB6-Feb-07 8:33 
QuestionConfiguration File Pin
priyank_ldce6-Feb-07 3:06
priyank_ldce6-Feb-07 3:06 
AnswerRe: Configuration File Pin
prasad_som7-Feb-07 20:26
prasad_som7-Feb-07 20:26 
Question.pdb files in release build Pin
bankai1235-Feb-07 17:56
bankai1235-Feb-07 17:56 
AnswerRe: .pdb files in release build Pin
bsaksida5-Feb-07 20:44
bsaksida5-Feb-07 20:44 
AnswerRe: .pdb files in release build Pin
Bartosz Bien6-Feb-07 4:43
Bartosz Bien6-Feb-07 4:43 
GeneralRe: .pdb files in release build Pin
bankai1236-Feb-07 12:05
bankai1236-Feb-07 12:05 
QuestionOracleDataReader undeclared identifier error Pin
Reveille5-Feb-07 14:59
Reveille5-Feb-07 14:59 
AnswerRe: OracleDataReader undeclared identifier error Pin
User 5838525-Feb-07 15:41
User 5838525-Feb-07 15:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.