Click here to Skip to main content
15,914,163 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
Peter Saint26-Apr-07 4:23
Peter Saint26-Apr-07 4:23 
GeneralRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
GuyM26-Apr-07 4:30
GuyM26-Apr-07 4:30 
GeneralRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
Peter Saint26-Apr-07 5:17
Peter Saint26-Apr-07 5:17 
GeneralRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
Cedric Moonen26-Apr-07 3:57
Cedric Moonen26-Apr-07 3:57 
GeneralRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
Peter Saint26-Apr-07 4:14
Peter Saint26-Apr-07 4:14 
QuestionProblem in fwrite and fread function [modified] Pin
mohindar_kks26-Apr-07 2:32
mohindar_kks26-Apr-07 2:32 
QuestionRe: Problem in fwrite and fread function Pin
David Crow26-Apr-07 2:43
David Crow26-Apr-07 2:43 
AnswerRe: Problem in fwrite and fread function Pin
mohindar_kks26-Apr-07 3:08
mohindar_kks26-Apr-07 3:08 
Hi,

In my project simply encrypt data using XOR operator ,Then write encrypted data in file using fwrite function in MFC.

No problem in Decryption if successfully retrive data from encrypted file until EOF. But some time encrypted file automatically return EOF after postion of data retrive this data also decrypted successfully.


For example ,
File1:Input File size(6kb)
FIle2:Encrypt File size(5kb)
File3:Decrypt File size(1kb)

coding:
Encrypt:
while(!feof(Inputfile))
{
int iout;
fread(&iout,sizeof(iout),1,Inputfile);
iout^=1300;
fwrite(&iout,sizeof(iout),1,encryptfile);
}


Decrypt:
while(!feof(encryptfile))
{
int iout;
fread(&iout,sizeof(iout),1,encryptfile);
iout^=1300;
fwrite(&iout,sizeof(iout),1,decryptfile);
}

Note :

NoProblem occur when if XOR with value of 10

while(!feof(Inputfile))
{
int iout;
fread(&iout,sizeof(iout),1,Inputfile);
iout^=10;
fwrite(&iout,sizeof(iout),1,encryptfile);
}


Please replay me urgently




AnswerRe: Problem in fwrite and fread function Pin
Mark Salsbery26-Apr-07 7:15
Mark Salsbery26-Apr-07 7:15 
GeneralRe: Problem in fwrite and fread function Pin
David Crow26-Apr-07 8:00
David Crow26-Apr-07 8:00 
QuestionSHFileOperation and SendMessage Question Pin
Programm3r26-Apr-07 2:22
Programm3r26-Apr-07 2:22 
AnswerRe: SHFileOperation and SendMessage Question Pin
Programm3r26-Apr-07 2:27
Programm3r26-Apr-07 2:27 
GeneralRe: SHFileOperation and SendMessage Question Pin
Mark Salsbery26-Apr-07 7:16
Mark Salsbery26-Apr-07 7:16 
QuestionHow to Develope an Activex using existing controls Pin
viral_umang@hotmail.com26-Apr-07 2:09
viral_umang@hotmail.com26-Apr-07 2:09 
GeneralRe: How to Develope an Activex using existing controls Pin
GuyM26-Apr-07 2:36
GuyM26-Apr-07 2:36 
GeneralRe: How to Develope an Activex using existing controls Pin
viral_umang@hotmail.com26-Apr-07 2:51
viral_umang@hotmail.com26-Apr-07 2:51 
QuestionCString Pin
Bravoone_200626-Apr-07 2:07
Bravoone_200626-Apr-07 2:07 
AnswerRe: CString Pin
GuyM26-Apr-07 2:26
GuyM26-Apr-07 2:26 
GeneralRe: CString Pin
Bravoone_200626-Apr-07 2:41
Bravoone_200626-Apr-07 2:41 
GeneralRe: CString Pin
David Crow26-Apr-07 2:45
David Crow26-Apr-07 2:45 
GeneralRe: CString Pin
Bravoone_200626-Apr-07 2:54
Bravoone_200626-Apr-07 2:54 
GeneralRe: CString Pin
Maximilien26-Apr-07 3:32
Maximilien26-Apr-07 3:32 
GeneralRe: CString Pin
toxcct26-Apr-07 7:11
toxcct26-Apr-07 7:11 
GeneralRe: CString Pin
GuyM26-Apr-07 2:53
GuyM26-Apr-07 2:53 
GeneralRe: CString Pin
Bravoone_200626-Apr-07 3:03
Bravoone_200626-Apr-07 3:03 

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.