|
Memory mapped files just leverage the demand paging mechanism built into Win32. Demand paging does take some CPU time. Since all the pages would be paged in, you'll get a slight performance increase if you read the data in in chunks.
If, on the other hand, your data has some organization to it such that you won't need to read all the pages in, a memory mapped file may give you increased performance.
Memory mapped files are different than overlapped I/O which is innappropriate in this situation.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Ok,
I tryed to use the memory mapping service this morning, at it works fine.
Do you know what function should I used to extract each lines of the text file ?
I mean, Do you know a usefull built-in function to parse a text file line by line when you just have a pointer on the beginning of the file
Thanks again,
Vince
|
|
|
|
|
Just brute force parsing.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
How to change the backgound color of a dialog?
The function SetDialogBkColor() is obsolete, so it cannot be used.
|
|
|
|
|
hey:i can give you some little help
HBRUSH CMyTest::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{if (nCtlColor = CTLCOLOR_STATIC ) {
pDC->SetBkColor(RGB(255,0,0));
pDC->SetBkMode(TRANSPARENT);
HBRUSH B = CreateSolidBrush(RGB(255,255,0));
return (HBRUSH) B;} }
running ok
|
|
|
|
|
I suppose that this code changes the bkg color of controls. However, I need to change the bkg color of a dialog window.
|
|
|
|
|
Thanx, I tried the code and it works. When I first looked at it I thought it was for controls, but when I tried it worked.
|
|
|
|
|
hi
how can i open serial & parallel ports in win NT\XP
where _inp & _outp functions works only in win me
thanks
|
|
|
|
|
|
I have already gone through those messages to no avail, i have even tried passing keyboard values direct to the OnChar method of the CDateTime Control but when i pass them from the button presses, eg press one and send the appropriate stuff via OnChar it will not update, however via a normal keypress it does update. I am beginning to wonder if the CDateTimeCtrl is a bit of a 'funny' class unless you use it exactly in the way microsoft want you to!
|
|
|
|
|
Just like LoadLibrary.
Help me plz...
|
|
|
|
|
What do you want to do exactly?
What function do you need?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I need LoadLibrary from memory, not from file.
Just like:
BOOL MyLoadLibrary(PBYTE LibCode);
|
|
|
|
|
I know an assembly way, if interested send me a mail
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Wow..... It's realy?!
Send it to me: winddriver@msn.com
Thank u very much~~~~~~~~~~~
|
|
|
|
|
yes,the above mr say right,what file or function do you indeed want ?which
dll the function is in?
for example,i want to use GradientFill function in msinmg32.dll to draw gradient rectange
i can do this way:
hinst_msimg32 = LoadLibrary( "msimg32.dll" );
m_bCanDoGradientFill = FALSE;
if(hinst_msimg32)
{m_bCanDoGradientFill = TRUE;
dllfunc_GradientFill = ((LPFNDLLFUNC1) GetProcAddress( hinst_msimg32, "GradientFill" ));
}}
|
|
|
|
|
DLLs automatically use shared memory for READ-ONLY areas.
Due Regards
Mahendra
|
|
|
|
|
We are getting a link error (2001) only in release mode however everything is fine when I run rebuild in Debug. Obviously this isn't a lot of info, I am researching on MSDN right now, any suggestions? I have already read the VC++ FAQ.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Check in the Project Settings dialog box, the "Link" tab.
Make sure the libraries in the "Libraries" editbox are the same as in the debug configuration's "Libraries" editbox.
Bikram Singh
|
|
|
|
|
Thanks, I was missing two .lib files. I guess I must be having a case of the Mondays.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Nick Parker wrote:
I guess I must be having a case of the Mondays.
Thank goodness it's only a 24-hour bug!
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
We all seem to have one of those once in a while!
Ant.
|
|
|
|
|
If you could dump the link errors here may be it would bemore usefull to comment on.
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
If Value is NULL trying to set nValue to 0
is _com_error correct
TRY
{
nValue = recordset2->Fields->GetItem("Value")->GetValue();
}
CATCH_ALL(_com_error, e)
{
nValue = 0;
}
END_CATCH_ALL
|
|
|
|