Click here to Skip to main content
Licence CPOL
First Posted 29 Oct 2002
Views 46,768
Bookmarked 13 times

CSplitMX - File Splitting Class for Visual C++

By | 29 Oct 2002 | Article
This class splits a source file into many smaller pieces which can be distributed accross the web or on floppy disk.

Introduction

Ok, lets get started. CSplitMX adds file splitting capabilities to any Windows application written in Visual C++. I have always wanted an easy class that allowed me to split files into smaller pieces but only could find either VB sources or none at all. I have then decided to write the class myself. The source is relatively easy to understand even if they are not commented, but anywhere here is the rundown. To use CSplitMX include the two files Split.cpp and Split.h in your project and link split.h to the class/files you want to use the splitting functions in.

Using the code:

CString m_FileName = "My.exe"; // file larger than 720 KB
int cSize = 720000; // 720 KB
CSplitMX MX;
MX.Init(); // this allows the class to reset all its internal attributes
MX.SetFileName(m_FileName); // sets the name of the source file been split
MX.SetSplitSize(cSize); // sets the split size to 720KB
MX.SplitFile(); // this function splits the file

The demo project demonstrates the necessary approach to the class.

Have fun.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Pyatex


Sydea Studios Antigua
Antigua And Barbuda Antigua And Barbuda

Member

I am in the process of obtaining a bachelors degree in Computer Engineering. My interests are pattern recognition, biometrics, cryptography especially steganography. I enjoy writing.....

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralDelimited file PinmemberOriocat9:39 19 Jul '04  
GeneralRe: Delimited file PinmemberPyatex3:28 21 Sep '04  
Generalthanks for the code PinsussNGS 5496725:30 31 Oct '02  
GeneralRe: thanks for the code PinmemberEugene Polonsky7:12 31 Oct '02  
GeneralRemark PinsussGeert Delmeiren3:10 31 Oct '02  
Generalplease remove MFC dependencies PinmemberEugene Polonsky9:33 30 Oct '02  
GeneralRe: please remove MFC dependencies PinmemberPyatex6:56 31 Oct '02  

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

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

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 30 Oct 2002
Article Copyright 2002 by Pyatex
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid