Click here to Skip to main content
11,496,146 members (679 online)
Click here to Skip to main content

CSplitMX - File Splitting Class for Visual C++

, 29 Oct 2002 CPOL 50.8K 1.1K 13
This class splits a source file into many smaller pieces which can be distributed accross the web or on floppy disk.
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.

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 Pin
Oriocat19-Jul-04 10:39
memberOriocat19-Jul-04 10:39 
GeneralRe: Delimited file Pin
Pyatex21-Sep-04 4:28
memberPyatex21-Sep-04 4:28 
Generalthanks for the code Pin
NGS 54967231-Oct-02 6:30
sussNGS 54967231-Oct-02 6:30 
GeneralRe: thanks for the code Pin
Eugene Polonsky31-Oct-02 8:12
memberEugene Polonsky31-Oct-02 8:12 
GeneralRemark Pin
Geert Delmeiren31-Oct-02 4:10
sussGeert Delmeiren31-Oct-02 4:10 
Generalplease remove MFC dependencies Pin
Eugene Polonsky30-Oct-02 10:33
memberEugene Polonsky30-Oct-02 10:33 
GeneralRe: please remove MFC dependencies Pin
Pyatex31-Oct-02 7:56
memberPyatex31-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
Web04 | 2.8.150520.1 | Last Updated 30 Oct 2002
Article Copyright 2002 by Pyatex
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid