comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
May 2007
motuwethfrsasuw
 123456 18
78910111213 19
14151617181920 20
21222324252627 21
28293031    22
2007
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
comp.os ... win32 Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  memory mapped file causing huge PF usage         


Author: mdk
Date: May 16, 2007 22:45

Hi,

My program uses memory mapped file backed by paging file to
communicate with another process. It calls CreateFileMapping only once
at startup and calls MapViewOfFile each time it needs to share data
with the other process. As the program runs over time I find that task
manager shows huge PF usage over 1GB. I have checked each
MapViewofFile call has a corresponding UnmapViewOfFile call and
OpenFileMapping has a corresponding CloseHandle() call. But the PF
usage seems to be ever-growing.

Many thanks
Timmy
2 Comments
  Re: Storing .JPG image files with data...         


Author: Peter Mason
Date: May 16, 2007 19:20

Windows Application wrote:
> I need to create a file that would store personal information about
> a person, for example: name, addess, phone number, gender and
> age. But also I need to store a .JPG image file of each person that
> can be retrieved along with the pertinent personal information. So,
> my questions are:

Further to what Jack wrote, it is also possible to store data within a JPEG
file. Normally this is camera-related data but there's also room for a
comment. Google EXIF together with JPEG. There...
Show full article (1.34Kb)
no comments
  Re: Storing .JPG image files with data...         


Author: Jack Klein
Date: May 16, 2007 18:16

On 16 May 2007 09:50:02 -0700, Windows Application
netzero.com> wrote in
comp.os.ms-windows.programmer.win32:
> Hello,
>
> I need to create a file that would store personal information about
> a person, for example: name, addess, phone number, gender and
> age. But also I need to store a .JPG image file of each person that
> can be retrieved along with the pertinent personal information. So,
> my questions are:
>
> Is there a file system that would allow me to store text, numbers
> and image files for each person in the same file ?

Yes, some database programs will allow you to store images in records.
> If not, How can I store the .JPG image files separately ?

If you want something simpler, since all the other information is just
plain text, why not create a directory to store the image files. Then
in the data, include the full path and file name to the image file.
Show full article (1.12Kb)
no comments
  Memory Device Context and Jaggy Text         


Author: Nude Anaglyphs
Date: May 16, 2007 13:59

Hello All,

I'm creating a memory device context by calling CreateComaptibleDC,
selecting a bitmap to it (created with CreateDIBSection), and then drawing
text using DrawText. This looks greate if my display is 24 bit or 32 bit
color. However, if the display is less than that, the true-type fonts look
like crud (jaggy edges).

Here's a code snip:

HDC pDC = GetDC(0);
HDC TmpDC=CreateCompatibleDC(pDC);
...
HFONT m_Font=CreateFontIndirect( &lfont );
HFONT pOldFont = (HFONT)SelectObject(TmpDC,m_Font);
...
HBITMAP
TmpBmp=CreateDIBSection(TmpDC,&bmInfo,DIB_RGB_COLORS,(void**)&pbase,0,0);
HGDIOBJ TmpObj=SelectObject(TmpDC,TmpBmp);
...
DrawText(TmpDC, "Text" ,4, &pos, DT_NOPREFIX| DT_LEFT );
Show full article (0.98Kb)
no comments