General discussion

Locked

Opening a File for reading

By jinuq ·
I am tring to open a text file for read access. I am using Create file(code below).
I even tried to use OpenFile.
(assembly)
Win95 db "Win95.txt",0
invoke CreateFile, offset Win95, GENERIC_READ, 0, NULL, OPEN_EXISTING, NULL, NULL

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Opening a File for reading

by Sam Hobbs In reply to Opening a File for readin ...

The following is taken directly from my C++ program:

HANDLE hascii = CreateFile("DiskFull.plg", GENERIC_READ,0,NULL,
OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
DWORD FileSize = GetFileSize(hascii, NULL);
char *pBuffer = new char[FileSize];
ReadFile(hascii, pBuffer, FileSize, &FileSize, NULL);
delete [] pBuffer;

Collapse -

Opening a File for reading

by jinuq In reply to Opening a File for readin ...

Okay thanks, unfortunatly that is just a c version of what I put.

Collapse -

Opening a File for reading

I've done this many times in C. I'll write a program, compile it, and email it to you for $50 bucks :)))

Collapse -

Opening a File for reading

by jinuq In reply to Opening a File for readin ...

Nice try. Almost had my interest.

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums