Click here to Skip to main content
15,916,462 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Data Management Pin
Kash26-Aug-02 5:53
Kash26-Aug-02 5:53 
GeneralRe: Data Management Pin
Tomasz Sowinski26-Aug-02 5:56
Tomasz Sowinski26-Aug-02 5:56 
QuestionWhat is "Window Station" Pin
Johndotcom26-Aug-02 4:48
Johndotcom26-Aug-02 4:48 
AnswerRe: What is "Window Station" Pin
Tomasz Sowinski26-Aug-02 4:57
Tomasz Sowinski26-Aug-02 4:57 
AnswerRe: What is "Window Station" Pin
Stephane Rodriguez.26-Aug-02 5:50
Stephane Rodriguez.26-Aug-02 5:50 
GeneralRe: What is "Window Station" Pin
Tomasz Sowinski26-Aug-02 5:52
Tomasz Sowinski26-Aug-02 5:52 
GeneralRe: What is "Window Station" Pin
Stephane Rodriguez.26-Aug-02 19:32
Stephane Rodriguez.26-Aug-02 19:32 
GeneralCreateFileMapping Pin
Mazdak26-Aug-02 4:48
Mazdak26-Aug-02 4:48 
I want to use file mapping and this is my code:

<br />
	HANDLE  hSearchedFile,hMap;<br />
	LPVOID pFile,charSearch;<br />
	LPCTSTR fName = strName.GetBuffer();<br />
<br />
	hSearchedFile = CreateFile(fName,GENERIC_READ,0,<br />
		NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);<br />
<br />
	hMap = CreateFileMapping(hSearchedFile,NULL,PAGE_READONLY,0,0,NULL);<br />
<br />
	if(hMap==NULL)<br />
		AfxMessageBox("Could not create file-mapping object");<br />
<br />
	pFile = MapViewOfFile(hMap,FILE_MAP_READ,20,0,0);<br />
				<br />
<br />
	if(pFile==NULL)<br />
		AfxMessageBox("Could not map view of file.");<br />


hSearchedFile is always 0xffffffff but hMap and pFile are always NULL.I don't know whats the problem with my code.Any idea?

Mazy

"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"
Kryptonite-3 Doors Down

GeneralRe: CreateFileMapping Pin
Tomasz Sowinski26-Aug-02 5:00
Tomasz Sowinski26-Aug-02 5:00 
GeneralRe: CreateFileMapping Pin
Mazdak26-Aug-02 5:13
Mazdak26-Aug-02 5:13 
GeneralElegant file use Pin
solosnake26-Aug-02 4:00
solosnake26-Aug-02 4:00 
GeneralRe: Elegant file use Pin
Pavel Klocek26-Aug-02 4:36
Pavel Klocek26-Aug-02 4:36 
GeneralRe: Elegant file use Pin
Tomasz Sowinski26-Aug-02 4:38
Tomasz Sowinski26-Aug-02 4:38 
GeneralRe: Elegant file use Pin
Pavel Klocek26-Aug-02 10:11
Pavel Klocek26-Aug-02 10:11 
GeneralRe: Elegant file use Pin
solosnake26-Aug-02 4:57
solosnake26-Aug-02 4:57 
GeneralRe: Elegant file use Pin
Brian Azzopardi26-Aug-02 4:59
Brian Azzopardi26-Aug-02 4:59 
GeneralRe: Elegant file use Pin
Tomasz Sowinski26-Aug-02 5:02
Tomasz Sowinski26-Aug-02 5:02 
GeneralRe: Elegant file use Pin
solosnake26-Aug-02 5:12
solosnake26-Aug-02 5:12 
GeneralRe: Elegant file use Pin
Tomasz Sowinski26-Aug-02 5:19
Tomasz Sowinski26-Aug-02 5:19 
GeneralRe: Elegant file use Pin
Brian Delahunty26-Aug-02 5:35
Brian Delahunty26-Aug-02 5:35 
GeneralRe: Elegant file use Pin
Tomasz Sowinski26-Aug-02 5:38
Tomasz Sowinski26-Aug-02 5:38 
GeneralRe: Elegant file use Pin
Brian Delahunty26-Aug-02 6:32
Brian Delahunty26-Aug-02 6:32 
GeneralMultilanguage resource problem Pin
Andreas Saurwein26-Aug-02 3:35
Andreas Saurwein26-Aug-02 3:35 
GeneralRe: Multilanguage resource problem Pin
Tomasz Sowinski26-Aug-02 3:42
Tomasz Sowinski26-Aug-02 3:42 
GeneralRe: Multilanguage resource problem Pin
Andreas Saurwein26-Aug-02 3:54
Andreas Saurwein26-Aug-02 3:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.