|
My project compromises of a set of different process talking to each other. They communicate via file mapped shared memory. I ran into a problem when I was doing a symantec antivirus liveupdate when the different processes of our application starts behaving erratically.
I had to reboot to recover and then excluded the directory of my application and the shared page file from antivirus scanning.
Now all the processes of my application for some strange reason began crashing everyday midnight while accessing the shared memory. I managed to find that when some of these processes were configured to not use the shared memory, those processes didnt terminate.
Can anyone shed light on why this could be happening - esp why application went for a toss during the liveupdate. Is there any way/tools to debug crashes in the file mapped shared memory files??
Appreciate your help.
|
|
|
|
|
Hi avijaya,
Is this behavior only occuring on Windows XP? Also... did you supply a SECURITY_ATTRIBUTES Structure[^] when creating the mapping?
Best Wishes,
-David Delaune
|
|
|
|
|
Hi David,
I did provide SECURITY ATTRIBUTES when I did CreateFile and CreateFileMapping. I gave a security descriptor that allowed anyone to access the object.
This problem is seen on Windows 2k3 Server.
-avijaya.
|
|
|
|
|
Friends,
void CAfxDumpStackDlg::Test()
{
AfxDumpStack( AFX_STACK_DUMP_TARGET_ODS );
}
AfxDumpStack API call in the above code block dumps only the following information.
"=== begin AfxDumpStack output ===
Loaded 'C:\WINDOWS\system32\dbghelp.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.
7C90EB94: WINDOWS\system32\ntdll.dll! KiFastSystemCallRet
59A830F0: WINDOWS\system32\DBGHELP.dll! DbgHelpCreateUserDump + 331 bytes
=== end AfxDumpStack() output ==="
What should I do more to get the detailed dump?
Thanks in advance,
Krishnakumar
|
|
|
|
|
|
|
Hi,
In the strCommand I am having 2MB of Data and when i am trying to split with the new line it was throwing error.(to loop through all the data)
But it was working for minminum (ie 50 KB of datas like 0's and 1's).
How to over come this error? Very urgent.. Below is the code...
CString strCommand; // Holds 2MB of datas like 0's and 1's...
System::String* strDataReceived = "";
strDataReceived = strCommand;
__wchar_t split __gc[] = new __wchar_t __gc[1];
split [0] = '\n';
String *strSplitCommand[] = strDataReceived->Trim()->Split (split);
Please help..
Reg,
Subbu
|
|
|
|
|
spalanivel wrote: Very urgent..
It is so urgent to justify the cross-post [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
spalanivel wrote: ...when i am trying to split with the new line it was throwing error.
My Magic 8-Ball is broken. What is the error that is being "thrown?"
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Try giving a little more detail about the error message - I just tried your code (reading > 2MB of data from a file) and it worked fine?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks for your reply..
Actually while executing the Split statement we are storing the values String Array and it doesn't hold that much size to handle.
It will automatically goes to catch and print the error message.
After some processing the Size will be increased and it holds now 40 MB of datas and store it in string array. Thus it makes problem.
Thanks,
Subbu
|
|
|
|
|
As you're using C++.NET classes, the array is dynamically sized, so there should be no issues...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi everybody !
Can you help me on finding the equivalant of these functions in MFC? Many thanks in advance.
bi.bmiHeader.biSize = sizeof(bi.bmiHeader);<br />
bi.bmiHeader.biWidth = dstX;<br />
bi.bmiHeader.biHeight = dstY;<br />
bi.bmiHeader.biPlanes = 1;<br />
bi.bmiHeader.biBitCount = 32;<br />
bi.bmiHeader.biCompression = BI_RGB;<br />
bi.bmiHeader.biSizeImage = dstX * 4 * dstY;<br />
bi.bmiHeader.biClrUsed = 0;<br />
bi.bmiHeader.biClrImportant = 0;<br />
SetDIBits(hdcDst, hBmpDst, 0, dstY, dst, &bi, DIB_RGB_COLORS);
bi.bmiHeader.biSize = sizeof(bi.bmiHeader);<br />
bi.bmiHeader.biWidth = nx;<br />
bi.bmiHeader.biHeight = - ny;<br />
bi.bmiHeader.biPlanes = 1;<br />
bi.bmiHeader.biBitCount = 32;<br />
bi.bmiHeader.biCompression = BI_RGB;<br />
bi.bmiHeader.biSizeImage = nx * 4 * ny;<br />
bi.bmiHeader.biClrUsed = 0;<br />
bi.bmiHeader.biClrImportant = 0;<br />
<br />
buf = (pBGR) malloc(nx * 4 * ny);<br />
bRes = GetDIBits(cdcSrc, cBmpSrc, 0, ny, buf, &bi, DIB_RGB_COLORS);
|
|
|
|
|
You know, Win32 API functions are available to MFC code...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
knowing that you know makes me happy
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
MFC uses CDC wrapper to handle device contexts as a wrapper for most sorts of images
there are no facts, only interpretations
|
|
|
|
|
Hi All,
Can anybody please tell me how to determine which disk is the boot disk ie the disk by which the system boot took place using mfc.
Regards
Abinash
|
|
|
|
|
"GetWindowsDirectory()" provides the path where windows is installed. From path you can retrive the drive letter (first character of the path). Through the drive letter you find out the physical drive number of the disk by using DeviceIOControl() and IOCTL_STORAGE_GET_DEVICE_NUMBER
|
|
|
|
|
It's a Win32 FAQ (on Win32 ng[^] , system, since 1995 )
|
|
|
|
|
MFC, STUDIO'2008, WINDOWS'XP 2003
#include <float.h>
_controlfp(_DN_FLUSH, _MCW_DN); // : error C3861: '__controlfp': identifier not found
// Denormal values flushed to zero by hardware on ALPHA and x86
// processors with SSE2 support. Ignored on other x86 platforms.
below some variants:
//+-1 _controlfp(0, MCW_EM);
<float.h>
// below following line is incorrect - don't display MessageBox(L"1\nDIVIDE BY ZERO");
_controlfp(_DN_FLUSH, _MCW_DN);
_controlfp(0, _MCW_DN);
_controlfp(_DN_SAVE, _MCW_DN);
_controlfp(0, _MCW_DN);
int err;
double fResult; // Bennet, pg.136
double x,y;
x = 5.0;
y = 0.0;
_try
{
fResult = x/y;
// _control87_2(0, 0,&fResult, 0);
//- _controlfp(0, 0,&fResult, 0); // : error C2660: '_controlfp' : function does not take 4 arguments
//- _controlfp(&fResult, 0); // : error C2664: '_controlfp' : cannot convert parameter 1 from 'float *' to 'unsigned int'
}
_except (GetExceptionCode() == EXCEPTION_FLT_DIVIDE_BY_ZERO)
{
MessageBox(L"1\nDIVIDE BY ZERO");
MessageBox(_T("2\nDIVIDE BY ZERO"));
AfxMessageBox(_T("3\nDIVIDE BY ZERO"));
}
|
|
|
|
|
And the question is?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Why don't exec
MessageBox(L"1\nDIVIDE BY ZERO");
|
|
|
|
|
The following code works fine on my system
#include "Excpt.h"
#include <Windows.h>
#include "cmath"
#include <float.h>
void main()
{
_controlfp(0, MCW_EM);
float fResult;
float x,y;
x = 5.0;
y = 0.0;
_try
{
fResult = x/y;
}
_except (GetExceptionCode() == EXCEPTION_FLT_DIVIDE_BY_ZERO)
{
MessageBox(NULL, L"DIVIDE BY ZERO", L"", MB_OK);
}
}
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hi all
How to retrieve the all drives in a computer and their size or their starting and end Sector using VC++ Code
|
|
|
|