|
the word byte comes from By Eight. Meaning they took eight bits together
No hurries, no worries.
|
|
|
|
|
|
ok I stand corrected.
No hurries, no worries.
|
|
|
|
|
you almost had me convinced
Blogless
|
|
|
|
|
And here I thought is was a contraction from the Old English - 'Byte Me!'
|
|
|
|
|
Hi, could somebody help me?
In my C application, I try to communicate with CISCO's devices, such as router, swith. then once the connection is established, I can issue some commands to grab some data from the CISCO's device.
could somebody tell me how can I do this, and if CISCO has the related "API" that I can use ?
thanks a lot
dadsadasd
|
|
|
|
|
asv wrote:
could somebody tell me how can I do this, and if CISCO has the related "API" that I can use ?
Sounds interesting. Never thought of doing this but in order to communicate with a Cisco device you will need to visit Cisco’s web site. As memory serves they use their own variation of SNMP (simple network management protocol) although some of the more general commands should work.
Not much help I know but it (SNMP) gives you a starting point.
-------------------------------
|
|
|
|
|
You could do this with the Telnet protocol.
Blogless
|
|
|
|
|
Okay, didn’t even think of just opening a socket connection to the device to see what it would allow you to do.
Then again do you really want it set up so insecure? I mean telnet is after all clear text over the wire.
Interesting...
-------------------------------
|
|
|
|
|
sfdougl wrote:
Then again do you really want it set up so insecure? I mean telnet is after all clear text over the wire.
Could use SSH or secure telnet, but either way you can use 'show run' and parse the return string to hold all the cisco configuration, then issue "config t" and the parameter is question to set it's appriopiate value. There are web base solutions but all are very crude.
Blogless
|
|
|
|
|
|
hi folks,
here is my problem.
i have a member function of my dialog box called OnEditDateDay() that maps an EditBox Control EN_CHANGE (ON_EN_CHANGE(IDC_DATEDAY_EDIT, OnEditDateDay) ).
when i code the folowing function, it works well under Visual Studio 6, but not perfecty on VS2003.
it returns the cursor (current position where to write in the edit control) at the begining of the edit, each time i reach the 2 characters string length...
here is the code.
void CFactEditorDlg::OnEditDateDay() {
m_peDateDay->GetWindowText(m_strDateDay);
if ((m_strDateDay.GetLength() >= 2) && (m_peDateDay == GetFocus())) {
m_strDateDay = m_strDateDay.Left(2);
m_peDateDay->SetWindowText(m_strDateDay);
m_peDateMonth->SetSel(0, -1);
m_peDateMonth->SetFocus();
}
m_strDateText.Format("%s/%s/%s", m_strDateDay, m_strDateMonth, m_strDateYear);
m_ptDate->SetWindowText(m_strDateText);
}
i really cannot understand why this...
i give up.
any idea or questions ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I am going to guess that is because when when you reach 2 charcters in length you then call SetWindowText on the edit control, which causes OnEditDateDay to be called again.
|
|
|
|
|
so why doesn't it do this under visual C++ 6 ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Blind luck! You are just ASKING for recursion to occur using SetWindowText on an EN_CHANGE message. A different user recently had a post here with a similar problem, and he DID suffer the recursion.
|
|
|
|
|
i'm not sure i understand you.
you mean SetWindowPos() "re-raises" the EN_CHANGE event ?
I thought to something like that already, but as it didn't do it under VC++6...
is it a new feature of MFC 7 ?
is there a way to work around this ?
thanks,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I said the SetWindowText() causes a regeneration of the EN_CHANGE message.
After all, you did CHANGE the text when you made the call to the SetWindowText(), which results in EN_CHANGE, which within you call SetWindowText() which results in EN_CHANGE, within which you call SetWindowText()... and so on and so on and so on....
It was not written to detect if it is the SAME text or not.
|
|
|
|
|
... BUT it worked great on VC++ 6 !!!!!! did you notice that point ???????
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Yes, I did. I am just implying that INHERENTLY your deisng is flawed. You could put in a blocker variable so you don't reenter your own function and that might help. Then you won't be dependent upon the whims of the development platform
|
|
|
|
|
ok blake,
here is the new code :
void CFactEditorDlg::OnEditDateDay() {
static bAlreadyIn = false;
if (!bAlreadyIn) {
bAlreadyIn = true;
m_peDateDay->GetWindowText(m_strDateDay);
if ((m_strDateDay.GetLength() >= 2) && (m_peDateDay == GetFocus())) {
m_strDateDay = m_strDateDay.Left(2);
m_peDateDay->SetWindowText(m_strDateDay);
m_peDateMonth->SetSel(0, -1);
m_peDateMonth->SetFocus();
}
m_strDateText.Format("%s/%s/%s", m_strDateDay, m_strDateMonth, m_strDateYear);
m_ptDate->SetWindowText(m_strDateText);
bAlreadyIn = false;
}
}
it seems to work quite fine now...
but it still don't understand why it behaves like this only under VC++7...
thanks anyway
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi, does anyone know how to use RLC? Can xplain how it is use? Can it be use to compress a DICOM image into a smaller file size? The purpose of reducing the size is to save space. Can it be done? Please help. Thank you.
|
|
|
|
|
|
In VC++ 6.0 in "ResourceView tab->Version" we find four places where version number has to be changed.
1. FILEVERSION
2. PRODUCTVERSION
and
3. FileVersion
4. ProductVersion
Initially the version number in all these four places will be
1,0,0,1. Now our client requirement is to add intermediate version number i.e. fifth digit (e.g. 1,0,0,1, I2).
I am able to add at "FileVersion" and "ProductVersion" but "FILEVERSON" and "PRODUCTVERSION" are not accepting the fifth digit.
Any solution in this regards will be highly appreciated.
Thanks & Regards,
Neeraj
|
|
|
|
|
There are only four defined places for digits.
The one place you can add stuff all day is to the version information that is stored as a string (FileVersion and ProductVersion).
The one that is a number is only treated as the two WORDS of two DWORDS. So you only get four numbers possible for each of FILEVERSION and PRODUCTVERSION.
What you might consider doing, assuming you don't have 'hundreds' of patches and more than 9 service packs, is to use the lower number as a build identifier and then for the third number use the 10's digits as a patch number and the hundreds or thousands place as a service pack indicator.
For example, 7.11.1.3452
would mean product version 7.11, patch 1, build 3452
7.11.201.35
would mean product version 7.11 service pack 2 patch 1 build 35
7.5.434.99
would mean product version 7.5 service pack 4 patch 34 build 99
This works well with version checking tools as well, because all numebrs are constantly increasing.
Some scheme similar to this might help you out.
|
|
|
|
|
Thanks miller.
I would try with the solution you have provided.
thanx again.
Thanks & Regards,
Neeraj
|
|
|
|