Announcement

Collapse
No announcement yet.

Dll Link To Hotcomm Chat Room(s)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dll Link To Hotcomm Chat Room(s)

    Hi everybody,

    I am trying to write an *.efs script that posts realtime trades to hotcomm chat room. Everytime I run the script, eSignal crashes.

    Example of hotcomm HCUTIL.DLL INTERFACE:
    -------------------------------------------------------------------------------
    HCU_Connect
    Description Connect into session to start sending messages and receiving transcripts
    Parameters: int Snum – (IN) session number to connect
    Returns: BOOL – whether the session has been connected

    HCU_Disconnect
    Description: Disconnect from session and stop receiving transcripts
    Parameters: None
    Returns: BOOL - whether the session has been connected

    HCU_SendMessage
    Description: Send a message to the connected session and send to all users in the session
    as the current user
    Parameters: char* Text – (IN) pointer to the message to be sent
    Returns: BOOL – whether the message was sent

    HCU_RecvMessage
    Description: Receive any transcripts since the last retrieval or since connected
    Parameters: char* Text – (OUT) pointer to store the transcript
    int len – (IN) maximum length of transcript to store
    Returns: int – number of bytes stored
    ---------------------------------------------------------------------------

    EFS CODE AS FOLLOWS:

    // OPTIONAL DLL LINK TO HOTCOMM
    var hotcomm = new DLL("C:/Program Files/1stWORKS/hotCommLite/BIN/HCUtil");


    function preMain() {


    //AddFunction("refname", ReturnType, FunctionDefType, FunctionName, [Parameters…]);
    hotcomm.addFunction("Connect",DLL.INT,DLL.STDCALL, "HCU_Connect", DLL.INT);
    hotcomm.addFunction("Disconnect",DLL.INT,DLL.STDCA LL,"HCU_Connect");
    hotcomm.addFunction("SendMessage",DLL.INT,DLL.STDC ALL,"HCU_SendMessage", DLL.STRING);


    var room_number = 1;
    var hotcomm_ret1;

    hotcomm_ret1 = hotcomm.call("Connect",room_number);
    hotcomm_ret1 = hotcomm.call("SendMessage","THIS IS A TEST!");
    hotcomm_ret1 = hotcomm.call("Disconnect");

    -------------------------------------------------------------------------------

    Yet everytime I run this, crash,


    any suggestions ?????


    (thx in advance )

  • #2
    I'll give it a try...

    1. Why does your DLL statement line point to a NON-DLL file?? You sould include a ".dll" at the enf of the filename.

    1a. you might also place that dll into the c:\windows\system directory (in the PATH).

    if this does not work...

    2. verirfy the dll function definitiona are correct. Contact hotbox and verify the parameters of each function.

    That is about it. Your code is pretty clean right now.. so it should work.

    B
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      RE: DLL LINK TO HOTCOMM CHAT ROOMS

      Hi Doji333,

      yes, thx for the prompt reply


      a) I believe the path & file name is acceptable because efs syntax checker will complain not finding file if in error.

      b) which leaves me to verifying parameters passed and type of calling ( c/std etc) . I am in the process of checking with hotcomm.

      Thanks again !

      pvtrader

      (p.s. excuse my typing error for the I , efs function name for disconnect used is disconnect oops )

      Comment


      • #4
        RE: hotcomm dll link

        By the way,

        is there any possibility efs javascript is doing any name mangling on function names passed ?

        If so, any way to check what it may be ?

        pvtrader

        Comment


        • #5
          Hi Everyone,

          Attached is a hotcomm efs that simply posts text to a hotcomm chat room automatically via their dll. The script works with hotcomm standard not lite version.

          Running the syntax check under eSignal pushes text to the hotcomm chat session room asssigned "1" and any error messages posted via formula output window.

          The script works for a period of time via repetively hitting eSignals' efs syntax checker but eventually causes eSignal to crash.

          I have tried to get feedback from eSignal but they say they do not support efs.

          Is there anyone here who uses hotcomm & eSignal and sees the potential of such a utility ?

          Montoring charts, trading realtime and posting in chatroom(s) can be cumbersome, especially using the same keyboard. It would be nice to have the capability when a market related event occurs to have an eSignal efs post the information ( e.g. real time entry/exits on trades ) to a hotcomm chat room automatically.

          If anyone has any experience with eSignal efs using dll interface and debugging a crash, any help would be appreciatedly greatly!

          ( thanks in advance)

          pvtrader
          Attached Files

          Comment


          • #6
            I totally agree with the overwhelming part, to bad I am not using hotcomm. A developement of this type would be nice from somewhere.
            Excellent book on JavaScript for beginners

            Comment


            • #7
              Hello pvtrader,

              When the crash occurs, does your eSignal version generate a crash report? If so, be sure to submit it and include as much info as possible in the notes for the development team. Hopefully the report will help development narrow down the cause of the crash.

              I have one idea you could try. Instead of placing the hotcomm code in preMain(), move it to a separate defined function and create a text button to call it. Then apply it to a chart and click the button in the lower left corner of the chart to test the dll. See if that makes any difference.

              PHP Code:

              // OPTIONAL DLL LINK TO HOTCOMM
              var hotcomm = new DLL("C:/Program Files/1stWORKS/hotComm/BIN/HCUtil.dll"); 


              // assume dll resides in /windows/system32 folder 
              //var hotcomm = new DLL("HCUtil.dll");            
                 

              function preMain() {

              }

              function 
              testHotcomm() {
                  
              //AddFunction("refname", ReturnType, FunctionDefType, FunctionName, [Parameters…]);
                  
              hotcomm.addFunction("Connect",DLL.SHORT,DLL.STDCALL ,"HCU_Connect"DLL.INT); 
                  
              hotcomm.addFunction("SendMessage",DLL.SHORT,DLL.STDCALL ,"HCU_SendMessage"DLL.STRING);
                  
              hotcomm.addFunction("Disconnect",DLL.SHORT,DLL.STDCALL ,"HCU_Disconnect");

                  var 
              room_number 1;
                  var 
              hotcomm_ret1;
                  var 
              test_string "HELLO, this is a test\n\n";

                  
              debugPrintln(" ");
                      
                  
              hotcomm_ret1 hotcomm.call("Connect",room_number); 
                  
              debugPrintln("Connect return code for connecting to room number " room_number " = " hotcomm_ret1);
                    
                  
                  
              hotcomm_ret1 hotcomm.call("SendMessage",test_string);
                  
              debugPrintln("Send Message return code for text msg sent " test_string " = " hotcomm_ret1);
                    
                  
              hotcomm_ret1 hotcomm.call("Disconnect"); 
                  
              debugPrintln("Disconnect return code = " hotcomm_ret1);    
                  
                  
              debugPrintln(" ");
              }

              function 
              main() {
                  if (
              getBarState() == BARSTATE_ALLBARS) { 
                      
              drawTextPixel(515"Test@URL=EFS:testHotcomm"nullnull
                          
              Text.BUTTONnull12"test");
                  } 
                  
                  return;

              Jason K.
              Project Manager
              eSignal - an Interactive Data company

              EFS KnowledgeBase
              JavaScript for EFS Video Series
              EFS Beginner Tutorial Series
              EFS Glossary
              Custom EFS Development Policy

              New User Orientation

              Comment


              • #8
                Link to chat

                Have there been any developments(by Esignal or 3rd party) on linking alerts to chat rooms via dll or other EFS functions? I see an alert.playSound, alert.email, alert.addToList, but nothing on sending to chat? It's unclear if the original poster reached a resolution or not.

                Comment


                • #9
                  There isn't currently a way to have an EFS file post an alert to a chat window by itself. There is expanded EFS functionality coming in later versions of eSignal 11 I can request that a feature like this be added, but that's all we can do at this time.
                  Thank you,
                  Eric O.
                  eSignal Support

                  Comment

                  Working...
                  X