Click here to Skip to main content
       

JavaScript

 
AnswerRe: javascript _> activex passing by reference Pinmembertwseitex16-Sep-12 2:09 
GeneralRe: javascript _> activex passing by reference PinmemberJohan000117-Sep-12 1:46 
GeneralRe: javascript _> activex passing by reference Pinmembertwseitex17-Sep-12 9:30 
GeneralRe: javascript _> activex passing by reference PinmemberJohan000117-Sep-12 22:38 
<b>CSDCtrlClass.GetMemoryBuffer("BMP", buf);

what returns this function ?

var ReturnValue=CSDCtrlClass.GetMemoryBuffer("BMP", buf);

or

var buf = new Array(200000); // e.g. global var</b>
 
THE RETURN VALUE OF THE FUNCTION   IS   ZERO   , WHICH INDICATES THAT THE FUNCTION EXECUTED SUCCESSFULLY.
HOWEVER THE FUNCTION HAS 2 ARGUMENTS   1. "BMP" which is   an input string   and correct!
                                                         2. "buf" which is a return   object of binary bytes
                                                         This is   the array that is empty all the time.
                                                         It should be populated a block of binary data
                                                         representing a bitmap image( approx 154k), after   the function is called.
 

 

 
PS   when calling this function in   c#( windows application)   the 'buf'      is declared as   Object   and passed   by reference i.e.
 
<pre lang="c#">object   buf   = null;
 
CSDCtrlClassFPLite.GetMemoryBuffer("BMP", ref buf);</pre>
 
IT WORKS CORRECTLY AND RETURNS   THE   BINARY DATA, MY QUESTION IS WHY DOES IT NOT WORK IN   JAVASCRIPT FUNCTION, AND   HOW SHOULD I DECLARE THE 'buf'.
GeneralRe: javascript _> activex passing by reference Pinmembertwseitex18-Sep-12 9:58 
GeneralRe: javascript _> activex passing by reference PinmemberJohan000119-Sep-12 0:28 
GeneralRe: javascript _> activex passing by reference PinmemberJohan000117-Sep-12 2:03 
AnswerRe: javascript _> activex passing by reference [modified] PinmvpManfred R. Bihy19-Sep-12 2:02 
GeneralRe: javascript _> activex passing by reference PinmemberJohan000119-Sep-12 3:02 
GeneralRe: javascript _> activex passing by reference PinmvpManfred R. Bihy19-Sep-12 3:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.1411019.1 | Last Updated 19 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid