Jump to content

Recommended Posts

Posted (edited)

Hello, I am working on little TeamSpeak2 plugin that uses their TSRemote.dll

It has function 'tsrGetUserInfo' which returns TS2 Users info (his flags, channel, etc.)

but it requires a pointer to a Struct of 38 elements!

Actually it is working for me with only 16 elements, but then I dont receive all of the informations

the function would normally return. If I specify more elements, AutoIt crashes with 'Dont send' dialog.

Did I do something wrong? Or is it known autoit limitation? Is it problem of the dll?

Is there something I can do to fix this problem?

Thanx for your help.

$struct = DllStructCreate('int PlayerId;int ChannelID;char[4];char[4];char[4];char[4];char[4];char[4];char[4];char[4];int PlayerPrivileges;int PlayerFlags;int;int;int;int')
$pointer = DllStructGetPtr($struct)
Edited by Markos
Posted

Hi!

I would love to help but it's kinda hard without documentation :)

You quite didnt read my post. Is it even POSSIBLE to create struct with more than 16 elements?

Posted (edited)

You quite didnt read my post. Is it even POSSIBLE to create struct with more than 16 elements?

I'm pretty sure I have created structs with way more than 16 elements. Some of the structs on msdn are really big!

And to back it up:

$str=""
For $i=0 To 100
    $str&="int;"
Next
$struct=DllStructCreate($str)

If @error Then MsgBox(0,"Error","Couldn't create struct")

For $i=1 To 100
    DllStructSetData($struct,$i,$i-1)
Next

For $i=1 To 100
    ConsoleWrite("Element "&$i&": "&DllStructGetData($struct,$i)&@CRLF)
Next
Edited by monoceres

Broken link? PM me and I'll send you the file!

  • Developers
Posted

Have you done a search for 'tsrGetUserInfo' in this forum?

I had a couple of hits and the structures they created are different than you do so my guess is that you need to check the structure.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

@Jos

Yes I searched that. Their structure didnt work for me.

But I have fixed it now, It must have 38 elements but I missed 1 "int" so i had 37.

That caused the autoIt crash.

Thanx for your help anyway

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
  • Recently Browsing   0 members

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