|
Probably you have to add an option similar to
/I "C:\gecko-sdk\include" for the folder containing stddef.h .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
"make" cannot find the path for stddef.h, standard VS includes
You may go for trying make file project,
Or try setting the environment variables for Visual Studio Tools,
I don't know its path, in vs2005 it is vsvar32.bat, execute it before make in the command line
see this, [Building a C/C++ Program on the Command Line^]
modified on Thursday, May 8, 2008 10:39 AM
|
|
|
|
|
|
Thanks for your help.
I got it working with this:
# build the XPCOM component
make:
cl /Od /c /I "$(GECKOSDK)\include" /I "$(MSVC)\include" /D "$(PPDEFS)" \
/Gm /ZI /EHsc /MDd /Fo"Debug\\" /W3 /nologo /TP $(SOURCES)
link /OUT:"Debug\$(COMPONENT).dll" /NOLOGO \
/LIBPATH:"$(GECKOSDK)\lib" /LIBPATH:"$(MSVC)\lib" /LIBPATH:"$(WINSDK)\Lib" \
/DLL /MANIFEST /DEBUG /SUBSYSTEM:WINDOWS /MACHINE:X86 \
Debug\$(COMPONENT).obj Debug\$(COMPONENT)Module.obj $(LIBS)
|
|
|
|
|
in a dialog box ,there will be minimize,maximize,close buttons at the right-top end of the window.
if i click on close button , how to capture it ?
thanks in advance,
Anandi VC
|
|
|
|
|
WM_SYSCOMMAND / OnSysCommand / (eg)SC_CLOSE should do the trick, though I think in CDialog it ends up calling OnCancel, so you have less work to do - please verify for yourself.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
Thank u
|
|
|
|
|
Anandi.VC wrote: if i click on close button , how to capture it ?
The framework calls OnSysCommand(0xf060) , OnClose() , and OnCancel() , in that order.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thank u David .
Anandi VC
|
|
|
|
|
i checked it and it is calling all the three functions you menctioned but in the following order :
1) OnClose()
2) OnCancel()
3) OnSysCommand()
Thank u ,
Anandi VC
|
|
|
|
|
First-chance exception in DWB.exe (OLEAUT32.DLL): 0xC0000005: Access Violation.
Could any one tell me the meaning of the above sentence ?
i got this exception while working on VC6 and COM components.
thanks in advance,
Anandi VC
|
|
|
|
|
Anandi.VC wrote: Could any one tell me the meaning of the above sentence ?
You did something wrong within your program. That's about all we can say about it. But I know somebody who can help you much more than us, he is called Mr. Debugger
Joke aside, if you want to have more information about the problem, use your debugger: step into your program around the code which causes the problem, check the call stack, verify the different variables...
|
|
|
|
|
Cedric Moonen wrote: he is called Mr. Debugger
lol ....
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Invalid memory access. (buggy pointer?)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Anandi.VC wrote: First-chance exception in DWB.exe (OLEAUT32.DLL): 0xC0000005: Access Violation.
Could any one tell me the meaning of the above sentence ?
can be invalid pointer access. and what is First-Chance exception? When Exception Occurs debugger get notified and this first pass is called "First-Chance Exception", the debugger can then decide to pass to application to run normally if the exception was not handled by the application then the debugger gets notified again and is "second-chance exception" where the application must crash.
[First and second chance exception handling^]
Several cases the first chance exceptions don’t necessarily need to be dangerous and does not mean application's code is not proper.
for instance the following code causes first chance exception message to be written in output window
try
{
throw 100;
}
catch (...)
{
cout << "exception";
}
try
{
int *ptr = (int *)0x01;
*ptr = 1000;
}
catch (...)
{
cout << "exception";
}
but the application handled the exception, so you don't get second chance exception.
This may not be a buggy code, but if it is buggy you cannot find the exact position of exception as the default settings of the debugger won't break execution at first-chance exception, you can enable the debugger to break at First -chance Exception so that you can get the exact position. say in VS2005, "Debug->Exceptions: then check mark exception in the list". I don't remember in VS6.0 (its time to throw these old stuff dude )
modified on Thursday, May 8, 2008 11:05 AM
|
|
|
|
|
Rajkumar R wrote: try // SEH is enabled
{
int *ptr = (int *)0x01;
*ptr = 1000;
}
catch (...)
{
cout << "exception";
}
This construct is non-standard. The C++ standard states that catch can only catch exceptions explicitly thrown via the throw keyword. Microsoft got it wrong but later added the /EH[^] switch to select the old non-standard behaviour or the behaviour mandated by the C++ standard.
Steve
|
|
|
|
|
Yes steve, you are correct that's "Microsoft specific" .
5! for the description for what i mentioned by the comment // SEH is enabled.
|
|
|
|
|
Thank u very much for your clear explanation.
i would love to switch to the latest version of VC but my work place wont permit it !
|
|
|
|
|
Hi all,
I have a buffer that starts with a couple of null characters before the actual data starts, and I'm trying to copy the contents of the buffer to another buffer, without any success. I know memcpy will work but it will also wipe the data that is already in the buffer. What can I do to copy the contents of the buffer to the other buffer ??
Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: I know memcpy will work but it will also wipe the data that is already in the buffer.
What do you mean by that ? It will only make a copy of what is in the orignal buffer without modifying it.
|
|
|
|
|
OK, consider the following:
#include <stdio.h>
#include <string.h>
int main ()
{
char str1[]="Sample string";
char str2[]="Another string";
memcpy (str2,str1,strlen(str1)+1);
printf ("Contents of buffer2:",str2);
return 0;
}
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
What do you need to do? Do you need to concatenate buffers?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I don't see what you mean because your first explanation was a bit confusing. Of course that memcpy will erase what is in str2 because you want to copy the contents of str1 into str2. Which behavior are you looking for ? Your str2 can't hold its previous value and the new value.
I'm very confused as to what you are trying to achieve here
|
|
|
|
|
Programm3r wrote: char str1[]="Sample string"; char str2[]="Another string"; memcpy (str2,str1,strlen(str1)+1);
don't you haven't heard about pointer arithmetic.
memcpy (str2 + strlen(str2), str1, strlen(str1)+1); provided destination buffer has enough space.
anyway for string concatenation you don't need this if its raw buffer.
memcpy (byDestBuffer + dwCntDataInDestBuffer,
bySrcBuffer, dwCntDataInSrcBuffer);
dwCntDataInDestBuffer += dwCntDataInSrcBuffer;
|
|
|
|
|
guess not ....
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|