----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Server: JServ 1.1 
Web Server: Apache 1.3.9
OS: WinNT 4.0 SP6
JDK: 1.3beta


> I have a Servlet for user validation that call a JNI function to a DLL.
> The code of the function is:
> 
> JNIEXPORT jboolean JNICALL Java_com_sonae_auth_setUserLogon_setUserLogon
>   (JNIEnv *env, jobject obj, jstring vPath, jstring vUser, jstring vPass)
> {
>       HRESULT dso;
>       IADs *pADs = NULL;
>       bool result = false;
>       dso = CoInitialize(NULL);
>       if ( SUCCEEDED(dso) ) {
>               dso = ADsOpenObject((unsigned short
> *)env->GetStringChars(vPath, 0), (unsigned short
> *)env->GetStringChars(vUser, 0), (unsigned short
> *)env->GetStringChars(vPass, 0), ADS_SECURE_AUTHENTICATION, IID_IADs,
> (void**) &pADs);
>               if ( SUCCEEDED(dso) ) {
>                       pADs->Release();
>                       result = true;
>               };
>       CoUninitialize();
>       };
>       return result;
> };
> 
> This code is in a Win32 DLL and calls a function ADsOpenObject from ADSI
> SDK of Microsoft. The purpose is to validate a user against a NT Domain
> different from the domain where the JServ is running. The DLL is working
> outside the JServ. When I call this JNI function from inside a servlet it
> allways fails. I've checked that the HRESULT as allways the result
> -2147023677 -> 0x800704C3...
> 
> If you could help me I would appreciate very much...
> 
> Paulo Melo
> [EMAIL PROTECTED]


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to