Re: [pcre-dev] wrong results - dynamic library on win32

Top Page
Delete this message
Author: Sheri
Date:  
To: pcre-dev@exim.org
Subject: Re: [pcre-dev] wrong results - dynamic library on win32
Gernot Frisch wrote:
> Hi,
>
> I'm going insane.
>
> I tried the DLL with LoadLobrary/GetProcAddress like this:
>
> int output[66];
>     memset(output, 0xff, sizeof(output));
> const char* error;
> int erroffset;
>     int ierr = 0;
>     pcre* pRE = pcre_compile2("(<[^>]+>)", 0
>                                 , &ierr, &error
>                                 , &erroffset, NULL);
>     if(pRE)
>     {
>         int output[66];
>         const char* pSubj = "28:Sep:2009 xxx@???"
>                                 " 33 44 45 56 <START>"
>                                 " <HEAD> </HEAD> </START>";
>         int ok = pcre_exec(pRE, 0
>                     , pSubj, (int)strlen(pSubj)
>                     , 0, 0
>                     , output, 66);
>         // ok==2; output is:
>         // {36, 43, 36, 43, -1, -1, -1, -1, .... }
>     }

>
>
> What did I do wrong? I built the latest version with mingw.
>
> Thank you,
> -Gernot
>
>
>
>
>
>
>

How does it differ from expectation?