Copy SiteManager files to your project's folder

  • SiteManager.asm to \ (the root of your project folder)
  • SiteManager.dlg to \ (the root of your project folder)
  • SiteManager.rc to \Res (the Res folder under your project folder)

Include SiteManager.asm in your project somewhere with:

Include SiteManager.asm

Enable call to SiteManager dialog in your main dialog handler under WM_COMMAND with a button or menu item or both:

invoke DialogBoxParam, hInstance, IDD_SiteManager, hWin, OFFSET SiteManagerDlgProc, NULL

NOTES

When the SiteManager dialog is initialized it calls SiteManagerCreateIniFilename which constructs an .ini on the basis of the name of the main exe file. So 'myapp.exe' would translate to a 'myapp.ini' file. This is the file that SiteManager uses for storing and retrieving the Site information.

SiteManagerProcessServers can be called outside of the SiteManager dialog, this is useful for processing the .ini file and updating the structure list of Sites. You could fill a listview or combobox with this information in your main dialog.

SiteManagerProcessServers should be called when the user exits out of SiteManager dialog and has changed/added/deleted sites. For this reason the SiteManager Dialog will return one of the following values on exit:

  • 0 = no change
  • 1 = new servers added
  • 2 = servers deleted
  • 3 = servers added and deleted.

The variable SiteServersChanged is used to track this change as well. The Root item of the SiteManager Treeview is 'Sites' - The code in SiteManager will not allow this item to be renamed or deleted, or a new site to be added that has the nickname of 'Sites'.

This is just to prevent any problem with conflicts or identifying the root node A copy of a site will have 'Copy of' prependded to it when you initially copy it. SiteManagerFillCboServers can be used to fill a combo box with the list of servers as stored in the .ini file. You will have to call the SiteManagerProcessServers function before calling this function as it will update the internal structure information on the sites that SiteManagerFillCboServers will refer to.

To obtain the server name in the combo box selection you can add something like this under the WM_COMMAND of your main dialog handler:

.elseif eax==IDC_CboServers
   .IF wNotifyCode==CBN_SELCHANGE
      Invoke SendMessage, hCboServers, CB_GETCURSEL, 0, 0
      Invoke SendMessage, hCboServers, CB_GETLBTEXT, eax, Addr CboServerSelection

To get the site information from a site nickname you can call the SiteManagerSiteDetails function that will fill the following variables on a succesful call:

  • SiteManagerHost
  • SiteManagerPort
  • SiteManagerUser
  • SiteManagerPass

Hopefully you will find this module useful. Ive tried to make it self contained so that you will only need to take a few simple steps to add it to your own project.

SiteManager Module Downloads

  • SiteManager Module Downloads +

    SiteManager Module Version:1.0.0.0 (2013-02-04) File size: 14.67 KB
    SiteManager Example Project (2013-02-04) File size: 16.54 KB
    SiteManager Readme (2013-02-04) File size: 6.15 KB

     

    Note: you may need to unblock access to a file once you download it. Right click on it in windows explorer, select properties, click the unblock button.

  • SiteManager Module History +

    v1.0.0.0

    • Release - First release of SiteManager Module.
  • 1

SiteManager Module Information

  • SiteManager Module Notes +

    The latest version of SiteManager is v1.0.0.0

    SiteManager is desgined for use with:

    • RadASM IDE
    • MASM32 SDK

    Note: The SiteManager module does not handle the connection to any defined site or transfer of files, this feature must be provided by another program, library or module.

  • SiteManager Module Quick Setup +

    Copy SiteManager files to your project's folder

    • SiteManager.asm to \ (the root of your project folder)
    • SiteManager.dlg to \ (the root of your project folder)
    • SiteManager.rc to \Res (the Res folder under your project folder)

    Include SiteManager.asm in your project somewhere with:

    Include SiteManager.asm
  • SiteManager Module Full Setup Guide +

    Copy SiteManager files to your project's folder

    • SiteManager.asm to \ (the root of your project folder)
    • SiteManager.dlg to \ (the root of your project folder)
    • SiteManager.rc to \Res (the Res folder under your project folder)

    Include SiteManager.asm in your project somewhere with:

    Include SiteManager.asm

    Enable call to SiteManager dialog in your main dialog handler under WM_COMMAND with a button or menu item or both:

    invoke DialogBoxParam, hInstance, IDD_SiteManager, hWin, OFFSET SiteManagerDlgProc, NULL

    NOTES

    When the SiteManager dialog is initialized it calls SiteManagerCreateIniFilename which constructs an .ini on the basis of the name of the main exe file. So 'myapp.exe' would translate to a 'myapp.ini' file. This is the file that SiteManager uses for storing and retrieving the Site information.

    SiteManagerProcessServers can be called outside of the SiteManager dialog, this is useful for processing the .ini file and updating the structure list of Sites. You could fill a listview or combobox with this information in your main dialog.

    SiteManagerProcessServers should be called when the user exits out of SiteManager dialog and has changed/added/deleted sites. For this reason the SiteManager Dialog will return one of the following values on exit:

    • 0 = no change
    • 1 = new servers added
    • 2 = servers deleted
    • 3 = servers added and deleted.

    The variable SiteServersChanged is used to track this change as well. The Root item of the SiteManager Treeview is 'Sites' - The code in SiteManager will not allow this item to be renamed or deleted, or a new site to be added that has the nickname of 'Sites'.

    This is just to prevent any problem with conflicts or identifying the root node A copy of a site will have 'Copy of' prependded to it when you initially copy it. SiteManagerFillCboServers can be used to fill a combo box with the list of servers as stored in the .ini file. You will have to call the SiteManagerProcessServers function before calling this function as it will update the internal structure information on the sites that SiteManagerFillCboServers will refer to.

    To obtain the server name in the combo box selection you can add something like this under the WM_COMMAND of your main dialog handler:

    .elseif eax==IDC_CboServers
       .IF wNotifyCode==CBN_SELCHANGE
          Invoke SendMessage, hCboServers, CB_GETCURSEL, 0, 0
          Invoke SendMessage, hCboServers, CB_GETLBTEXT, eax, Addr CboServerSelection

    To get the site information from a site nickname you can call the SiteManagerSiteDetails function that will fill the following variables on a succesful call:

    • SiteManagerHost
    • SiteManagerPort
    • SiteManagerUser
    • SiteManagerPass

    Hopefully you will find this module useful. Ive tried to make it self contained so that you will only need to take a few simple steps to add it to your own project.

    Read More
  • 1

Login Form