Jump to content

Warren

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Warren

  1. mIRC 7.42 - versions.txt

    15.Changed script processing method so that Windows no longer thinks
    mIRC has stopped responding during long loops.

    I went to make a whilefix dll of my own, but it turns out, mIRC doesn't really
    need it as much as it used to. Although mIRC doesn't have any functionality
    during an intensive loop, it at least won't crash mIRC due to unresponsive behavior.

    whilefix7.cpp

    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>
    #include <stdio.h>
    #include <assert.h>
    #include <string>
    
    using namespace std;
    
    typedef struct {
    
      DWORD  mVersion; //!< mIRC Version
      HWND   mHwnd;    //!< mIRC Hwnd
      BOOL   mKeep;    //!< mIRC variable stating to keep DLL in memory
    
    } LOADINFO;
    
    typedef struct {
    
      HANDLE m_hFileMap; //!< Handle to the mIRC DLL File Map
      LPSTR m_pData;     //!< Pointer to a character buffer of size 900 to send mIRC custom commands
      HWND m_mIRCHWND;   //!< mIRC Window Handle
    
    } mIRCDLL;
    
    
    mIRCDLL mIRCLink;
    
    void WINAPI LoadDll(LOADINFO * load) {
      mIRCLink.m_hFileMap = CreateFileMapping( INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, 4096, "mIRC" );     
      mIRCLink.m_pData = (LPSTR) MapViewOfFile( mIRCLink.m_hFileMap, FILE_MAP_ALL_ACCESS, 0, 0, 0 );
      mIRCLink.m_mIRCHWND = load->mHwnd;
      
    }
    
    int WINAPI UnloadDll( int timeout ) {
    
      // DLL unloaded because mIRC exits or /dll -u used
      if ( timeout == 0 ) {
        UnmapViewOfFile( mIRCLink.m_pData );
        CloseHandle( mIRCLink.m_hFileMap );
        return 1;
      }
      // Keep DLL In Memory
      else
        return 0;
    }
    
    int __declspec(dllexport) __stdcall whilefix7(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) {
         
    	 MSG msg;
    	 PeekMessage(&msg,NULL,0,0,PM_REMOVE);
    	 TranslateMessage(&msg);
    	 DispatchMessage(&msg);
    	    
      return 1;
    }
    
    

    whilefix7.def

    LIBRARY whilefix7
    EXPORTS
    whilefix7
    LoadDll
    UnloadDll
    

    whilefix7.mrc

    alias whilefix7 {
      var %whilefix7.dll $qt(C:\Mirc\whilefix7\whilefix7.dll)
    
      var %i 0
      while (%i < 12000) {
        inc %i
        titlebar %i
        echo -s : %i
        if ($rand(1,10) == 0) { noop $dll(%whilefix7.dll,whilefix7,0) }
        ; Allows mIRC a chance to breathe.
      }
    
      dll -u %whilefix7.dll
    }
    
    

    the code used was supposedly used in the past whilefix dll, and i had made my own,

    which worked well... but it looks like it might not be as relevant now with the upgraded mIRC.

    whilefix7.zip

  2. i put in an issue on github, and i tried to see if i could debug the issue, but its a bit over

    my head. If there was some definitive error message i could research it would be one

    thing, but the way its set up, the issue could be anywhere.

     

    another issue is, as much trouble as it was to get a version for this from git, i still don't know

    if the github's versions are older or newer than the dcx dll's in circulation.

     

    its less confusing to just have 1 version.

    not versions, subversions, and builds.

     

    so perhaps github just wasn't updated after the releases.

  3. i put in an issue on github, and i tried to see if i could debug the issue, but its a bit over

    my head. If there was some definitive error message i could research it would be one

    thing, but the way its set up, the issue could be anywhere.

     

    another issue is, as much trouble as it was to get a version for this from git, i still don't know

    if the github's versions are older or newer than the dcx dll's in circulation.

     

    its less confusing to just have 1 version.

    not versions, subversions, and builds.

     

    so perhaps github just wasn't updated after the releases.

  4. okay, i managed to get it to compile and load in mIRC

    I installed the DirectX SDK june 2010 update and that seemed to fix the dxsdk issues.

    its possible that i didn't even need them though, because the real issue was in the Release build.

    In the Debug build it compiled smoothly, except in pre-build / post-build events, you have to set

    your mIRC folder.

    For the Release profile, it still wouldn't run after i compiled it, even with the DirectX SDK.

    Only after I installed UPX to the parent folder of dcx-master, vs 2012 was able to compile

    and optimize the DLL, and then mIRC was able to load it.

    I'm thinking that, the optimization settings might remove some of the spacing for the functions

    and then mIRC DLL just can't find the symbols, and then using UPX might convert them back

    to something mIRC can use.

    i had to install git and clone a repository and build sourcecontrol, seemed like an awful

    lot of trouble to go through for a version.

     

    for additional info: https://github.com/twig/dcxdll/issues/10

     

    ---

     

    Now, im having issues with the WebControl, it doesn't seem to be updating the status properly. sending D_ERRORs

    myDialog error 100 webctrl none DcxWebControl::Invoke() Unable to get object state: 1065353216
    

    I'm going to look into this, just curious now why the other versions of DCX never did this.

  5. I was wanting to modify the DCX dll from its source,

     

    using VS C++ 2012

     

    I had to make 3 changes in order for it to compile.

     

    1.

     

    Removed:

    #ifdef DCX_USE_DXSDK
    #include <Dxsdkver.h>
    

    Reason: fatal error C1083: Cannot open include file: 'Dxsdkver.h': No such file or directory

     

    I read that this wasn't required:

     

    You should remove the reference to dxsdkver.h. All it contained were the following #defines:

    _DXSDK_PRODUCT_MAJOR
    _DXSDK_PRODUCT_MINOR
    _DXSDK_BUILD_MAJOR
    _DXSDK_BUILD_MINOR

     

     

    2. Since I don't have github installed, i couldn't run the batch file to get the version numbers, so

    i set them from

    #define DLL_VERSION    GIT_DESCRIBE
    #define DLL_BUILD      GIT_HASH
    #define DLL_DEV_BUILD  24
    

    to:

    #define DLL_VERSION    "2.0.1120"
    #define DLL_BUILD      1
    #define DLL_DEV_BUILD  24
    

    didn't figure this would make a difference.

     

    3.

    post-build events, removed $UPX packager in previous directory.

     

    It compiles successfully. i did a file comparison on the dependencies from PE explorer

    and they are identical.

     

    when I try to load the dll, i get:

    /dll: unable to open file

     

    any ideas on how i might go about fixing this?

×
×
  • Create New...