If this app is kept in house where you can control the hardware, try SQL Express. We just did a long series of tests with various databases in .Net, but I imagine many of the results would apply to C++, and found that SQL Express flew through all the tests. Unfortunately, the hardware requirements for good performance are heftier than our customers will have, but if this is for in house user, look no further.
If this app is for outside customers, give CodeBase a whirl; it's an xBase based database, but holds up pretty good, and is insanely easy to use.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
I am using __FILE__ macro in my application.
In the debug version it returns the absolute path of the source file but in the release version it return path relative to project directory. Is this normal behaivour or am I missing something.
Look at the code of follow
#ifdef _DEBUG//<-----------------NO 1
#define new DEBUG_NEW
static char THIS_FILE = __FILE__;
so In the debug mode you can capture the absolute path and In the release mode u capture the project directory instead of absolute path
when u call run from start->run it work as follows ( MSDN)
The system function passes command to the command interpreter, which executes the string as an operating-system command. system refers to the COMSPEC and PATH environment variables that locate the command-interpreter file (the file named CMD.EXE in Windows NT). If command is NULL, the function simply checks to see whether the command interpreter exists.
Make a call to the windows API command "GetWindowsDirectory" and use strcat to concatenate the notepad string to the end of it. You could just hardcode the string too (eg "C:\\Windows\\notepad.exe"), but if anyone has a custom windows install it may not find the file.
char *strbuf;<br />
if (GetWindowsDirectory(strbuf, 256))<br />
strcat(strbuf, "\\notePad.exe");<br />
// An error occurred, perhaps the buffer is too small?<br />
// Now you should have the full path in the strbuf variable<br />
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
<marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
I have to receive a very large data from my sensor via Serial Port. Here below is the structure of my data :
10 bytes HEADER + ( 4 bytes BEGIN + 240bytes DATA )*280 + 4 byes FOOTER
=> The total byte is : 10 + ( 4 + 240 )*280 + 4 = 68334 byes !
And, with such a large data, I don't know how to receive it. My buffer always overflow !!! So, now, I want to create a independent thread for reading data out of buffer, saving to other place and free the buffer sothat it can receive other data from my sensor without overflowing. I tried search "Serial Port" on this website, and I find the article about my problem. That article is "Serial Communication in Windows", posted by Ashish Dhar. I tried to use it, but I can't succeed !
So, please kindly show me how to trap create an independent thread to achieve my purpose.
Please don't ignore my question because this is my final project for graduating from my university ...
Please help me !!! My project's deadline is coming .... I really need that code ...
Thank you very much !!!
Email to me at : firstname.lastname@example.org
You can use AfxBeginThread() or CreateThread to invoke a new thread.
In my suggestion Create threads for reading from COM port, Parsing (if any)the received data and processing the data. So u can start 3 threads ( must be ssynchronized). The read thread reads bytes of data only and keep in a byte pointer. The parsing thread read from the byte pointer and remove any header/paddings etc & convert to pure data u need and keep. The processing thread must read from it or assign to proper data structure and do it work..
I have a finished implementation for activation that relies on the manufacturer assigned non-changable serial number of a hard drive. During testing I discovered that my method of discovering this number does not work on all versions of Windows that are going to be supported. The WMI claass Win32_PhysicalMedia does not exist in Win2k. The workaround for this is also very painful, requiring DeviceIoControl and probably administrative priveleges at runtime. I noticed that there is Wmi32_BaseBoard class that provides a serial number. However, not all motherboard provide this information (driver code never sets the number).
What is a good, simply way to identify a machine that works consistently on Windows 2000 and newer?
Note that the forth parameter gives you the volume serial number that the operating system assigns when a hard disk is formatted. To programmatically obtain the hard disk's serial number that the manufacturer assigns, use the Windows Management Instrumentation (WMI) Win32_PhysicalMedia property SerialNumber. But obviously you already know that Win32_PhysicalMedia doesn't work in less than WinXP
GetVolumeInformation can be easily changed and does get changed after formating. I got a good suggested at ms newsgroups... using Win32_ComputerSystemProduct. Its a class that is designed to uniquely identify a computer. So far so good.
My knowledge of MFC and ActiveX is very minimal at best. I have been trying my best but getting no further to getting a working demo running, despite the apparent simplicity of it.
The problem seems to be that the client part of Han's code is the fact that it is done as a CDialog app while the Scribble demo is done as a CFrame. Also the ActiveX initialisation is hidden away inside InitInstance.
It's all very frustrating. What I would like is either a link to a demo/tutorial where someone converts a simple MFC app to ActiveX - Steve Zimmerman's article isn't very in depth and adds to much clutter that confuses the issue. Or I would like a very clear tutorial. A lot of the tutorials I have read are very terse or don't touch any of the concepts that I would like to know about.
While I don't want to be spoon-fed I would like a few pointers to where I can find the information or specific terms I should be searching for.
Thanks, Graham Reeds.
Last Visit: 31-Dec-99 18:00 Last Update: 23-Sep-23 10:24