|
Abinash Mohanty wrote: Its working well in Debug mode but it fails in Release mode.Can anybody please tell me how to make it run successfully in Release mode or any other way to implement scsi commands?
Highly unlikely since you've failed to isolate and describe the problem. At a minimum, I suggest reading here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Abinash Mohanty wrote: Its working well in Debug mode but it fails in Release mod
This type of thing is very common and has even happened to me a few times. It may be an uninitialized local variable being initialized to 0xccccccc and works great in Debug mode. In Release mode perhaps a check for NULL may be the cause of the problem. There are many other reasons why this could be occuring. You should probably begin by reading the article by Dr. Newcomer.
Surviving the Release Version[^]
You could also spy on the SCSI bus and check if your commands are reaching the target.
Good Luck,
-David Delaune
|
|
|
|
|
1. Check the C++ head file include path are there in Project Property Setting.
2. Check the *.lib file added in Project Property Setting.
3. Clean the Build first.
4. Rebuild full project again.
|
|
|
|
|
1. Check the header file path included are there in Project Property Setting.
2. Check the *.lib and *.dll files added in Project Property Setting.
3. Clean the Build first.
4. Rebuild full project again.
Regards
GS
|
|
|
|
|
my program is the following
int m_nCurFrame;// extract the current frame from avi file
int m_nMax; //total frames in the avi file
BOOL bb;
CXXView::CXXView
{
bb = FALSE;
}
void CXXView::OnAutoProcessing()// this is a message handler from a menu button
{
while (m_nCurFrame++<m_nmax)
{
if(bb)=""
{=""
break;=""
}=""
.......="" procesing=""
~cxxview::cxxview=""
bb="TRUE;"
when="" i="" exit="" this="" program,="" the="" program="" always="" enter="" ~cxxview,="" then="" onautoprocessing(),="" because="" object="" is="" dead,="" so="" wrong,but="" want="" to="" entoirly,can="" you="" give="" me="" some="" advices?;
=""
how="" can="" call="" onautoprocessing="" before="" view's="" destructor="" called.=""
<div="" class="ForumSig">In near day,I want to change the TITLEBARINFO of my Program?
My code is following:
#include "winuser.h"
...........
...........
TITLEBARINFO bti;
bti.cbSize = sizeof(TITLBARINFO);
GetTitleBarInfo(GetParent()->m_hWnd,&bti);
But i can't compile these codes,can you tell me how to do?
My program is developed by VC++6.0 under Winxp.
|
|
|
|
|
|
BTW, you already asked the question yesterday[^] and people asked you the same question as I did. So, if you don't want to answer questions that people ask you, then don't expect a valid answer because your question doesn't make a lot of sense...
And, what is your signature for ? You've put a question in your signature ?
|
|
|
|
|
I smell some sort of mistake with the coding.
Well ur information is too little to get the overview.
Величие не Бога может быть недооценена.
|
|
|
|
|
As Cedric said - you asked this exact same question yesterday.
I replied to it already, asking for specific extra information: http://www.codeproject.com/Messages/3178744/Re-how-can-i-exit-the-program-entirely.aspx[^]
1/ You didn't work out that maybe you should give that information if you want help.
2/ You emailed me directly with the original question (which I don't actually mind), and didn't even give the answer(s) to my questions.
I can see it now...
Patient 31219: "Dr, I am ill, please help."
Dr Iain: "I will be happy to help, Patient 31219. Please tell me something about your symptoms."
Patient 31219: Silence.
Next day:
Patient 31219: "Dr, I am ill, please help."
Dr Cedric: "I will be happy to help, Patient 31219. Please tell me something about your symptoms. Oh, didn't you see my colleague yesterday"
Patient 31219: Silence.
The next day:
Miss 31220: "Please, can you take my boyfriends body away. He died in his sleep, silently. He would have been my husband, but when I broke with chauvinistic convention and asked him to marry me, he never actually replied..."
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
I've never understood the people who ask the same thing every day, expecting a different answer each time.
There's another repost two threads below, where the OP wants a string with its length being 72K+ to be passed in as a command line arugment.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Thats really sad, that they dont read the msdn for any API since in the later discussed case, the maximum is only 32 k.
Величие не Бога может быть недооценена.
|
|
|
|
|
I saw that! Yikes...
Assuming it's possible, Program A has to make a parsable mile long command line, and Program B has to parse it...
The alternative of using a file is not only possible, it's *easier*. Some people get fixated on a route between two places, that even when a better route to the same destination is shown, they keep walking into the same brick wall.
What's the phrase? "When all you have is a hammer, everything looks like a nail."
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Rajesh R Subramanian wrote: I've never understood the people who ask the same thing every day, expecting a different answer each time.
Wasn't it Einstein that said insanity is doing the same thing over and over again and expecting different results.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Iain Clarke, Warrior Programmer wrote: Patient 31219: ...
Dr Iain: ...
Patient 31219: Silence.
Next day:
Patient 31219: "Dr, I am ill, please help."
Dr Cedric: ...
...
The next day:
Miss 31220: "Please, can you take my boyfriends body away. He died ..."
You sir are implying that...
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I just looked, and http://www.codeproject.com/script/Membership/View.aspx?mid=31220[^] is nice and anonymous too.
He/she won't be taking offense.
Maybe he just kept saying "Please go out with me" every day, until she gave in and said yes.
Iain.
Hmm, maybe you're implying that I'm implying they're related!
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Could you please stop sending private e-mails repeating exactly the same thing as the question you asked on the forum ? Is it so difficult to answer the questions that people ask you instead of repeating the same thing over and over again ?
|
|
|
|
|
Hi All
I tried hash Look up logic in C.I got unique hash value, but my look up table have only 5000 records so i need to reduce my hash value.
logic
h=h<<5+h+c
h=default value 3.
c=input character ascii value.
For Ex:
Input :Jon
Output:227018.
currently am getting hash value in billion or million.I want my hash value with in 5000.
I tried Mod function too..But it is giving duplicate value.So plz gimme solution for this....
Note:Input is string and output is number(for hash value).
Thanks,
Mohan.T
Mohan t working for N.I.C
|
|
|
|
|
CRC 8 bit.
Величие не Бога может быть недооценена.
|
|
|
|
|
Am not getting..Plz gimme some more details
Thanx
Mohan t working for N.I.C
|
|
|
|
|
CRC is a non secured hashing function and it is widely used one.
For 5000 i think CRC 12 or CRC 13 as per ur need.
Just refer the below link
http://en.wikipedia.org/wiki/Cyclic_redundancy_check[^]
i am giving and example of for CRC 16 given below
const WORD CRC16BIT_TAB[8] =
{
0x0000, 0xCC01, 0xD801, 0x1400,
0xF001, 0x3C00, 0x2800, 0xE401,
};
unsigned int CRC16( const BYTE* pBuffer, const int nLength )
{
unsigned int ulCRCRet = 0;
unsigned int ulTempVal = 0;
int nIndex = 0;
for(nIndex = 0; nIndex < nLength; nIndex++, pBuffer++)
{
// lower 4 bits
ulTempVal = CRC16BIT_TAB[ulCRCRet & 0x000F];
ulCRCRet = (ulCRCRet >> 4) & 0x0FFF;
ulCRCRet = ulCRCRet ^ ulTempVal ^ CRC16BIT_TAB[*pBuffer & 0x000F];
// Upper 4 bits
ulTempVal = CRC16BIT_TAB[ulCRCRet & 0x000F];
ulCRCRet = (ulCRCRet >> 4) & 0x0FFF;
ulCRCRet = ulCRCRet ^ ulTempVal ^ CRC16BIT_TAB[(*pBuffer >> 4) & 0x000F];
}
return ulCRCRet;
}
int main(int argc, char* argv[])
{
BYTE data[] = { 'A', 'D', 'E', 'R', 'T', 'W', 'i', 'E', 'Y', 't' ,'h', 'e', 'm', 'r', 'T'};
unsigned short int ulCRCVal = 0;
ulCRCVal = CRC16(data, sizeof(data) / sizeof(data[0]));
std::cout << ulCRCVal << ::std::endl;
return 1;
}
Величие не Бога может быть недооценена.
modified on Tuesday, September 1, 2009 2:39 AM
|
|
|
|
|
I'm guessing you want a minimal perfect hash function[^]...
There's a tool[^] that will calculate perfect hash functions for you given a list of keys.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks for ur reply..
Can u send me the tool link....
Mohan t working for N.I.C
|
|
|
|
|
The tool link[^] was in my reply - just like it's in this one...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
"I tried Mod function too..But it is giving duplicate value.So plz gimme solution for this...."
I think I see your problem. Hash functions typically WILL give duplicate values. This is called a collision. There are various ways of dealing with collisions.
The simplest is to simply go to the next-highest slot (mod 5000), and store your value there. When you're looking up a value, and the desired value isn't at the hash location, you go to the next slot because it probably collided with another value already at the hash location.
You keep going to the next slot until you either find the desired value, or you hit an empty slot, which means the value isn't in the hash table.
|
|
|
|