Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. DCOM limits

DCOM limits

Scheduled Pinned Locked Moved The Lounge
question
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    obr
    wrote on last edited by
    #1

    Does anyone know about any limits on amount of methods in one idl file? (using MS midl compiler) Is it depending on service pack?

    Z V 2 Replies Last reply
    0
    • O obr

      Does anyone know about any limits on amount of methods in one idl file? (using MS midl compiler) Is it depending on service pack?

      Z Offline
      Z Offline
      Zdeslav Vojkovic
      wrote on last edited by
      #2

      Yes, check topics Q170989 and Q241849 on MSDN Lib. Generally, it boils to this: "Currently the maximum number of methods in an OLE automation dual interface are: Windows NT 4.0 - 110 methods Windows NT 4.0 SP2 - 512 methods Windows NT 4.0 SP3 - 1024 methods Windows 95 - 512 methods " hth

      1 Reply Last reply
      0
      • O obr

        Does anyone know about any limits on amount of methods in one idl file? (using MS midl compiler) Is it depending on service pack?

        V Offline
        V Offline
        Vagif Abilov
        wrote on last edited by
        #3

        The actual practical limit (which is more than 100 methods per interface) should never be reached. Just imagine an interface with 100 methods! This is not inteface, really - looks like "C" API. IMO if number of methods in an interface exceeds 15-20, it's time to split it. One thing that complicate the case is object propeties. They are not like regular interface methods, but anyway can take up to 2 methods per property (for "get" and "put" methods). In one of our projects where number of properties became threatening, we decided to replace them with just 2 methods: get_Property and set_Property, each one takes two arguments: property ID and VARIANT-based value. BTW, properties in OLE DB are designed the same way. This makes it possible to keep number of OLE DB interface methods small, and at the same time expose reach functionality via properties (making the whole thing quite hard to understand, but that's a topic for another discussion ;) ). Vagif Win32/ATL/MFC Developer Oslo, Norway

        O Z 2 Replies Last reply
        0
        • V Vagif Abilov

          The actual practical limit (which is more than 100 methods per interface) should never be reached. Just imagine an interface with 100 methods! This is not inteface, really - looks like "C" API. IMO if number of methods in an interface exceeds 15-20, it's time to split it. One thing that complicate the case is object propeties. They are not like regular interface methods, but anyway can take up to 2 methods per property (for "get" and "put" methods). In one of our projects where number of properties became threatening, we decided to replace them with just 2 methods: get_Property and set_Property, each one takes two arguments: property ID and VARIANT-based value. BTW, properties in OLE DB are designed the same way. This makes it possible to keep number of OLE DB interface methods small, and at the same time expose reach functionality via properties (making the whole thing quite hard to understand, but that's a topic for another discussion ;) ). Vagif Win32/ATL/MFC Developer Oslo, Norway

          O Offline
          O Offline
          obr
          wrote on last edited by
          #4

          Yes, You are right, 100 is enough. But I have little bit diferent problem. In one idl file I have more than one interface defined and sum of all methods in all interfaces is 500. When I try add any method to any interface in this dll, midl ended with strange error. I can remove method in one interface and add another in second, all work fine, but I cannot excceed 500 in idl. Does anybody know why?

          V 1 Reply Last reply
          0
          • O obr

            Yes, You are right, 100 is enough. But I have little bit diferent problem. In one idl file I have more than one interface defined and sum of all methods in all interfaces is 500. When I try add any method to any interface in this dll, midl ended with strange error. I can remove method in one interface and add another in second, all work fine, but I cannot excceed 500 in idl. Does anybody know why?

            V Offline
            V Offline
            Vagif Abilov
            wrote on last edited by
            #5

            Can you try splitting interfaces between different IDL files? Should probably help. BTW, are you sure that the limit is 500 and not 512? I don't think MIDL was written by VB developers ;P Vagif Win32/ATL/MFC Developer Oslo, Norway

            1 Reply Last reply
            0
            • V Vagif Abilov

              The actual practical limit (which is more than 100 methods per interface) should never be reached. Just imagine an interface with 100 methods! This is not inteface, really - looks like "C" API. IMO if number of methods in an interface exceeds 15-20, it's time to split it. One thing that complicate the case is object propeties. They are not like regular interface methods, but anyway can take up to 2 methods per property (for "get" and "put" methods). In one of our projects where number of properties became threatening, we decided to replace them with just 2 methods: get_Property and set_Property, each one takes two arguments: property ID and VARIANT-based value. BTW, properties in OLE DB are designed the same way. This makes it possible to keep number of OLE DB interface methods small, and at the same time expose reach functionality via properties (making the whole thing quite hard to understand, but that's a topic for another discussion ;) ). Vagif Win32/ATL/MFC Developer Oslo, Norway

              Z Offline
              Z Offline
              Zyxil
              wrote on last edited by
              #6

              another benefit is that the properties can be changed or completely configurable without breaking the interface. in OLEDB this is for the different providers having different properties. -John

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups