[email protected] wrote:
NetWin Support <[EMAIL PROTECTED]> wrote:

[email protected] wrote:


I am trying to write an external dll for authentication..

Get an error in dnews.log:

19 11:01:05 1:info: External lookup
19 11:01:05 1:info: Looking up user (oskar) via external routine
19 11:01:05 1:error: Cannot load (c:\dnews\dnewsauth.dll) err=126

the dll is existing, calling the func dnewsauth in the dll from a test 
executable

works.

Any hints what this err 126 might tell?


Error 126 = Module not found.  The call that just failed is

        LoadLibrary("c:\dnews\dnewsauth.dll");
Here are the relevant source lines:
        dlx_lib = LoadLibrary(libname);
        if (dlx_lib==NULL) {emsg("Cannot load (%s) 
err=%d\n",libname,GetLastError());
return FALSE;}
So, I would strongly suspect that file doesn't exist, are you sure it's there
?

                ChrisP.




FUNC start
LOCAL hLib AS PTR
        
hLib := LoadLibrary( String2Psz( "c:\dnews\dnewsauth.dll" ))
        IF hLib # NULL_PTR
                ?? 'OK'
                wait
        ELSE
                ?? 'did not load'
        wait
    ENDIF
        FreeLibrary( hLib )     
        
RETURN 0

My testcode returns OK ...and I am executing the testcode in the c:\dnews 
directory

In case you would like the dll to test, no problem. Its tiny


I wonder if your module tries to load some 'other' module/dll that it can't 
find. Dnews executes
from tye 'system32' directory so try running your test app there.

If that doesn't solve the problem then send me your dll and I'll give it a try.
send to, [EMAIL PROTECTED]
        ChrisP.


Reply via email to