Click here to Skip to main content
15,888,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: 0xC0000138: Ordinal Not Found Pin
Randor 5-Jun-10 9:24
professional Randor 5-Jun-10 9:24 
QuestionHow to covert CString to LPCSTR ? Pin
wangningyu4-Jun-10 20:46
wangningyu4-Jun-10 20:46 
AnswerRe: How to covert CString to LPCSTR ? Pin
Richard MacCutchan4-Jun-10 21:19
mveRichard MacCutchan4-Jun-10 21:19 
GeneralRe: How to covert CString to LPCSTR ? Pin
wangningyu4-Jun-10 21:23
wangningyu4-Jun-10 21:23 
GeneralRe: How to covert CString to LPCSTR ? Pin
Richard MacCutchan4-Jun-10 22:11
mveRichard MacCutchan4-Jun-10 22:11 
AnswerRe: How to covert CString to LPCSTR ? Pin
Cedric Moonen4-Jun-10 21:28
Cedric Moonen4-Jun-10 21:28 
AnswerRe: How to covert CString to LPCSTR ? Pin
Aescleal4-Jun-10 23:19
Aescleal4-Jun-10 23:19 
Questionmessin with javascript Pin
csrss4-Jun-10 14:31
csrss4-Jun-10 14:31 
OK, this is basically algorithm related question and not the code.
Dunno if that is the correct section to post this but i'll try my luck Wink | ;)
So, the thing i am trying to do is to parse | interpret JS - and i am pretty new to this.
I just need your advice if i am on a good way. Lets say we have 1 .js file with a function:

function concat_text(some_input_param){<br />
var value = "input text is: ";<br />
var output = value + some_input_param;<br />
return output;<br />
}


silly function. And its saved in a file silly.js
Next, in our index.html we have the following :
<script src="silly.js"></script><br />
<script><br />
var result = concat_text("some test text");<br />
document.write(result);<br />
</script>


Easy right? Ok, so what am i doing now? (all coding done with [C] btw)
1. getting first script source path (for ex. localhost/silly.js)
2. fetching this file (silly.js) content into predefined buffer for JS
3. next fetching second script source (between tags) and appending it to my JS buffer
4. define document.write function and pass the definition into JS interpreter
(in this case as all i need is to get output i can easily even skip that part
and just return the result into interpreter output buffer)
5. pass JS buffer into JS interpreter (i am working with google's V8)
6. .. and just get the result

Is it the right way? Or maybe there are different and more sufficient ways of doing it?
Like, there is no problem when we have a JS script on just one page and there no references
to another JS file, but i am thinking - how about for example, if there is ref to JQuery?
Fetching all its content - scary thing - it so big Big Grin | :-D I am just pretty new to all this JS parsing stuff
and need someones advice.
Thanks in advance.
<div class="signature">011011010110000101100011011010000110100101101110
0110010101110011</div>
AnswerRe: messin with javascript Pin
Dr.Walt Fair, PE4-Jun-10 15:46
professionalDr.Walt Fair, PE4-Jun-10 15:46 
GeneralRe: messin with javascript Pin
csrss4-Jun-10 16:56
csrss4-Jun-10 16:56 
GeneralRe: messin with javascript Pin
Richard MacCutchan4-Jun-10 21:22
mveRichard MacCutchan4-Jun-10 21:22 
GeneralRe: messin with javascript Pin
csrss4-Jun-10 22:43
csrss4-Jun-10 22:43 
GeneralRe: messin with javascript Pin
Aescleal4-Jun-10 23:12
Aescleal4-Jun-10 23:12 
GeneralRe: messin with javascript Pin
Richard MacCutchan4-Jun-10 23:37
mveRichard MacCutchan4-Jun-10 23:37 
GeneralRe: messin with javascript Pin
Richard MacCutchan4-Jun-10 23:36
mveRichard MacCutchan4-Jun-10 23:36 
GeneralRe: messin with javascript Pin
csrss4-Jun-10 23:47
csrss4-Jun-10 23:47 
GeneralRe: messin with javascript Pin
Richard MacCutchan5-Jun-10 0:09
mveRichard MacCutchan5-Jun-10 0:09 
GeneralRe: messin with javascript Pin
Dr.Walt Fair, PE5-Jun-10 17:54
professionalDr.Walt Fair, PE5-Jun-10 17:54 
AnswerRe: messin with javascript Pin
David Crow7-Jun-10 4:25
David Crow7-Jun-10 4:25 
QuestionLoadLibrary() loads a driver ?! Pin
Green Fuze4-Jun-10 14:17
Green Fuze4-Jun-10 14:17 
AnswerRe: LoadLibrary() loads a driver ?! Pin
Randor 4-Jun-10 17:15
professional Randor 4-Jun-10 17:15 
GeneralRe: LoadLibrary() loads a driver ?! Pin
Green Fuze4-Jun-10 20:31
Green Fuze4-Jun-10 20:31 
Questionvector class memory usage [modified] Pin
James_7224-Jun-10 7:06
James_7224-Jun-10 7:06 
AnswerRe: vector class memory usage Pin
Cedric Moonen4-Jun-10 7:45
Cedric Moonen4-Jun-10 7:45 
QuestionRe: vector class memory usage Pin
Maximilien4-Jun-10 8:32
Maximilien4-Jun-10 8:32 

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.