Jump to content

dllcall with non Microsoft dll


pcjogi
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • Administrators

$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 by Jon
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...