Click here to Skip to main content
Click here to Skip to main content

CSplitMX - File Splitting Class for Visual C++

, 29 Oct 2002 CPOL
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

Pyatex
Sydea Studios Antigua
Antigua And Barbuda Antigua And Barbuda
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.....

Comments and Discussions

 
GeneralDelimited file PinmemberOriocat19-Jul-04 10:39 
GeneralRe: Delimited file PinmemberPyatex21-Sep-04 4:28 
Generalthanks for the code PinsussNGS 54967231-Oct-02 6:30 
GeneralRe: thanks for the code PinmemberEugene Polonsky31-Oct-02 8:12 
GeneralRemark PinsussGeert Delmeiren31-Oct-02 4:10 
Generalplease remove MFC dependencies PinmemberEugene Polonsky30-Oct-02 10:33 
GeneralRe: please remove MFC dependencies PinmemberPyatex31-Oct-02 7:56 

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.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 30 Oct 2002
Article Copyright 2002 by Pyatex
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid