Forum

Page 5 of 5 FirstFirst ... 345
Results 61 to 66 of 66
  1. #61
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    I did include plugin.h into my plugin.c.
    Also, I added _WIN32 to my Preprocessor definitions.
    Compiled, still not working.
    It still says it could not find the necessary functions...

    Maybe I should upload my whole VS project to look over?
    I just can't seem to find whats wrong...
    Last edited by Jhhhj_original; February 28th, 2017 at 10:58 AM.

  2. #62
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Alright, got it working now.

    Only, the client crashes on the following code:
    Code:
    int ts3plugin_onTextMessageEvent(uint64 serverConnectionHandlerID, anyID targetMode, anyID toID, anyID fromID, const char* fromName, const char* fromUniqueIdentifier, const char* message, int ffIgnored) {
    	anyID res;
    	uint64 chid = 14588;
    	ts3Functions.getClientID(serverConnectionHandlerID, &res);
    
    	ts3Functions.requestClientMove(serverConnectionHandlerID, &res, chid, NULL, 0);
    	return 0;
    }
    I just took the pre-made plugin.h / plugin.c from TS and altered it in a way that I can use it (deleted half the exports, deleted all not needed function bodys)
    Last edited by Jhhhj_original; March 1st, 2017 at 12:04 PM.

  3. #63
    Join Date
    September 2012
    Posts
    6,080
    Quote Originally Posted by Jhhhj_original View Post
    Alright, got it working now.

    Only, the client crashes on that
    Code:
    int ts3plugin_onTextMessageEvent(uint64 serverConnectionHandlerID, anyID targetMode, anyID toID, anyID fromID, const char* fromName, const char* fromUniqueIdentifier, const char* message, int ffIgnored) {
    	anyID res;
    	uint64 chid = 14588;
    	ts3Functions.getClientID(serverConnectionHandlerID, &res);
    
    	ts3Functions.requestClientMove(serverConnectionHandlerID, &res, chid, NULL, 0);
    	return 0;
    }
    I just took the pre-made plugin.h / plugin.c from TS and altered it in a way that I can use it (deleted half the exports, ...)
    That shouldn't even compile in the first place, as you're attempting to pass a pointer to a parameter that requires an unsigned short.
    In addition you're passing NULL as the channel password, which will cause a crash. You need to specify the channel password there, if there isn't any you need to pass an empty string.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  4. #64
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Ooh yea, just saw. I tryed to initialize a pointer with a random address - Not a good idea^^
    And the NULL was probably the reason it crashed then... (After testing: Yes, it was.)
    But now I seem to have enough knowledge to actually create my plugin.
    Thanks all!
    Last edited by Jhhhj_original; March 1st, 2017 at 04:15 PM.

  5. #65
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Aaaalright...
    This might be the wrong forum, but I can't really find it anywhere else...

    How can I export symbols from a C# DLL?
    Like, I've looked into the module UnmanagedExports, but it does not install properly, no matter which way I do it.
    Code:
    install-package : Das Paket "UnmanagedExports 1.2.7" konnte nicht installiert werden. Sie versuchen, dieses Paket in ein Projekt zu installieren, das sich auf 
    "native,Version=v0.0" bezieht, das Paket enthält aber keine Assemblyverweise oder Inhaltsdateien, die mit diesem Framework kompatibel sind. Wenden Sie sich an den 
    Paketersteller, um weitere Informationen zu erhalten.
    Translated:
    Code:
    install-package : The package "UnmanagedExports 1.2.7" could not be installed. You are trying to install this
    package into a project that is based on "native,Version=v0.0" but the package does not contain any assemblyreferences
    or contentfiles, that are compatible with this framework.
    Please contact the Packagecreator for more information.
    So...
    Since I have never been so low-level in programming, can anyone help me on how to export symbols from a C# DLL?
    I am working on a pseudo-wrapper for the TS3 API. (Works by forwarding functions from a C DLL to a C# DLL by calling the functions in C#, now I have to do the same in return, by calling C# functions in C.)

    Any ideas on how to achieve that? (Or how to make UnmanagedExports work? Since I haven't found anything helpful really to both topics...)

  6. #66
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Nevermind, I think I have found a solution...
    I am just using C++/CLI.
    I don't really know C++, but I'll just use the C side of it.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Creating plugin Java
    By Retzugil in forum Client Plugins / Lua Scripts
    Replies: 1
    Last Post: May 15th, 2014, 08:23 AM
  2. Creating my first TS3 plugin and it won't load
    By DrPastah in forum Client Plugins / Lua Scripts
    Replies: 5
    Last Post: March 12th, 2014, 12:14 PM
  3. Problems while creating a plugin..
    By Loreman in forum General Questions
    Replies: 0
    Last Post: October 6th, 2013, 04:45 PM
  4. Creating complex GUI with Plugin
    By TigerSnail in forum General Questions
    Replies: 3
    Last Post: May 23rd, 2013, 09:43 AM

Tags for this Thread

Posting Permissions

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