Subj : Still unsolved problem To : netscape.public.mozilla.jseng From : "Stu" Date : Tue Jun 03 2003 07:33 pm Lets try again with a bit more info.... Any help with this would be much appreciated, I have written a simple C function that opens a script with JS_CompileFile, Executes the script with JS_ExecuteScript then Calls a function with CallFunctionName. This function works successfully with a debug JS32.dll but when I use the release version of JS32.dll the compilefile and execute file are both successfull but the CallFunctionName fails with a 'ReferenceError host not defined'. I presume it means the 2nd param to the function i'm calling which is called host. I'm calling C functions from the script which have been passed to the Java interpreter via JS_DefineFunctions(). As i've mentioned this works fine with the Debug JS32.dll but not the release build. If I substitute the body of the function called with just a return 'Hello' it works fine with both the release and the debug. But as soon as I use the actual body I need it fails. Am I missing something in the way release JS32 dll calls functions from scripts? Both the js32.dll 's were created in the same way with MS visual studio 6.0. Any ideas? Do I need to declare something special in the release version to use CallFunctionName etc I'm also using JS_NewStringCopyZ and STRING_TO_JSVAL to get the parameters into a jsval could this be js32 build specific. I'm really stuck with this, I don't want to have to release my project with the debug JS32.dll!!, Thanks, Stu .