Click here to Skip to main content
15,927,127 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalinclude file problems with dbfdef.h Pin
BlackDice19-Mar-04 8:21
BlackDice19-Mar-04 8:21 
Generalme again Pin
BlackDice19-Mar-04 8:44
BlackDice19-Mar-04 8:44 
GeneralRe: me again Pin
Prakash Nadar19-Mar-04 15:13
Prakash Nadar19-Mar-04 15:13 
General_msize and operator new[] Pin
Nemanja Trifunovic19-Mar-04 8:17
Nemanja Trifunovic19-Mar-04 8:17 
GeneralRe: _msize and operator new[] Pin
Jörgen Sigvardsson19-Mar-04 14:07
Jörgen Sigvardsson19-Mar-04 14:07 
GeneralRe: _msize and operator new[] Pin
Nemanja Trifunovic20-Mar-04 8:58
Nemanja Trifunovic20-Mar-04 8:58 
GeneralRe: _msize and operator new[] Pin
Jörgen Sigvardsson20-Mar-04 22:48
Jörgen Sigvardsson20-Mar-04 22:48 
Generalunsigned char, char, CString Pin
Anonymous19-Mar-04 7:49
Anonymous19-Mar-04 7:49 
Hi!

I have to encrypt a string of text. My text is a CString. The function I call is this:

encrypt(const unsigned char* in, unsigned char* out, size_t n)


I have this:

CString strOutput, strInput = "hello world";
int len = strInput.GetLength();
unsigned char *buf = new unsigned char[len]; 
memset(buf, 0, len);
strcpy(buf, strInput); // !!!! This does not compile
encrypt(buf, buf, len);
strOutput = buf;
delete [] buf;


Can anyone tell me how to convert from a CString to a unsigned char *?
GeneralRe: unsigned char, char, CString Pin
BlackDice19-Mar-04 8:16
BlackDice19-Mar-04 8:16 
GeneralRe: unsigned char, char, CString Pin
Mukkie19-Mar-04 21:19
Mukkie19-Mar-04 21:19 
GeneralPlaying .WAV Pin
mavgoose19-Mar-04 7:29
mavgoose19-Mar-04 7:29 
GeneralRe: Playing .WAV Pin
Ravi Bhavnani19-Mar-04 8:03
professionalRavi Bhavnani19-Mar-04 8:03 
GeneralRe: Playing .WAV Pin
MeterMan22-Mar-04 14:33
MeterMan22-Mar-04 14:33 
GeneralControlling keyboard in CFormView Pin
doctorpi19-Mar-04 7:11
doctorpi19-Mar-04 7:11 
GeneralTime.h help! Pin
modeonetwo19-Mar-04 6:47
modeonetwo19-Mar-04 6:47 
GeneralRe: Time.h help! Pin
Chernobog119-Mar-04 7:08
Chernobog119-Mar-04 7:08 
GeneralCPrintDialog as a child Pin
Jason Carter19-Mar-04 6:37
Jason Carter19-Mar-04 6:37 
GeneralSet coluor on button Pin
Best Friend19-Mar-04 5:36
Best Friend19-Mar-04 5:36 
GeneralSet edit box text colour Pin
Caoimh19-Mar-04 5:24
Caoimh19-Mar-04 5:24 
GeneralRe: Set edit box text colour Pin
RChin19-Mar-04 5:46
RChin19-Mar-04 5:46 
GeneralRe: Set edit box text colour Pin
MeterMan22-Mar-04 16:26
MeterMan22-Mar-04 16:26 
GeneralRe: Set edit box text colour Pin
RChin22-Mar-04 23:32
RChin22-Mar-04 23:32 
GeneralDisable a Dialog Button Pin
johnsb219-Mar-04 4:33
johnsb219-Mar-04 4:33 
GeneralRe: Disable a Dialog Button Pin
Maximilien19-Mar-04 4:52
Maximilien19-Mar-04 4:52 
GeneralRe: Disable a Dialog Button Pin
Best Friend19-Mar-04 5:42
Best Friend19-Mar-04 5:42 

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.