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

Kezdőlap
Üzenet törlése
Szerző: Gernot Frisch
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] wrong results - dynamic library on win32

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