|
either you save the time somwhere in your program (using SetSystemTime for instance), after which the system will sync the time automattically or the code you generate somewhere stops interrupts from being processed ( I was not aware that this was still possible, or are you using a win 9x/ME version?). So also the clock int gets processed too late.
Rutger
|
|
|
|
|
If Win2k flavour try to run your application under user permissions rather than using Administrator account and you'll know that you'll get Access Denied if your program tries to change date/time.
Regards,
Venet.
--------
Black holes are where God divided by zero.(Steven Wright)
|
|
|
|
|
Alison Pentland wrote:
Surely the time is generated from an RTC (Real Time Clock) chip on the motherboard
The RTC is only read on startup - Windows maintains its own system time from then on. If you're running your code in a fairly tight loop, with constant access to the serial ports, console, and hdd, it may be missing a number of clock update cycles. I've read elsewhere that the clock maintenance process isn't a real high priority, and can be easily bumped by user processes.
Try putting the serial I/O in a separate thread, if it isn't already. I haven't worked a great deal with serial I/O in a long time, but in researching an aborted project that would have needed it, I stumbled across a couple of articles that recommend this as a way to prevent blocking other processes.
There are three types of people in the world: Those who make things happen; those who watch things happen; those who wonder what happened.
|
|
|
|
|
I am using VC++ and when I press the compile button a msg box appeared and told me that:
Cannot compile the file '...\myheader.h': no compile tool is associated with the file extension.
Why would this happend?
|
|
|
|
|
Because you cannot compile a header file - you need to build the project.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
You cannot compile a header file. Try compiling the corresponding .cpp file. If there is an error in the header file the compiler will report it.
Best regards,
Alexandru Savescu
|
|
|
|
|
Hi !
My app is using several OCXs and DLLs. I'm wondering what is the best way to automatically register these OCXs and DLLs. Does InstallShield do it ? Do I have to write my own code calling REGSRV32 serveral times ?
Thank you for your help !
Jerome
|
|
|
|
|
Is there a way to make the MFC windows of my App transparent with MSVS 6.0?
Or is there a downloadable MFC upgrade for WinXP? Or an upgrade for VS 6.0 that supports all new features of WinXP, MFC etc? (without to need to upgrade to VS .NET, at least not yet).
Thank you!
|
|
|
|
|
You need W2000 or Win XP and you need to download the platform SDK.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Does this SDK contain MFC update and documentation?
I'm not sure about MFC.
|
|
|
|
|
No it does not. The transparent stuff is done with API calls, which the SDK gives you. How else would your 1995 compiler give you Windows 2000 API calls ?
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
hi,
can u tell how to convert a BSTR to LPSTR.
|
|
|
|
|
put it through a _bstr_t constructor, it will do it for you. If you construct a _bstr_t and pass in false as a second argument, it will take ownership of the string as well.
_bstr_t b_tEd(bstrEd, false); // No need to clean up the BSTR
anystringfunction(b_tEd); // _bstr_t will do the conversion
It's in comdef.h, I believe.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
|
Hello,
Is there any way to send/receive fax by using TAPI? If yes, please send me some instructions.
Thank you.
Long Truong
|
|
|
|
|
TAPI only handles the telephony call handling, answering the call and dropping the call. The actual data sending and receiving isn't handled by TAPI. You have to do this bit yourself. The Platform SDK has the Windows FAX API, I don't know if this is of any use to you.
There are third party components that will do faxing using TAPI.
Michael
Logic, my dear Zoe, merely enables one to be wrong with authority. - The Doctor
|
|
|
|
|
Only for my selected menus, not all.
|
|
|
|
|
I was wondering whether anybody experienced problems when using CSocket class (VC60)?
It was bad-mouthed in my company recently as it was supposedly "missing OnReceive notifications" and we were instructed to use something else instead, like CAsyncSocket.
What do you guys use?
|
|
|
|
|
|
Hi,
I meet some problem in trying to copy a part of resource in a project into another project.
How to do this? is there any settings for VC++ 6.0 for doing this.
Thanks in advance!
chen
|
|
|
|
|
You can open the resource file and simply drag and drop the relevant portions
|
|
|
|
|
Hi!
I am writing a printer processor( a part of printer driver) which is a dll.
But when i used this dll for the first time, i found it impossible to replace it with new version without reboot because the system said it was used by other program.
How can i uninstall dll from memory manually? is there any tool exist?
any suggestion is appreciative!
|
|
|
|
|
1ParsePidlFromPath
summary FIt translate ansi path of filesystem into PIDL .
LPITEMIDLIST ParsePidlFromPath(LPCSTR path)
{
//Unicode path is puted into here
OLECHAR szOleChar[MAX_PATH];
//point gdesktopg IshellFolder
LPSHELLFOLDER IpsfDeskTop;
//return PIDL
LPITEMIDLIST Ipifq;
ULONG ulEaten, ulAttribs;
HRESULT hres;
//get gdesktoph IshellFolderr
SHGetDesktopFolder(&lpsfDeskTop);
//translate Ansi path into Unicode,and put into szOleChar
MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,
Path,-1,szOleChar,sizeof(szOleChar));
//translate szOleChar into PIDL,and put into lpifq ************
?? ***
hres=lpsfDeskTop->Release( ); **
//if failtCreturn NULL
if(FAILED(hres))return NULL;
return lpifq;
}
function leave out several row CHow to do if translate szOleChar into PIDL.
sai of china
|
|
|
|
|
Where do I check for the messages print out by TRACE("messages")? The book I have says it will be in the "debug output window"; I don't see it / how do I turn it on?
If you know a more convenient way to output a string in a windows program for debugging reasons, let me know too.
Thanks.
John
edit: I'm using Windows2k and Visual C++.
|
|
|
|
|
It's only there ifg you start with F5 (debug) I prefer writing to disk with iostreams myself.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|