Miranda IM

Results 1 to 6 of 6

Thread: "/FileAllow" and "/SendFile"

  1. #1

    "/FileAllow" and "/SendFile"

    I am writing a plugin (on Delphi XE) that will send and receive files.

    Here is the code that sends the file:
    s: = 'C:\test\Project.exe';
    a: = PAnsiChar (AnSiString (s));
    CallContactService (wParam, PSS_FILE, LongInt (PAnsiChar ('MyDescription')), LongInt (@ a));


    This code works correctly with the ICQ protocol, but not working properly with the Jabber protocol. Why?

    How do I write a procedure which accept incoming file, and put it in 'C: \ MyReceivedFiles \'.

    Here is sample code:
    CallContactService (wParam, PSS_FILEALLOW, ??????, LongInt (PAnsiChar ('C: \ MyReceivedFiles \')));

    What should I specify as a parameter "??????". He is waiting for some political structure HTRANSFER (wParam: HTRANSFER), but I do not know how to get it.
    About this parameter is known:
    {The format is:
    hTransfer: DWORD
    filename (s), description: ASCIIZ}

    I can get the filename (for example "Project.exe",) I get a description (for example "MyDescription"), but I don't know how to send them to the procedure.

  2. #2
    Join Date
    June 2005
    Posts
    11,839
    HTRANSFER is transmitted in ACKTYPE_FILE broadcast, PSS_FILEALLOW should be called only response to the broadcast. Core already does this, so your plugin will interfere with Miranda core.
    Last edited by borkra; 1 Nov 2011 at 10:48 AM.

  3. #3

    borkra

    "PSS_FILEALLOW, is for Miranda internal use only. Plugins should never call it. It's not a way to initiate file transfer. The fact that it works with ICQ is pure coincidence, it should not" - no, no, you don't understand me correctly.
    CallContactService (wParam, PSS_FILE, LongInt (PAnsiChar ('MyDescription')), LongInt (@ a)); - This code works correctly with the ICQ protocol, but not working properly with the Jabber protocol. Why?

    Quote Originally Posted by borkra View Post
    HTRANSFER is transmitted in ACKTYPE_FILE broadcast, PSS_FILEALLOW should be called only response to the broadcast. Core already does this, so your plugin will interfere with Miranda core.
    And now, I don't understand you. I want to write a plugin that will automatically agree to accept a file of contacts. How do I make this better? Could you give me a small example that will do it?

  4. #4
    Join Date
    June 2005
    Posts
    11,839
    Quote Originally Posted by FeLDMaRShaL View Post
    I want to write a plugin that will automatically agree to accept a file of contacts. How do I make this better? Could you give me a small example that will do it?
    Miranda already have an option to do that ... (Options | Events | File Transfers | Auto accept incoming files from people on my contact list) Why do you need to write a plugin?

  5. #5
    Quote Originally Posted by borkra View Post
    Miranda already have an option to do that ... (Options | Events | File Transfers | Auto accept incoming files from people on my contact list) Why do you need to write a plugin?
    I need it to automatically accept files are not on all the contacts, but only a few or automatically accept files only on a specific protocol (ICQ, but not Jabber)...

    In file resource.rc I found the standard form "IDD_FILERECV". I need to give consent to receive a file from a contact without calling this form.

  6. #6
    Join Date
    June 2005
    Posts
    11,839
    You cannot. You can create patch for core to do that, but not with the plugin.
    Last edited by borkra; 1 Nov 2011 at 1:15 PM.

Similar Threads

  1. [resolved] "tool style" and "minimize to tray" checkboxes are shadowed
    By mark.h in forum Technical Support
    Replies: 5
    Last Post: 4 Jun 2008, 9:40 PM
  2. Replies: 1
    Last Post: 15 Apr 2008, 8:18 PM
  3. "Fixxxer's fixations" and "UUID - to be or not to be..."
    By buggled in forum General Discussion
    Replies: 60
    Last Post: 22 Feb 2008, 5:17 PM
  4. "Merged contacts" and "General"
    By Morgensonne in forum Technical Support
    Replies: 1
    Last Post: 24 Mar 2006, 9:31 PM
  5. ICQ part: "Default network" and "server name"
    By thoste in forum Technical Support
    Replies: 3
    Last Post: 18 Dec 2005, 1:11 AM

Bookmarks

Posting Permissions

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