|
In our project after fixing an issue or enhancement , it works well in DEBUG mode.But it doesnt work in RELEASE mode.We work on VC6.0 and COM.
I couldnt understand why it doesnt work in Release mode.So Strange!
What could be the possible reasons ?
Awaiting your replies,
Anandi VC.
|
|
|
|
|
Classic issue, classic article .
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
[My articles]
|
|
|
|
|
And how many time a day do you get to use that?
led mike
|
|
|
|
|
More than drugz.
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
[My articles]
|
|
|
|
|
Thanks for the informative article!
Anandi VC
|
|
|
|
|
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
[My articles]
|
|
|
|
|
I have to enable DHCP using win32API i.e. I have to get connected to it,then obtain IP address and then get release from DHCP.does anyone know how to accomplish this in vc++.
|
|
|
|
|
|
The DHCP API[^] may help.
The IP Helper API[^] has some functions that use DHCP
You can always use the protocol[^] directly through sockets.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I use _countof, but could pass the compilation.
And I search the MSDN, found just included in the <stdlib.h>, and I #include <stdlib.h>,
but still could not pass the compilation, please unlock my mind!
Many thanks.
|
|
|
|
|
Can you show us your code?
|
|
|
|
|
What header file did you include?
Could you please post your code?
Does your system satisfy the requirements stated by the documentation?
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
[My articles]
|
|
|
|
|
BTW which version of VS/.NET framework do you use. AFAIK this function is available in VS2005/.NET framework (2.0) and above
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: BTW which version of VS/.NET framework do you use. AFAIK this function is available in VS2005/.NET framework (2.0) and above
.NET framework has nothing to do with this issue.
|
|
|
|
|
I have encountered the same problem like yours and the IDE is visual C++ 6.0 , the system is sp3
|
|
|
|
|
Are you sure it's not something simple like:
#define _countof(arr) (sizeof(arr)/sizeof(arr[0]))
"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
|
|
|
|
|
Sorry for not telling clearly what platform I'm using!
I use VC6.0 and xp sp2,
I don't know why _countof undeclared. I substitude the code '_countof' using (sizeof(arr)/sizeof(arr[0])).
But I still want to know why _countof not working?
|
|
|
|
|
fantasy1215 wrote: ...not working?
Which means what exactly?
"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
|
|
|
|
|
_countof not working.
In all the places using _countof, I substitute as sizeof(arr)/sizeof(arr[0]).
sizeof(arr)/sizeof(arr[0]) of course works.^_^
|
|
|
|
|
fantasy1215 wrote: _countof not working.
Are you going to show how you are using it?
"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
|
|
|
|
|
DavidCrow wrote: Are you going to show how you are using it?
What happened to your telescope and CPMRU?
|
|
|
|
|
TCHAR szstrFileBuf[MAX_PATH + 1024] = {0};
TCHAR szstrFileNameBuf[280] = {0};
OPENFILENAME openfn;
::ZeroMemory(&openfn, sizeof(openfn));
openfn.lStructSize = sizeof(openfn);
openfn.hwndOwner = this->GetSafeHwnd();
openfn.lpstrFilter = _T("win files(*.win)\0*.win\0all files\0*.*\0\0");
openfn.nFilterIndex = 1;
openfn.lpstrFile = szstrFileBuf;
openfn.nMaxFile = _countof(szstrFileBuf); //undeclared identify
//openfn.nMaxFile = sizeof(szstrFileBuf) / sizeof(szstrFileBuf[0]); //instead i use this
openfn.lpstrFileTitle = szstrFileNameBuf;
openfn.nMaxFileTitle = 270;
|
|
|
|
|
fantasy1215 wrote: openfn.nMaxFile = _countof(szstrFileBuf); //undeclared identify
Did you define it like I suggested?
"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
|
|
|
|
|
|
dear all
my question is after i debug, pc showed me: one or more breakpoints can't be set and have been disabled.execution will be stopped at the beginning of the program. how can i solve this problem. thanks a lot.
gentleguy
|
|
|
|