|
I have a C++ assembly that contains managed and unmanaged code. I can set breakpoints within the unamanaged functions, but they will not be hit. When I run debugging, full red circle in unmanaged part becomes an empty one and it says "The Breakpoint will currently not be hit. No executable code is associated with this line". Interesting thing is, this code does get executed, because i can see the results. I can debug managed code without any problems. Help?
|
|
|
|
|
In all your projects, set the Debugger Type to Mixed rather than Auto (which is the default setting). Plus, make sure that you generate the debug info for all projects.
|
|
|
|
|
thank you, but problem was in C# gui for that project. If you don't check "enable unmanaged code debugging" there nothing else helps.
greetz
|
|
|
|
|
I understand you have an unmanaged regular C++ DLL that you are using in a C# executable, am I right? If so, try setting the DLL as an active project, and specify the C# exe as a debug executable for that DLL.
Also, don't forget about the working directory if you are accessing data from relative paths.
|
|
|
|
|
No, actually I have a mixed C++ DLL and am using a C# executable. But no worries, I already solved my problem as I wrote earliear.
|
|
|
|
|
hi i want java code for hiding a text in a bmp file. also i want DCT (discrete cosine transform ) to be used for hiding the text in bmp file.
please i want it as soon as possible
hi
|
|
|
|
|
Come on ! this is MS centric site. I doubt , if you could get any answer here. Post this query at appropriate site.
|
|
|
|
|
Hi I want a Porsche 911[^].
please i want it as soon as possible
|
|
|
|
|
hi_prk_bably wrote: i want it as soon as possible
And yet, you're asking on a site with no visible Java forum or other Java support, in the forum with the least readers ( C++/CLI ) ????
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hello,
How can I read a Matlab array of integers in C++ using mexfiles. I found it's easy to read array of doubles with mxGetPr, but I could not find how to do it with integers.
Any help would be appreciates.
Oct.
|
|
|
|
|
You're using C++/CLI with Matlab ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
What I have is a Matlab code, and I am writing some of the subrutines in c++ using mexfiles to speed up the computations. Then you can compile this cpp files and use them in Matlab as any other function.
Mexfiles allow you to write a c++ code and through a so called gateway function just translate the input parameters from Matlab to C++, perform the operations you have to do, and then translate back the output from C++ to Matlab.
My problem is that I cannot find a way to translate an array of integers. Using the mxGetPr function you can translate an array of doubles. I am trying to read as input an array of integers and I cannot find the way.
I am not sure what CLI is.
Oct.
|
|
|
|
|
OK, so you're using VS.NET and C++/CLI ( C++ with .NET ), or are you in the wrong forum ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
I think (though I'm not absolutely sure) that mex DLLs always treat matrices as double type.
BTW, please do not use C++/CLI forum for this issue; use Visual C++ forum instead. I attempted to send you an e-mail, but you have not confirmed your address to CP, so I could not send my reply there. Please make this confirmation.
Also, take a look at a brilliant series of MATLAB articles at CodeProject, many of them written by A.Riazi.
|
|
|
|
|
how to write programe " Auto View CD"
|
|
|
|
|
I have been assigned with C++ project; to develop a software application for converting MP3 files to wave and vice-versa. So I need help regarding the same. I have to develop this project in C/C++.
|
|
|
|
|
Do you have to do it in C++/CLI, or ar eyou in the wrong forum ?
There's plenty of source for mp3 converting on the web, none of it C++/CLI, but much of it, C++
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi there,
My problem is I am using visual 2005 C++ express and try to compile the following source code:-
<br />
Byte b[] = * gcnew Byte[Convert::ToInt32((dr->GetBytes(PictureCol, 0, 0,0, Int32::MaxValue)))];<br />
And it prompt me the following error messages:-
<br />
error C2664: '__int64 System::Data::Common::DbDataReader::GetBytes(int,__int64,cli::array<Type,dimension> ^,int,int)' : cannot convert parameter 3 from 'int' to 'cli::array<Type,dimension> ^'<br />
with<br />
[<br />
Type=unsigned char,<br />
dimension=1<br />
]<br />
No standard conversion exists from the boxed form of the arithmetic type to the target type<br />
error C2440: 'initializing' : cannot convert from 'unsigned char' to 'unsigned char []'<br />
Please help to correct some of the error. Thanks you in advance
-- modified at 11:26 Monday 29th January, 2007
|
|
|
|
|
p_c wrote: error C2664: '__int64 System::Data::Common::DbDataReader::GetBytes(int,__int64,cli::array ^,int,int)' : cannot convert parameter 3 from 'int' to 'cli::array ^'
GetBytes require array<unsigned char>^ buffer as third param.
p_c wrote: error C2440: 'initializing' : cannot convert from 'unsigned char' to 'unsigned char []'
change Byte b[] to Byte b .
|
|
|
|
|
Hi,
i have a mixed mode program (C++/CLR with native code), and i am having the following error while running the program in debug mode. The error is displayed in the Output window. (i'm using Visual C++ 2005).
Although the following error is displayed, the program runs fine. The operation, behaviour of the program is fine in debug and release modes.
The program is a little complicated, it has a main C++/CLI thread (with GUI etc) which calls a native thread which performs some processing using DirectX.
The error is:
First-chance exception at 0x7c812a5b in Scene Configurator.exe: 0x000006EF: A null context handle was passed from the client to the host during a remote procedure call.<br />
First-chance exception at 0x7c812a5b in Scene Configurator.exe: 0x000006A6: The binding handle is invalid.
I am not using any sort of Remote Procedure Call. All i want to know why this error is produced, and how to eliminate it. (Or where to start looking for it)
Another part of the program causes another First-Chance exception, the code is
void Draw_Grid(LPDIRECT3DDEVICE9 g_3Ddevice)<br />
{ <br />
tVector3 vertData[2]; <br />
const float fNear = gVar.GridNear;
const float fFar = gVar.GridFar;
const float fStep= gVar.GridStep;<br />
<br />
for(float i = fNear; i <= fFar; i += fStep)<br />
{
vertData[0] = tVector3(fNear, 0, i); <br />
vertData[0].color = 0xFFD9810E;<br />
vertData[1] = tVector3( fFar, 0, i); <br />
vertData[1].color = 0xFFD9810E; <br />
g_3Ddevice->DrawPrimitiveUP(D3DPT_LINELIST , 1, &vertData, sizeof( vertData[0] ) );<br />
<br />
vertData[0] = tVector3(i, 0,fNear); <br />
vertData[0].color = 0xFFD9810E;<br />
vertData[1] = tVector3(i, 0, fFar); <br />
vertData[1].color = 0xFFD9810E; <br />
g_3Ddevice->DrawPrimitiveUP(D3DPT_LINELIST , 1, &vertData, sizeof( vertData[0] ) );<br />
<br />
}<br />
}
It seems DrawPrimitiveUp is producing an error of First-chance exception at 0x7c812a5b in Scene Configurator.exe: Microsoft C++ exception: long at memory location 0x04a4f808.. but the drawing of grid (the purpose of this code) is fine. Output of grid on the screen is as desired and the program runs fine. Commenting the DrawPrimitiveUp lines removes this error message. Any idea why?
Thanks.
|
|
|
|
|
Hi,
Is there any method in C++ to know the type of exception that occured...like e.getMessage() in Java??
Priya.
|
|
|
|
|
This is the C++/CLI forum. For C++/CLI, the answer is yes. For C++, the answer is no.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I am developing this simple arithmetic program and this is my first windows application ever, so I am not so sure at how to program this. In my app the user can set the lower limit and upper limit for the calculations numbers that are about to come up in a test the user want’s to do. You se the upper and lower limit as variables in the code below. The code below generates calculations for addition, subtraction and multiplication. So let us suppose that the user sets the limits to lower = 1 and upper = 100, that will give us 100 x 100 = 10 000 calculations! When I test this on my own computer it takes a while to generate all calculations, and if I change upper limit = 200 the program stops I push (ctrl+alt+del) and it says that the application is not responding.
// Generating all Calculations for addition, subtraction and multiplication
for(int i = lowerLimit; i <= upperLimit; i++)
{
for(int j = lowerLimit; j <= upperLimit; j++)
{
// Reset flag
excludeCalculation = false;
// Create temp Calculation
tempCalculation = gcnew Calculation(i, calculationOperator, j);
// Check if Calculation should be removed
excludeCalculation = this->removeCalculation(tempCalculation);
// Check if to add Calculation
if(excludeCalculation == false) // If NOT to be excluded
{
calculations->Add(tempCalculation);
}
}
}
How do I prevent the application from stopping like this??
I would like to show a progressbar while the application is generating the calculations, but I don’t know how to do this when the application get hung up by it self all the time, I can not figure out how to work around this problem.
Does anybody have any tips???
I am not so familiar with using Threads, but is this one of these occasions when I should be using Threads???
If so, can someone give me an example of how to program with treads?? And how do I pass data between threads?… I have to know how many calculations is generated for my progressbar… or??
I am a complete newbe on this… so all help is appreciated!!
Best regards, Andreas
|
|
|
|
|
AAsterlund wrote: I am a complete newbe
What made you choose C++/CLI ? C# or proper C++ seem like better places to start, to me.
Have you set a breakpoint to step through and work out where your program is getting stuck ? You can also choose "break all" from the debug menu while running in debug mode, and the code will stop where it's stuck.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Christian Graus wrote: What made you choose C++/CLI ? C# or proper C++ seem like better places to start, to me.
Have you set a breakpoint to step through and work out where your program is getting stuck ? You can also choose "break all" from the debug menu while running in debug mode, and the code will stop where it's stuck.
First of all I want to say that I am NOT a professional programer that develops applications on a day to day basis. And I am NOT a master in Visual C++ either (and I am not used to work with the debugger, but I like to learn it some time when I got som time left over for it). Programming is only a hobby of mine that I like to practise only on my spare time. I like the fact that one could develop applications, that can be used to ease the burden in various occasions in life.
In the past I have had 1-2 months of education in native C++ (that is developing in a dos environment and not using any development tool, only notepad). Later I wanted to develop some windows application and I needed a development tool and I chose Microsoft Visual Studio 2005. And it felt natural for me to go from native C++ to C++/CLI. I mean I knew a little C++ and managed C++ seemed to me to be a good technology, so I went with that!
And yes I am a complete newbe on thread-programming... I have never had to use it before.
So instead of moralizing about what is the right place or not for me to start developing my little interest in programming, it would be a lot more helpful and less timeconsuming for both me and you if you just could give me answers to my questions! I am not asking for you or anybody else to write my program for me, that I want to do on my own. I just need help, tips or derections on how to proceed from here.
As you maybe have noticed I am not used to the debugger due to the small complexity of my applications. Maybe it is foolish of me not to use it, but if I got more time left over I would try to learn it. It seems to be a good help in development, but that is not the question here I think.
I put a messagebox before and after this particular code snippet and only the one before showed up before the application got hung up. The one after showed up only after I had removed the the loops from the code. So I think I am fairly sure that this is where my program is getting stuck, don't you think??
I think I must run the code in another thread and I was thinking about showing a dialog with a progressbar on how many calculations is left to generate before the test dialog is shown. Should I run the dialog with the progressbar in the same thread as the one I am generating calculations in??
I am little confused about how to think here...
best regards, Andreas
|
|
|
|
|