Subj : Help translating C To : netscape.public.mozilla.jseng From : "Sterling Bates" Date : Sat Jul 12 2003 05:31 pm I'm trying to translate the following code to Delphi: /* Start */ #define JSVAL_SETTAG(v,t) ((v) | (t)) #define STRING_TO_JSVAL(str) JSVAL_SETTAG((jsval)(str), JSVAL_STRING) JSString * mystr; jsval myjsval; mystr = JS_NewStringCopyZ("test string"); myjsval = STRING_TO_JSVAL(mystr); /* End */ This is to let a string be passed through a jsval array to a function call. The problem is that, relative to mystr, I don't know which byte JSVAL_SETTAG is modifying with JSVAL_STRING. I've tried the following in Delphi, but get an access violation reading address 0: newjsval := jsval(@jsstr); newjsval := newjsval OR JSVAL_STRING; Thanks for any help you can provide, Sterling .