1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How big is a plugin's parameter buffer?

Discussion in 'Plugins' started by vefatica, Sep 5, 2017.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,883
    Likes Received:
    29
    If I have
    Code:
    INT WINAPI f_PLUGIN( LPWSTR psz )
    how many WCHARs can I put in psz?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,806
    Likes Received:
    82
    32K bytes. That hasn't changed since plugins were introduced.
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,883
    Likes Received:
    29
    I'm playing with the MAPM API and running into a 16K limit somewhere. This is OK ...
    Code:
    v:\> echo %@fact[5015] | wc
      Lines   Words   Chars
          1       1   16384
    And the next one (5016) makes TCC disappear. f_FACT finishes off like this, where psz in the plugin's parameter buffer.
    Code:
           m_apm_factorial(f, n);
           CHAR *szResult = (CHAR*) AllocMem(32768);
           m_apm_to_integer_string(szResult, f);
           ASCIIToUnicode(szResult, psz, 32767);
           FreeMem(szResult);
    
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,883
    Likes Received:
    29
    Oh! You said bytes. Now I get it.
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,883
    Likes Received:
    29
    Did you increase this? Today I can write 32K WCHARs to it.
    Code:
    v:\> echo %@ipow[10 32765] | wc
      Lines   Words   Chars
          1       1   32768
     

Share This Page