Important alert: (current site time 7/16/2013 2:03:13 AM EDT)
 

winzip icon

[API] File Read Write

Email
Submitted on: 10/17/2003 11:44:38 AM
By: loopz  
Level: Intermediate
User Rating: By 9 Users
Compatibility: VB 5.0, VB 6.0
Views: 23045
 
     This is not a "normal" file input/output interface. This does it ALL with Api functions! The Read and Write function are in a Class, so it will be easy to add this to your programs.
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 6 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

10/17/2003 4:01:48 PMJim K

Hey! You should comment your code. You should also give an example so beginners would have a fear chance to understand what you'r doing.
(If this comment was disrespectful, please report it.)

 
10/18/2003 8:17:49 AMloopz87

I'm sorry, but i had no time to comment it out
(If this comment was disrespectful, please report it.)

 
10/18/2003 5:57:16 PMFrenzied-Panda

This looks nice but i would like working code for a simple example.
(If this comment was disrespectful, please report it.)

 
10/19/2003 7:16:58 PM

That is really nice:
SetFilePointer hFile, Int(nSize / 2), 0, FILE_BEGIN
(If this comment was disrespectful, please report it.)

 
4/17/2004 10:52:31 PMUnruled Boy

the Write function should accept all data types including Byte Array
(If this comment was disrespectful, please report it.)

 
5/17/2004 1:59:07 PM

how can I get the text of file
(If this comment was disrespectful, please report it.)

 
10/28/2004 10:55:49 AM

I am looking for something like this for a game trainer so it will read and address and add some number and then write to that address how would I do this if any one knows please e-mail me at hateEA@hotmail.com
(If this comment was disrespectful, please report it.)

 
5/20/2005 1:36:11 PMkornrad

I am a beginner! Please comment your code.
(If this comment was disrespectful, please report it.)

 
9/8/2005 1:59:30 PMpietro ing. cecchi

I'll try this decryption (they say there are no comments)...

(If this comment was disrespectful, please report it.)

 
9/23/2006 12:39:47 AMluzefer

it nice!!
Thank.
(If this comment was disrespectful, please report it.)

 
6/27/2009 3:11:15 AM123

thanks
(If this comment was disrespectful, please report it.)

 
7/22/2009 12:37:03 AMJosh

Here's for the people that don't know:

Dim xFile As New Api
Api.pWriteFile "C:\asf.txt", strData

OR

iBytes = Api.pWriteFile("C:\asf.txt", StrData)
msgbox "Bytes wrote to file: " & iBytes
(If this comment was disrespectful, please report it.)

 
6/18/2012 8:56:18 PMjotyme

Anyone knows how to make a game trainer?can you please email me jotyme@rocketmail.com.. how to retrieve the address and replace the value of the address. Thanks
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.