Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Results 1 to 5 of 5
  1. #1
    Join Date
    July 2011
    Posts
    3

    How exactly are you using this in C#?

    So a quick question that can hopefully get me going.

    I'm having a bit of trouble in understanding exactly how you are using this in C#. I guess I should mention that I have been using C# for a few years now, but have never, ever, ever even touched a console application, nor have I ever used unmanaged dlls.

    What I wanted to end up with was a merger into a WPF program that i have been writing, but I keep getting unmatched PInvoke signatures. I'm guessing that is is because when converting from a console app to a WPF I have to remove the "string[] args", so something is not getting passed correctly.

    There is something that I am missing somewhere, or I am going about it all wrong, any guidance in getting this to somewhat work would be great.

    Thanks.

  2. #2
    Join Date
    July 2011
    Posts
    3
    So here is a quick overview of what I did.

    Created a new WPF document, added a button to it. Then I created the following files.

    callbacks.cs
    client_publicdefinitions
    public_definitions
    public_errors
    ts3client - new class (contains the dll imports)

    I then i copied over all the dlls and it's dependencies.

    Then for the button press code I put the old main(string[] args) code. Granted I knew this would not work right off, i was hoping I would get some kind of better error than to say "mismatched" call.

  3. #3
    Join Date
    June 2008
    Posts
    18,513
    We deliver some examples in our client sdk.

    Please download the TeamSpeak 3 SDK here and open
    s3_sdk_3.0.0-beta6\examples\csharp
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  4. #4
    Join Date
    July 2011
    Posts
    3
    Yeah, I have that, that's where I got the Main(string[] args) info from. I am apparently missing something on getting this into a winform.

  5. #5
    Join Date
    January 2008
    Location
    France, Lyon
    Posts
    8
    Hi,

    It doesn't matter if it is WPF, Winforms, or Console.

    I'm writing my own wrapper in C#. I have read SDK sample to start working, but today I have wrapper almost all SDK functions. Server is windows service, client is wpf, test is console.

    So what is your problem ?

    If I have understood, you want to take SDK's sample, and add code to see it in winform/WPF.

    If you use and IDE (VS2008/2010, SharpDevelop, MonoDevelop...) it is really easy.
    Create a Winform/WPF project, there will be a default form. Then you can add parts of the SDK sample to the code.
    Don't forget to copy s3_sdk_3.0.0-beta6\bin\*.dll to your project output directory (bin\Debug).

    And don't forget to check that your project compiles for the right plateform dll : x86 is for the 32bit TS dll

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •