|
I have to develop an application that sends a serial packet
with a period 20 millisec.
Does WindowsNT support this performance ???
If I develop a specific driver, can I reach my target, or
20 millisec is to short also for a driver ?
Are there some solutions to have a Real Time-like performance
in WinNT ??
Thanks a lot !!!
|
|
|
|
|
[edit] See WiB's message for information on how to do this using Windows NT. It requires Windows itself to be modified, so with standard Windows it's still not possible [/edit]
Anonymous wrote:
Does WindowsNT support this performance ???
That's not an easy question. If your 20ms period must be exact, or else you get errors, then the answer is "no", Windows NT is not that accurate in its scheduling.
If the 20ms period is an average, then the answer is "maybe". A lot depends on the system load, and the other applications that are running. If this is a one-off system, then you might be able to measure the exact performance of the system, but Windows is inherently unstable and may do funny things at any time.
It may be better to use a cheap PC running Linux to handle the packet transmission, hooked up to a standard Windows PC running your application as a front-end only.
Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Anonymous wrote:
Are there some solutions to have a Real Time-like performance
in WinNT ??
you can use RTX - real-time extention for Windows NT core from Venturcom
|
|
|
|
|
Hi all,
I want to trap keys through A to Z I am using VK_A to VK_Z. but it does not recognize it at all..
is there any other way of doing it..
Please I need to do it..Any help and pointers are thoroughly appreciated..
Thanks in advance..
Himanshu
|
|
|
|
|
Not clear from where u want to trap the keys. if it is from ur app dialog just use ON_WM_KEYDOWN - OnKeyDown msg handler. Otherwise, if u want system wide key trap , see documentaion of the API SetWindowsHookEx.
Best wishes..mil10
|
|
|
|
|
Like it says in winuser.h
/* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
/* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
Example...
void CMyCtrl::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if( nChar == 'A' )
{
}
}
|
|
|
|
|
hi!
i want to use IAccessible interface and other Accessibility interfaces.
when i compile .cpp file the complie error is "IAccessible' : undeclared identifier"
in msdn its specified that we IAccessible is declared in "oleacc.h" and use "oleacc.lib"
so i made an entry of oleacc.lib in
"Project->Settings->Link->object/library modules"
but still i am getting the same error.
next i tried
#import "oleacc.lib" in the .cpp file
the compile error is
"Cannot open type library file: 'oleacc.lib'"
so whats the way out?
thanks
anshu
|
|
|
|
|
I have soem queries regarding component versioning.
I had a component named "Old_Component" exposed as an STA, out-of proc COM server, developed in VC++. This is wrapped by another component "Old_Component_Wrapper" which is in-proc COM server and exposed to client.
Now we are planning to provide new version of our product.
In new version, we are thinking of removing the wrapper layer. That is we want to expose "Old_Component" to client instead of "Old_Component_Wrapper". Can you tell me is this possible? Or what can be the possible issues in doing this?
|
|
|
|
|
I want to make a combobox with bitmap items.
<br />
m_list.Create(IDB_BITMAP2, 50, 0, RGB(255,255,255));<br />
m_Lang.SetImageList(&m_list);<br />
<br />
COMBOBOXEXITEM cbItem;<br />
cbItem.mask = CBIF_IMAGE;<br />
cbItem.iItem = nItem;
cbItem.iImage = nImageIndex;
m_Lang.SetItem(&cbItem);
Like upper coding or another mehod, please give a help to me.
|
|
|
|
|
Hi!I have a strange question about the Vector.
I want to use vector in my project,but when I try to build my project.
Occur the errors like this:
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2809: 'operator new' has no formal parameters
What can I do? I really want to use vector,use the STL container,but seems the VC++ not support the STL containers,anyone can help me? thank's
|
|
|
|
|
Did you add this line before defining any variable of type vector?
using namespace std;
A. Riazi
|
|
|
|
|
Move the include above the macro mess (redefinition of the new operator) that is added by MFC. You should end up with something like...
#include "stdafx.h"
#include "DlgDummy.h"
#include "DlgDummyDlg.h"
#include <vector>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
using namespace std;
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
I have created a dialog in the resource of VC++
Then I change the Class from CDialog to CDialogBar
I add a menu --> Show CDialogBar
--> Close CDialogBar
I created a variable in the CMainFrame header file
public:
CMyDialogBar *m_wndMyDialogBar;
under Show CDialogBar:
m_wndMyDialogBar = new CMyDialogBar;
m_wndMyDialogBar->Create(......); <-- i forgot the parameter
m_wndMyDialogBar->ShowWindow(SW_SHOW);
but the DialogBar only appeared when i try to resize the window.
I invoke the Invalidate() and the RedrawWindow() still i have to resize
the window just to make the DialogBar appear.
what should i do please help ....
syalexanderph@yahoo.com <--- please email me
|
|
|
|
|
send your code to me, i maybe help you.
dexo@etang.com
|
|
|
|
|
Alright I have a browse button on a dialog, and next to that is an exit box, can't figure out how to have the directory name and file automaticly placed into the edit box. For example if you hit browse and choose a file in C:\blah\ and the filename is blah.txt in the edit box you will see: C:\blah\blah.txt
Thanks for any help that can be given.
|
|
|
|
|
|
|
I want to create a pager control using CreateWindow function at CMainFrame class of the application:
---------------------
if (CreateWindow(WC_PAGESCROLLER,NULL,PGS_HORZ|WS_CHILD, 0, 0, 0, 0, m_hWnd, NULL ,AfxGetInstanceHandle(),NULL) == NULL)
{
AfxMessageBox("Failed creating the pager control.");
return -1;
}
----------------------
The function returns NULL, which means failing in creating one. Can you help me to create the pager control?
Eilzabeth
|
|
|
|
|
First of all, you should call ::GetLastError() to see why the control isnt created.
And my first guess would be you forgot to call InitCommonControlsEx with ICC_PAGESCROLLER_CLASS.
Magnus
|
|
|
|
|
Yes, I did.
-------------------------
LPINITCOMMONCONTROLSEX lpInitCtrls = new INITCOMMONCONTROLSEX;
lpInitCtrls->dwICC =ICC_PAGESCROLLER_CLASS;
InitCommonControlsEx(lpInitCtrls);
if (CreateWindow(WC_PAGESCROLLER,NULL,PGS_HORZ|WS_CHILD, 0, 0, 0, 0, m_hWnd, NULL ,AfxGetInstanceHandle(),NULL) == NULL)
{
AfxMessageBox("Failed creating the pager control.");
return -1;
}
-------------------------
I have the code in the CMainFrame class at end of the OnCreate function.
Eilzabeth
|
|
|
|
|
And what return value do you get from ::GetLastError(); ?
Magnus
|
|
|
|
|
The GetLastError function returns a DWORD. How can I tell from such a number? At GetLastError documentation, it says use FormatMessage to get the error string. But I don't know how to do it. Can you help me?
Eilzabeth
|
|
|
|
|
I got the error message now. It says can not find window class.
Eilzabeth
|
|
|
|
|
Hi
One easy way to convert an error number is to use Error Lookup (under your tools menu in visual studio)
If it cant find the window class, then you get some error from InitCommonControlsEx, you should always check all return values from APIs as most of them report what went wrong with SetLastError().
If the code you sent is correct then you dont set dwSize of the INITCOMMONCONTROLSEX struct. And that makes InitCommonControlsEx fail.
Hope that solves your problem.
Magnus
|
|
|
|
|
I got it. I set the size to the size of the structure (dwSize = sizeof(INITCOMMONCONTROLSEX). Thank you.
Eilzabeth
|
|
|
|