Click here to Skip to main content
15,896,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionFix extension for CFileDialog for file saving !!! Pin
Le@rner28-Jul-08 19:54
Le@rner28-Jul-08 19:54 
AnswerRe: Fix extension for CFileDialog for file saving !!! Pin
ThatsAlok29-Jul-08 0:14
ThatsAlok29-Jul-08 0:14 
GeneralRe: Fix extension for CFileDialog for file saving !!! Pin
Le@rner29-Jul-08 0:39
Le@rner29-Jul-08 0:39 
GeneralRe: Fix extension for CFileDialog for file saving !!! Pin
ThatsAlok29-Jul-08 1:13
ThatsAlok29-Jul-08 1:13 
AnswerRe: Fix extension for CFileDialog for file saving !!! Pin
krmed29-Jul-08 0:46
krmed29-Jul-08 0:46 
Questionwriting and reading BYTE array Pin
subramanyeswari28-Jul-08 19:07
subramanyeswari28-Jul-08 19:07 
AnswerRe: writing and reading BYTE array Pin
Cedric Moonen28-Jul-08 20:20
Cedric Moonen28-Jul-08 20:20 
GeneralRe: writing and reading BYTE array Pin
subramanyeswari28-Jul-08 20:59
subramanyeswari28-Jul-08 20:59 
Here is the code
char strPasswd[8] = "test123";
			DWORD dlen = 8;
			size_t t ;
			long lSize;
			
			size_t result;
			BYTE*  Newpasswd;

			FILE *fp = fopen("c:\\test.bin", "wb+");
			BYTE*  encodedpasswd = EncodeString(strPasswd,&dlen);
			t = fwrite((unsigned char*)encodedpasswd,1,sizeof((unsigned char*)encodedpasswd),fp);
			fclose(fp);
			fp = fopen("c:\\test.bin", "rb+");
			fseek (fp , 0 , SEEK_END);
			lSize = ftell (fp);
			rewind (fp);
			Newpasswd= (unsigned char*) malloc (sizeof(unsigned char)*lSize);
			int i = fread(Newpasswd,1,sizeof(Newpasswd),fp);//Newpasswd is not the same as encodedpasswd 
			char* tempPassword = DecodeString(testpasswd,&dlen);// here tempPassword is junk


Is writing is not done properly?

Regards,
GeneralRe: writing and reading BYTE array Pin
Cedric Moonen28-Jul-08 21:27
Cedric Moonen28-Jul-08 21:27 
AnswerRe: writing and reading BYTE array Pin
CPallini28-Jul-08 21:28
mveCPallini28-Jul-08 21:28 
Questionexit button on top right corner should be disabled Pin
VCProgrammer28-Jul-08 18:31
VCProgrammer28-Jul-08 18:31 
AnswerRe: exit button on top right corner should be disabled Pin
_AnsHUMAN_ 28-Jul-08 18:52
_AnsHUMAN_ 28-Jul-08 18:52 
Questionproblem with dll Pin
prithaa28-Jul-08 18:30
prithaa28-Jul-08 18:30 
AnswerRe: problem with dll Pin
Cedric Moonen28-Jul-08 20:23
Cedric Moonen28-Jul-08 20:23 
GeneralRe: problem with dll Pin
prithaa28-Jul-08 20:52
prithaa28-Jul-08 20:52 
GeneralRe: problem with dll Pin
Cedric Moonen28-Jul-08 20:55
Cedric Moonen28-Jul-08 20:55 
QuestionUSB Monitor Pin
mirtu28-Jul-08 18:21
mirtu28-Jul-08 18:21 
AnswerRe: USB Monitor Pin
mirtu28-Jul-08 23:32
mirtu28-Jul-08 23:32 
AnswerRe: USB Monitor Pin
mirtu30-Jul-08 17:58
mirtu30-Jul-08 17:58 
QuestionI am calling void SearchDialog::OnSearchBtn() from a thread. Pin
ptr_Electron28-Jul-08 18:09
ptr_Electron28-Jul-08 18:09 
Questiondll problem Pin
prithaa28-Jul-08 17:27
prithaa28-Jul-08 17:27 
AnswerRe: dll problem Pin
ramana.g28-Jul-08 18:33
ramana.g28-Jul-08 18:33 
GeneralRe: dll problem Pin
prithaa28-Jul-08 18:47
prithaa28-Jul-08 18:47 
GeneralRe: dll problem Pin
Nibu babu thomas28-Jul-08 21:48
Nibu babu thomas28-Jul-08 21:48 
AnswerRe: dll problem Pin
sashoalm28-Jul-08 20:54
sashoalm28-Jul-08 20:54 

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.