|
Does anyone know if it is possible to write permission bits to an Access Database and if possible how to go about it. I want to set up a user logon system where they get different permissions and menu options depending on what group they belong to.
|
|
|
|
|
I've written a program in VC++ and when I run it my PC loses time!
Its a 'data recording' type program, reading data in through the serial port once a second, displaying the data on screen and storing the data to harddisk.
I thought maybe the clock would put its self right when I re-booted, but it doesn't. Surely the time is generated from an RTC (Real Time Clock) chip on the motherboard, how can I be affecting that ??????? I'm using 'GetCurrentTime' to read the time.
Any ideas?
Ali
|
|
|
|
|
Hi Alison!
Please explain me what is meant with 'loosing time' (how much?? in which amount of time...???)
It's not normal, my app is using lot's of timer-stuff (CTime objects with GetCurrentTime...)
Olli
cause sometimes the world is as strange as me....
|
|
|
|
|
Thanks for replying, its nice to hear that its not normal!
Olli wrote:
how much?? in which amount of time...???
Sorry, realised after I posted that I hadn't said how much time.
I first noticed it when I left it for 1 week running continuously and it lost 28 minutes.
I've run it again this morning and its lost 22 seconds in 2 hours.
If I don't run my code the PC doesn't loose any time. I don't where to start looking.
Ali
|
|
|
|
|
How do you 'use' the Time ??????
I use my objects mostly local, like this way:
void SomeFunc()
{
....
CTime theTime = CTime::GetCurrentTime();
....
}
In other cases, e.g. to compare time, i remind the old time in a global object...
BTW: If I want to place a clock in my statusbar, i call the OnTimer() each 0.1 secs, then i compare the CTime::GetCurrentTime() to my oldTime and if it changed, the i start updateting my clock...
Maybe you can show us how in detail you do it, then maybe i can help you..
Alison Pentland wrote:
I've run it again this morning and its lost 22 seconds in 2 hours.
22 secs in s hrs is a lot,... sounds very very strange...
Olli
cause sometimes the world is as strange as me....
|
|
|
|
|
I'm using it in lots of place, but here's how I get the time ....
CTime timeNow;
timeNow = CTime::GetCurrentTime();
I guess more detail would be good but I'm using CTime alot and I don't know which place is the problem - I don't know which example to give you.
I'm going to run it on a different PC over the weekend, just in case its related to the hardware. I'll let you know Monday how it goes.
Thanks for the interest
Ali
|
|
|
|
|
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?
|
|
|
|
|