Click here to Skip to main content
15,886,799 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Don Guy8-Sep-13 9:31
Don Guy8-Sep-13 9:31 
GeneralRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Richard Andrew x648-Sep-13 14:12
professionalRichard Andrew x648-Sep-13 14:12 
AnswerRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
SoMad8-Sep-13 15:38
professionalSoMad8-Sep-13 15:38 
QuestionReading Image (JPG) file as Binary to CString Pin
Don Guy6-Sep-13 6:03
Don Guy6-Sep-13 6:03 
AnswerRe: Reading Image (JPG) file as Binary to CString Pin
jeron16-Sep-13 6:09
jeron16-Sep-13 6:09 
QuestionRe: Reading Image (JPG) file as Binary to CString Pin
David Crow6-Sep-13 6:12
David Crow6-Sep-13 6:12 
AnswerRe: Reading Image (JPG) file as Binary to CString Pin
Richard MacCutchan6-Sep-13 6:35
mveRichard MacCutchan6-Sep-13 6:35 
GeneralRe: Reading Image (JPG) file as Binary to CString Pin
Don Guy6-Sep-13 6:44
Don Guy6-Sep-13 6:44 
Let me explain the problem a little more deeper.

I am trying to call a JavaScript (JS) function in a HTML page and then want to pass the binary date. The C++ function that calls the JS is given below.

bool CallJavaScript(const CString strFunc,CComVariant* pVarResult);

The 1st argument is the JS Function Name and 2nd is the one to pass the Binary Data. 1st argument works fine as i am able to call the JS fucntion called "LoadImage" without any problem. Problem is with 2nd argument that's supposed to take the Binary data of the JPG file.

If i try to pass a std::Vector or std::string then it will give me an error.

But it's happy if i pass CString. But then with CString there's a problem with NULL characters.

Actually my plan is to pass the binary of a JPG to a JS function and let it display the JPG in the HTML page.

Is there a better way of doing this?

Can i typecast a Vector or std::string to a CComVariant*?

Please help.
Thanks
GeneralRe: Reading Image (JPG) file as Binary to CString Pin
Jochen Arndt6-Sep-13 7:05
professionalJochen Arndt6-Sep-13 7:05 
QuestionRe: Reading Image (JPG) file as Binary to CString Pin
David Crow6-Sep-13 17:23
David Crow6-Sep-13 17:23 
GeneralRe: Reading Image (JPG) file as Binary to CString Pin
Richard MacCutchan6-Sep-13 22:44
mveRichard MacCutchan6-Sep-13 22:44 
Questionffmpeg images to video using C++ Pin
CodingHell6-Sep-13 1:13
CodingHell6-Sep-13 1:13 
Question1-Can I reverse drawtext function? 2-How to know the length of data in your app Pin
JoneLe865-Sep-13 21:46
JoneLe865-Sep-13 21:46 
AnswerRe: 1-Can I reverse drawtext function? 2-How to know the length of data in your app Pin
Richard MacCutchan5-Sep-13 22:09
mveRichard MacCutchan5-Sep-13 22:09 
GeneralRe: 1-Can I reverse drawtext function? 2-How to know the length of data in your app Pin
JoneLe865-Sep-13 22:14
JoneLe865-Sep-13 22:14 
GeneralRe: 1-Can I reverse drawtext function? 2-How to know the length of data in your app Pin
Richard MacCutchan5-Sep-13 22:29
mveRichard MacCutchan5-Sep-13 22:29 
QuestionHow to get text of special symbol font? Pin
yangdp15-Sep-13 18:07
yangdp15-Sep-13 18:07 
AnswerRe: How to get text of special symbol font? Pin
JoneLe865-Sep-13 21:51
JoneLe865-Sep-13 21:51 
AnswerRe: How to get text of special symbol font? Pin
Richard MacCutchan5-Sep-13 22:05
mveRichard MacCutchan5-Sep-13 22:05 
GeneralRe: How to get text of special symbol font? Pin
yangdp15-Sep-13 22:54
yangdp15-Sep-13 22:54 
GeneralRe: How to get text of special symbol font? Pin
Richard MacCutchan5-Sep-13 23:40
mveRichard MacCutchan5-Sep-13 23:40 
QuestionConverting std::vector<BYTE> to CString Pin
Don Guy5-Sep-13 13:13
Don Guy5-Sep-13 13:13 
AnswerRe: Converting std::vector<BYTE> to CString Pin
Richard MacCutchan5-Sep-13 22:03
mveRichard MacCutchan5-Sep-13 22:03 
QuestionEnsuring the continuous physical allocation(storage) of a file in Hard disk Pin
VCSharp0075-Sep-13 8:41
VCSharp0075-Sep-13 8:41 
AnswerRe: Ensuring the continuous physical allocation(storage) of a file in Hard disk Pin
jschell5-Sep-13 9:23
jschell5-Sep-13 9:23 

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.