pcjogi Posted November 19, 2004 Posted November 19, 2004 Hi, sorry for my first question, but I am not familiar with dllcalls. How do I do a dllcall with a dll witch has the following functions. I tried something like that: $result=DllCall ( "C:\Programme\RSA Security\RSA SecurID Software Token\stauto32.dll", "int", "OpenTokenService") but didn´t had success. result was never a handle not zero. Thanks int WINAPI OpenTokenService(LPLONG pServiceHandle); pServiceHandle [out] Pointer to a LONG that will receive the handle of the token service started if the function succeeds. This handle must be used in all future calls to the token service. If another program or process is using the DLL, it will be assigned its own handle that will allow parallel use of the token service. int WINAPI GetPasscode(LONG lServiceHandle, LPCSTR pPin, LPSTR pPasscode, LPSTR pNextPasscode, LPSTR pTokencode, LPSTR pNextTokencode); Parameters lServiceHandle [in] Handle that identifies the instance of the token service. pPin [in] Pointer to a constant null-terminated string that contains the PIN to be used for generating PASSCODEs. pPasscode [out] Pointer to a string that will receive the current PASSCODE of the default token. pNextPasscode [out] Pointer to a string that will receive the next PASSCODE of the default token. pTokencode [out] Pointer to a string that will receive the current tokencode of the default token. pNextTokencode [out] Pointer to a string that will receive the next tokencode of the default token.
Administrators Jon Posted November 19, 2004 Administrators Posted November 19, 2004 (edited) $result=DllCall ( "C:\Programme\RSA Security\RSA SecurID Software Token\stauto32.dll", "int", "OpenTokenService", "long_ptr", 0) $result will be an array, the return value is in $result[0] and $result[1] will contain the pServiceHandle. Edited November 19, 2004 by Jon
pcjogi Posted November 20, 2004 Author Posted November 20, 2004 Thanks for your help, but I still get 0 (zero) in the variable result back. Any sugestions?
Administrators Jon Posted November 20, 2004 Administrators Posted November 20, 2004 Thanks for your help, but I still get 0 (zero) in the variable result back. Any sugestions?You are testing $result[0] and not $result aren't you?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now