Yes that would do! They are recoverery data files, so periodically writing them. Just interested in the newest data.
grahamfff
Yes that would do! They are recoverery data files, so periodically writing them. Just interested in the newest data.
grahamfff
In a 20 msec loop and sometimes two files need to have data written to them and the open -> write -> close takes about 8-10 msec each and sometimes get an overrun.
grahamfff
I just want to append to the TOP of the file each time. Its too slow doing an open -> write -> close. In a 20 msec loop and sometimes two files need to hav data written to them. No timing problems with the append, but this could result in large files if I do not overwirie.
grahamfff
Its too slow when I open -> write -> close a file (see code below). Are they a way of opening the file and always writing at the top of the file; e.g. I do not want to Append text, just write the same 100 lines of text each time at the top of the file.
#include <stdio.h>
FILE * pFile;
/* open file and check if was successful */
if ((pFile = fopen("myfile.txt", "w")) == NULL)
{
/* couldn't open file; do some error handling if u want */
}
else
{
/* do s.th. */
/* close file */
fclose(pFile);
}
Waiting in hope!
grahamfff
Dear Jessica, thank you for your e-mail of the 15th April 2013. I would just like to confirm that I would like to know what happened to my complaint that I submitted to Ian Clarke on the 16th of June 2011 via e-mail. The details of the complaint have already been sent to you regarding this electoral fraud issue. Also I would like to understand how the complaint from the Town Clerk of Chard was progressed as I said before it did not follow the documented process contained on SSDC web site. This complaint was lodged by the Chard Town Clerk to your Monitoring officer Ian Clarke dated the 16th of June 2012. This complaint was not lodged in the formal system of complaints and I was later informed of this complaint on the 31st of July some six weeks later by what it seems private correspondence and again there appears to be two separate audit trains on this issue. If I need to resubmit my complaint of the 16th June 2011 then I would like your advice on this so that this and any future complaints can be progressed and not ‘lost in the system’ by some strange progress’. Also I feel that the complaint lodged by Chard Town Clerk was not handled correctly and so how would I instigate a complaint against the Monitoring Officer regarding this issue as if I do this directly then it could again get ’lost’ in the system. What I am thinking is can I copy the complaint into another individual to ensure that it does not get deleted on arrival? Regarding the possible FOI over the display of Countryside Alliance posters in my Polling Station in May 2011, I am happy not to continue with this issue even though I did not get any acknowledgement or apology over this issue, but perhaps the Democrat Services department may have learned their lesson, I do hope so! As for the Subject Access Request, I shall take legal advice which will probably result in writing to the Information Commissioner for a ruling over this data request. Many thanks for your assistance and look forward to receiving your advice, Graham Forsyth.
grahamfff
Thanks for all who posted. But as I cannot get a handle on the problem which may be due to using an existing MFC application for a simular one. I deleteled some controls and renamed some of the dialogus and classes (including files names) and seem to have done something that has resulted in the basic framework failing. Perhaps the Close button problem was a 'red herring' and perhaps best to start again and copy over code snipps as could spend ages on this problem and get nowhere. I always found it difficult to reuse an MFC application. I have checked butons, textboxes dropdown lists etc and the resourses and event handlers but still the problem remains.
grahamfff
Not done the heap page (as dont know how) But with the AfxCheckMemory() I get the following, puting the statement in InitDlg() routine. Again do not understand.
ntdll.dll!7c90120e()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!7c96ee31()
ntdll.dll!7c95f8f4()
ntdll.dll!7c96e94d()
ntdll.dll!7c96f586()
ntdll.dll!7c962fcf()
user32.dll!7e418bd9()
user32.dll!7e41885a()
user32.dll!7e42a013()
user32.dll!7e43e577()
user32.dll!7e42a998()
user32.dll!7e43e577()
mfc90d.dll!CWnd::DefWindowProcA(unsigned int nMsg=272, unsigned int wParam=723394, long lParam=0) Line 1043 + 0x20 bytes C++
mfc90d.dll!CWnd::Default() Line 274 C++
mfc90d.dll!CDialog::HandleInitDialog(unsigned int __formal=723394, unsigned int __formal=723394) Line 673 + 0x8 bytes C++
mfc90d.dll!CWnd::OnWndMsg(unsigned int message=272, unsigned int wParam=723394, long lParam=0, long * pResult=0x0013e2dc) Line 2018 + 0x11 bytes C++
mfc90d.dll!CWnd::WindowProc(unsigned int message=272, unsigned int wParam=723394, long lParam=0) Line 1755 + 0x20 bytes C++
mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0013e7b4, HWND__ * hWnd=0x00070a0c, unsigned int nMsg=272, unsigned int wParam=723394, long lParam=0) Line 240 + 0x1c bytes C++
mfc90d.dll!AfxWndProc(HWND__ * hWnd=0x00070a0c, unsigned int nMsg=272, unsigned int wParam=723394, long lParam=0) Line 403 C++
mfc90d.dll!AfxWndProcBase(HWND__ * hWnd=0x00070a0c, unsigned int nMsg=272, unsigned int wParam=723394, long lParam=0) Line 441 + 0x15 bytes C++
user32.dll!7e418734()
user32.dll!7e418816()
user32.dll!7e42927b()
user32.dll!7e42651a()
user32.dll!7e42683e()
user32.dll!7e439b43()
mfc90d.dll!CWnd::CreateDlgIndirect(const DLGTEMPLATE * lpDialogTemplate=0x00480aa0, CWnd * pParentWnd=0x00000000, HINSTANCE__ * hInst=0x00400000) Line 312 + 0x2a bytes C++
mfc90d.dll!CDialog::DoModal() Line 576 + 0x20 bytes C++
MFCTest.exe!CMFCTestApp::InitInstance() Line 63 + 0xb bytes C++
mfc90d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00161f0a, int nCmdShow=1) Line 37 + 0xd bytes C++
MFCTest.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00161f0a, int nCmdShow=1) Line 30 C++
MFCTest.exe!__tmainCRTStartup() Line 574 + 0x35 bytes C
MFCTest.exe!WinMainCRTStart
It happens after all the code in the OnBnClose() has run. I deleted the Cancel button a long time ago. The are other modal dialogs but they are OK. I think I got confused when I deleted the OnOK() routine and tried to reinstate it. It is using IDOK as a resourse. Its a big MFC application and I deleted some controls and control variables but seemed to have got in a mess. I can usually sort things out, but this time because its at the program termination phase I am a bit lost as nothing to bebug.
grahamfff
Get the following run time error after making a few changes in my MFC application. Not been able to find where it occurs other than when I click on the OK button of the Main Dialog.
This may be due to a corruption of the heap, which indicates a bug in MFCTest.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while MFCTest.exe has focus.
The output window may have more diagnostic information.
HEAP[MFCTest.exe]: Invalid Address specified to RtlValidateHeap( 003C0000, 003C8E70 )
Windows has triggered a breakpoint in MFCTest.exe.
This may be due to a corruption of the heap, which indicates a bug in MFCTest.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while MFCTest.exe has focus.
The output window may have more diagnostic information.
Object dump complete.
Any suggestions to how to locate this heap problem? I think I deleted the OK button and then tryied to undo the changes.
grahamfff
I just tried to invoke the crash and the code section it occured in, but the problem has gone away. I did a work around when I encountered this crash and just wanted to try and sort it out now. I just wondered if I used a #define items inside the structure I has defining. Anyway should I worry about the data segment of the program as I am processing very large text files as already I needed to upgrade counters from short to int. Regards, Graham.
grahamfff
Can anyone advise on this problem on Visual Studio 2005 MFC application? When I add any new variables; e.g. say a structured array of some 256 elements my program crashes with an exception where the code was OK in all previous versions. I am assuming that I have reached some limits on heap or stacks etc. and think that addresses/pointers are being overwritten. Can some suggest and options to set to increase the programs resources. Note the program reads in some large files and uses the CStringArray for lots o string processing. Many thanks, Graham.
grahamfff
The program controlled a hardware item, using a database and shared library. Now would like to control three items of hardware; which can be done OK. But need three instances of the GUI to control each h/w item. If was starting the scratch then could design a class for this scheme, but too late now. For ease and speed, clone the GUI and global change the code behind it. Graham.
grahamfff
In a C++ MFC application I have a Main dialog and several child dialogs. Now one of these child dialogs I used the Tabbed Dialog (CTabDialog - which had a main dialog and a dialog for each TAB). This worked greatand it has loads of code associated with the many controls on these tabs. Now I would like to clone this dialog x2. What is the best way to try and do this? I am worried about the IDD/IDC etc in the resource.h file. I can do global exchange for many items in the code. Has anyone done this before or suggest the scheme to do this. Many thanks, Graham
grahamfff
Thanks for the posts, I did try the following code, but am I on the right track as the float did not work.
struct RXData {
double timeStamp;
double item1;
long item2;
double item3;
int flag1;
bool state;
}
float swap(float d)
{
float a;
unsigned char *dst = (unsigned char *)&a;
unsigned char *src = (unsigned char *)&d;
dst[0] = src[3];
dst[1] = src[2];
dst[2] = src[1];
dst[3] = src[0];
return a;
}
short byteSwap16(short value)
{
short newValue = 0;
char* pnewValue = (char*) &newValue;
char* poldValue = (char*) &value;
pnewValue[0] = poldValue[1];
pnewValue[1] = poldValue[0];
return newValue;
}
unsigned long byteSwap32(unsigned long value)
{
unsigned long newValue = 0;
char* pnewValue = (char *) &newValue;
char* poldValue = (char *) &value;
pnewValue[0] = poldValue[3];
pnewValue[1] = poldValue[2];
pnewValue[2] = poldValue[1];
pnewValue[3] = poldValue[0];
return newValue ;
}
RxData.timeStamp = swap(RxData.timeStamp
);
grahamfff
I am receiving a data structure from a Unix machine (Big Endian) which contains doubles, integerss and shorts. Using UDP for the transmission of the data. Now what do I need to do at the Windows end to access this data correctley; i.e. adouble with the value 55.5 on Unix having the same value on Windows; Can I do byte swapping on the data structure received (this must have been done before); or do you need to byte swap each type individually; e.g. to get the double and the 32 bit integers and the 16 bit shorts. At present I will assume byte aligned but will check during testing and avoid booleans. Regards, Andy.
grahamfff
I need to replace text in all text files in the directory (including sub-directoies). I have managed to get the following working, but dont know how to combine them!
find . -exec grep –n "oldText" '{}' \; -print
find . -type f -name '*.read' -print -exec sed s/oldText/newText/g '{}' \;
ANy suggestion please, I have done searches, but just want a simple one line command if possible. Regards, Andy.
grahamfff
I created a Deployment applicaton via the Wizard to deplay my Visual Studio 2005 .Net application. The application uses several ActiveX controls. I have included them and registered them in the target PC. However when I run the application having installed it on the target PC the hour-glass is visable for a few seonds then reverts back the the default cursor. Are they any way of finding out the reason for this - I am toally blind to the problem. I did try and run from a DOS window, but still nothing. On the deveopment PC the Installer works OK. Regards, Andy.
grahamfff
Has this program been updated for VS 2005. I had problems with it om VS 2003, does most of the things wright but gets IDD for the Aboutbox and Menu wrong. Andy.
grahamfff
I know in Borland their is a command to check for other events when in a loop on a form. Are they something the same in Visual Studio. I am in a loop when I click a button, but need to check if another button/checkbox event needs to be processed; e.g. flag set to exit the loop. Or do I need to opt for a worker thread? Graham. grahamfff
Thanks for your post. Just two more questions if you please. 1. Are dynamic domain names more difficult to get hold off. I was going to use www.noip.com to register one. 2. If I test out my Wed site on another PC on my LAN, with just hotmail availble, what would I specify for the smto server - the same as for the Gateway PC? Many thanks, grahamfff