Click here to Skip to main content
15,921,837 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: BOOL vs. bool Pin
Chris Losinger21-Mar-03 14:49
professionalChris Losinger21-Mar-03 14:49 
GeneralRe: BOOL vs. bool Pin
Michael Dunn21-Mar-03 15:41
sitebuilderMichael Dunn21-Mar-03 15:41 
GeneralString datatype mathematical addition Pin
Grant Cobb21-Mar-03 13:28
Grant Cobb21-Mar-03 13:28 
GeneralWindows 98 abnormal program termination Pin
Ambit21-Mar-03 12:34
Ambit21-Mar-03 12:34 
GeneralRe: Windows 98 abnormal program termination Pin
Ravi Bhavnani21-Mar-03 13:05
professionalRavi Bhavnani21-Mar-03 13:05 
GeneralRe: Windows 98 abnormal program termination Pin
Ambit22-Mar-03 7:58
Ambit22-Mar-03 7:58 
GeneralRe: Windows 98 abnormal program termination Pin
Ravi Bhavnani22-Mar-03 9:32
professionalRavi Bhavnani22-Mar-03 9:32 
GeneralRe: Windows 98 abnormal program termination Pin
Ambit22-Mar-03 13:53
Ambit22-Mar-03 13:53 
Hi Ravi,

Thanks again for the help. I have now located the problem but haven't figured out how to fix it yet. The problem lies with password encrypted zip files. If the zip files that are extracted aren't password encrypted, they work fine on Win98. If they are, they spew the error. So far I don't know if this has to do with the zip library I'm using (I don't think so, as it is supposed to be compatible with Win98 - it is the one from http://www.artpol-software.com), or with the password encryption I'm using. I'm using cryptography.cpp and cryptography.h, which use the Windows CryptoAPI (got them from Planet Source Code), to encrypt the password and store it in an INI file. The program then reads the encrypted password, converts it and passes it to the Zip...

I doubt posting the code will help as it's very specific (relying on cryptography.cpp and .h and the zlip library from artpol software), but I'll post it just in case. The code I am using is really straight out of the example files (I do a GetPrivateProfileString for Password_str, the default being "NO_PASSWORD_DEFINED"):

//Open the Zip file:
CZipArchive zip;
zip.Open(ZipFile_str);

//If there is a password, decrypt and set it:
if(strcmp(Password_str,"NO_PASSWORD_DEFINED")!=0)
{
//DECRYPT PASSWORD FOR ZIP FILE:
char *sUnencrypted;
clsCryptography MyCrypt;

//Decrypt data:
MyCrypt.bDecryptData(Password_str, "zE76c78cae9opzz231fx" );

// Allocate enough memory to hold unencrypted value
sUnencrypted = new char[MyCrypt.lGetBufferLength() + 1];

// Store unencrypted value in variable
strcpy( sUnencrypted, MyCrypt.sGetBuffer() );

//Pass the decrypted password into the ZIP file:
zip.SetPassword(MyCrypt.sGetBuffer());
delete[] sUnencrypted;
}

Many thanks,
Keith
Generalmemcpy vs. memmove Pin
pba_21-Mar-03 10:24
pba_21-Mar-03 10:24 
GeneralRe: memcpy vs. memmove Pin
Chris Losinger21-Mar-03 10:48
professionalChris Losinger21-Mar-03 10:48 
GeneralRe: memcpy vs. memmove Pin
pba_21-Mar-03 10:58
pba_21-Mar-03 10:58 
GeneralRe: memcpy vs. memmove Pin
Chris Losinger21-Mar-03 11:59
professionalChris Losinger21-Mar-03 11:59 
GeneralRe: memcpy vs. memmove Pin
pba_21-Mar-03 12:15
pba_21-Mar-03 12:15 
GeneralPrinting with fopen, and f*() Pin
Anonymous21-Mar-03 10:16
Anonymous21-Mar-03 10:16 
GeneralRe: Printing with fopen, and f*() Pin
Ravi Bhavnani21-Mar-03 10:22
professionalRavi Bhavnani21-Mar-03 10:22 
GeneralRe: Printing with fopen, and f*() Pin
Scorp1us21-Mar-03 10:28
Scorp1us21-Mar-03 10:28 
GeneralRe: Printing with fopen, and f*() Pin
Scorp1us21-Mar-03 10:48
Scorp1us21-Mar-03 10:48 
GeneralRe: Printing with fopen, and f*() Pin
Nicolas Bonamy21-Mar-03 10:49
Nicolas Bonamy21-Mar-03 10:49 
GeneralRe: Printing with fopen, and f*() Pin
CvdWalt21-Mar-03 11:34
CvdWalt21-Mar-03 11:34 
GeneralRe: Printing with fopen, and f*() Pin
PJ Arends21-Mar-03 17:43
professionalPJ Arends21-Mar-03 17:43 
GeneralProblem with toolbars XP style Pin
John R. Shaw21-Mar-03 10:03
John R. Shaw21-Mar-03 10:03 
Generalmenu Pin
dudic21-Mar-03 8:13
dudic21-Mar-03 8:13 
GeneralRe: menu Pin
Maximilien21-Mar-03 8:30
Maximilien21-Mar-03 8:30 
GeneralI have a very stupid question... Pin
K. Shaffer21-Mar-03 7:39
K. Shaffer21-Mar-03 7:39 
GeneralRe: I have a very stupid question... Pin
Phil Boyd21-Mar-03 8:12
Phil Boyd21-Mar-03 8:12 

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

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