"The data area passed to a system call is too small." With window.location.href and a custom URL protocol. RRS feed

  • Question

  • Hello,

    I have created a URL Protocol (cfrmisplugin://) as directed by MSDN which points to an application on my local machine.  See this article here: http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85)

    I am then building a URL which I then navigate to using JavaScript.  Essentially the URL contains information to be passed to the client application (URL handler) which is then processed and in turn launches Microsoft Word.  The code below demonstrates my URL building function (using ExtJS) and then calling window.location.href to carry out the launching:

    launchLetter: function (LC, ST, SF, TK, UH, TA) {
            var loca = Ext.urlEncode({
                AC: 'LETT',
                LC: LC,
                CS: txtCS.getValue(),
                ST: ST,
                SF: SF,
                TK: TK,
                LW: txtLW.getValue(),
                HP: txtHP.getValue(),
                LH: txtLH.getValue(),
                LP: txtLP.getValue(),
                UH: Ext.value(UH, false),
                TA: Ext.value(TA, '')
            }, 'CFRMISPlugin:IE=' + (Ext.isIE ? 'true' : 'false')
            window.location.href = loca;

    This produces a URL as shown below:


    Now, the URL above is 1174 characters long and produces the following error on the window.location.href line:

    SCRIPT122: The data area passed to a system call is too small.

    If I use a shorter URL then the call appears to work fine.  The only information I can find relating to the length of usable URLs is 2083 characters, referencing:


    and interestingly the Win32Exception detailed on this page:


    I see a lot of information relating to this error on the Internet but never a solution.  I have disabled Script Debugging and the likes within Internet Explorer as suggested by some but this has no effect.  I am clearly reaching a limit with a component somewhere but don't know why.  I have also tested with a URL that is 'cfrmisplugin://AAAAAAAAAA.....' to see if it was a specific character in my URL but this is not the case.  I have worked out that it falls over when the character length is around 512.

    Any help would be much appreciated.

    • Edited by PsyVision Monday, May 14, 2012 3:44 PM
    Monday, May 14, 2012 3:12 PM


All replies

  • http://




    missing //

    the extjs forum is here http://www.sencha.com/forum/


    Tuesday, May 15, 2012 8:35 AM

    I have tried that previously with little success, I will carry out some further tests with slashes now.  Interestingly I found the following article which suggests a limit around where I am finding it!


    Tuesday, May 15, 2012 8:40 AM
  • the stackoverflow answer sounds reasonable.

    the query part of a uri must start with a ? also...


    Tuesday, May 15, 2012 10:06 AM
  • The link below details URL monikers:


    "A URL follows the syntax described in RFC 1738, which specifies a protocol scheme followed by a scheme-specific portion (<scheme><scheme-specific portion>). For example, in the URL http://www.microsoft.com/, "http" is the scheme and "//www.microsoft.com/" is the scheme-specific portion."

    Therefore, I should be able to use (and can) cfrmisplugin:whatever_text_here_in_whatever_format  as long as my <scheme-specific porition> isn't longer than the arbitrary undefined length allowed which appears to be around 508 characters.  For my purposes I think I will have to find a different method to carry out what I want to achieve thanks to yet another poor aspect of Internet Explorer - always causing workarounds.

    Tuesday, May 15, 2012 1:31 PM