|
NDA = Non Disclosure Agreement - something in general saying that if they tell you something, you're not allowed to tell it someone else, except written permisson...
OK, let's rock it!
To make things easy I would try to send the first 368 byte packet and see what's on. If the camera makes what it should, we're on the safe side, else it means that the protocol between needs deeper analysis.
What I do usually is to try to send the same command under exactly the same conditions and then analysing the content of the data flow if there are some changes. If the nature of protocol alows it, I'm usually focusing on one command and continue with another commands in a moment, when the first one works.
During that I usually makes a notes regarding what byte/string on which position mean - or what I think it can mean. This includes command bytes, parameters, checksums, sequence numbers, timestamps and other parts usually used in protocols. For that you need to catch the same command (move left for example) several times under the same conditions (camera position etc) that you can compare the content of the packet - what changes and when.
This makes a some homemade protocol description, that I can use later for constructing my own packets or whole communication.
|
|
|
|
|
Yes geo,
I will try it and get back to U.
Satya
|
|
|
|
|
Just started having to use C++ again after quite a bit of time of using Visual Basic, and going back is quite a pain.
I'm needing to zero-pad some hex output that my program spits out... problem is, I don't have a clue how to do it without using loops. Is there a simple way to zero-pad all information outputted by printf, or not?
|
|
|
|
|
|
Yep, that did it. Thanks a lot for the quick reply.
|
|
|
|
|
Hello all,
I would like to know how can I check whether the folder is exist or not? Which function should I use in visual C++? and which library should I included into my program?
Thanks!
Nachi
|
|
|
|
|
try using chdir function.
i.e., set the current directory to the required folder. if it fails then the folder does not exist (or atlease unusable)
|
|
|
|
|
_access() can Determine file-access permission.
Return Value
Each of these functions returns 0 if the file has the given mode. The function returns –1 if the named file does not exist or is not accessible in the given mode; in this case, errno is set as follows:
EACCES
Access denied: file’s permission setting does not allow specified access.
ENOENT
Filename or path not found.
Thinking in difference!
|
|
|
|
|
I like using _access() myself, but GetFileAttributes() is also available.
|
|
|
|
|
how to use WINDOWINFO ,I can not use it.
|
|
|
|
|
china_nn wrote:
I can not use it.
Because why? Are you receiving compiler, linker, or run-time errors? How about a small code snippet of what you have that is not working.
WINDOWINFO wi;<br />
GetWindowInfo(handle_to_some_window, &wi);
|
|
|
|
|
i want to synchronize the keyboard input of two windows.that is ,
i have two windows(window1 and window2).window1 is the top window on the desktop,window2 is behind window1. there is a edit control on both windows.
when i input char in the edit of window1.i want window2 change with window1.juse like i both input char in edit of window2.
the function AttachThreadInput seems to resolve my problem, but it does not work as i expected.
anyone can tell me other solutions.
here i should tell that window1 and window2 are in deffrent processes.window2 is an existent third-party program. i can do nothing about it.all i can do is in window1.
gucy
|
|
|
|
|
What about using some API calls to find the hWnd of the textbox in Window2. Take a look at:
- FindWindow
- GetDlgItem
Use it somewhat as follows:
HWND hMainWindow = FindWindow("[ClassName of main window]", NULL);
if(hMainWindow != NULL)
{
HWND hTextbox = GetDlgItem(hMainWindow, [ID of the textbox]);
...
}
You can find out the classname of the main window and the ID of the textbox using Greatis Windowse (google on it, I don't have the link just like that).
Once you figured out the hWnd of the textbox, you can use SetWindowText or a SendMessage WM_SETTEXT to put the text in the box in dialog 2.
Another option might be SetDlgItemText, but then you can't check the hTextBox hWnd to be valid or not before sending.
Good luck!
- Fahr
|
|
|
|
|
i want to synchronize the keyboard input of two windows.that is ,
i have two windows(window1 and window2).window1 is the top window on the desktop,window2 is behind window1. there is a edit control on both windows.
when i input char in the edit of window1.i want window2 change with window1.juse like i both input char in edit of window2.
the function AttachThreadInput seems to resolve my problem, but it does not work as i expected.
anyone can tell me other solutions.
here i should tell that window1 and window2 are in deffrent processes.window2 is an existent third-party program. i can do nothing about it.all i can do is in window1.
gucy
|
|
|
|
|
I download a software from:http://www.dachshundsoftware.com/download.html
It can defrag the Memory. How does it work?
Let's roll!
|
|
|
|
|
Eastdragon wrote:
How does it work?
By the simple and yet magical principle of snake oil.
Translation: It does not work.
|
|
|
|
|
But I used Windows Task Manager, I found the available Physical Memory really increased after Hare's defrag.
Why?
Let's roll!
|
|
|
|
|
what I know, some of these software tries to allocate a big blob of memory forcing windows manager to swap unused or less used memory pages to the swap file, which should teoretically make more physical space for the more active applications.
|
|
|
|
|
I have overriden the OnPaint function and I am using InvalidateRect to do some custom work in a section of the dialog. Is there any way to create the dialog so I have control over OnEraseBackground (there is none in the Class Construction - as far as I can tell) and can prevent the flicker. I know about double-buffering and I am basicly doing that but I am still getting a noticable flicker - I think because I cannot control the erase procedure. Thanks for any information.
|
|
|
|
|
|
Thanks for trying - but there is no WM_ERASEBKGND handler listed in the Class Editor - So I am guessing it will not operate properly without some extra work. OnEraseBkgnd is present in CWnd, CDialog base class, so it is a possibility.
|
|
|
|
|
You can add it yourself. In the class editor change the filter to Window and WM_ERASEBKGND will be in the list. I just tryied it with a blank dialog app, set a breakpoint in the OnEraseBkgnd() handler and it got there with no problem.
John
|
|
|
|
|
Hi i have a dialog box where i have enabled the scroll bars by using the horizontal and vertical scroll bar check boxes in the dialog properties box
my question is how do actualy get the scroll bars so i can control them etc
thanks
|
|
|
|
|
Hi,
I have enabled editing of the labels on the tree control and I want to see what user has edited in the label in the
OnEndlabeleditTree () function, so that I can either commit the change or, reject the change.
what should I use the check the user input in the label?
code:
void CGeneratorView::OnEndlabeleditTree(NMHDR* pNMHDR, LRESULT* pResult)
{
TV_DISPINFO* pTVDispInfo = (TV_DISPINFO*)pNMHDR;
HTREEITEM hItem = pTVDispInfo->item.hItem;
if () //check edited text ?????????????????????????????
{
*pResult = TRUE;
}
else
{
*pResult = FALSE;
}
}
|
|
|
|
|
pTVDispInfo->item.pszText has the text, but if the user canceled the editing then it will be NULL. So you might do something like:
<br />
LPCTSTR lpszText = pTVDispInfo->item.pszText;<br />
if (lpszText != NULL && IsValidText(lpszText))<br />
{<br />
*pResult = TRUE;<br />
}<br />
else<br />
{<br />
*pResult = FALSE;<br />
}<br />
where IsValidText is some function you write to check the edited text.
|
|
|
|