Announcement

Collapse
No announcement yet.

PBCC as COM Server?

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

  • PBCC as COM Server?

    Hi to all readers from austria,

    i tried to use the example from ppcc help:

    'How to you publish an object?'

    and copied all the source code in an new project.

    In the line:

    CLASS MyClass $MyClassGuid AS COM

    i get the error: 'End of statement expected'

    What did i make wrong?

  • #2
    Currently only dll's are supported, not exe servers.
    Therefore PB/WIN would be required.
    hellobasic

    Comment


    • #3
      >i tried to use the example from ppcc help

      Assuming Mr. Knoppert is correct, send documentation error notice (aka "bug report") to [email protected]

      MCM
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        Wrong, Mr. Mattias. The PB/CC documentation show a complementary server written in PowerBASIC for Windows, as PB/CC does not create DLLs.

        Best regards,

        Bob Zale
        PowerBASIC Inc.

        Comment


        • #5
          I would liek to have more info on that subject.

          Are we talking about a server where another application can call this com server executable?
          Are there any remote facillities?
          hellobasic

          Comment


          • #6
            It's just an example for PB/WIN, as Bob says "complimentary". PB/CC does not support COM servers
            kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

            Comment


            • #7
              I will be honest, I did not look in the doc for the fine print; I also qualified my comments re if Edwin were correct or not.

              However, it's pretty obvious there is something wrong with the doc, since it sure fooled Mr. Bock.

              Ok, I'll read it...

              How do you publish an object?
              Publishing an object means making it available for access and use by other applications through the facilities of the COM Services of Windows. With some compilers, this requires pages upon pages of code. With PowerBASIC, you'll find it's fairly straightforward. Just add a Class Id (CLSID) GUID and the words "AS COM" to the end of the CLASS statement. Then, add an Interface ID (IID) to the end of the INTERFACE statement. Believe it or not, that's just about it!

              $MyClassGuid = GUID$("{00000099-0000-0000-0000-000000000008}")
              $MyIfaceGuid = GUID$("{00000099-0000-0000-0000-000000000009}")

              CLASS MyClass $MyClassGuid AS COM
              INTERFACE MyInterface $MyIfaceGuid
              INHERIT IAutomation
              METHOD Method1(parm AS LONG)
              CALL abc(parm)
              END METHOD
              END INTERFACE
              END CLASS

              PowerBASIC handles all the messy details of COM for you. The name of the CLASS (in this case MyClass) will be used as the ProgID for COM registration of the DLL. The GUID's you selected will be used for the CLSID and IID, so you're ready to go...



              See Also

              What is an object, anyway?

              Just what is COM?

              What is a COM component?

              How are GUID's used with objects?
              Nowhere in this clip from the PB/CC help file does it say you need another compiler to "publish an object."

              So now you have fooled me, too.


              MCM
              Michael Mattias
              Tal Systems (retired)
              Port Washington WI USA
              [email protected]
              http://www.talsystems.com

              Comment


              • #8
                Fairly easily, don't you think? <g>

                Seriously, though, that's not my interpretation at all. But we'll take another look and see. I guess we could just remove those items completely, but we thought it would be better to show the complete picture of the way a COM client and a COM server work together. I'd rather over-document than under-document.


                Bob Zale
                PowerBASIC Inc.

                Comment


                • #9
                  That or just add a paragraph on that that page that publishing an object requires the class be compiled into a DLL, which requires the PB/Windows compiler.

                  Or, change that page completely for the PB/CC help to indicate this. I'm sure the help files are assembled with a lot of "include" files anyway since the PB/Win and PB/CC help files are about 75 percent common. So 'include' a different file when building PB/CC help files.

                  And with all due respect.... YOUR interpretation of the help files doesn't really count, does it? It's OUR interpretation which matters.
                  Michael Mattias
                  Tal Systems (retired)
                  Port Washington WI USA
                  [email protected]ems.com
                  http://www.talsystems.com

                  Comment


                  • #10
                    Your interpretation counts when it is reasonably representative of our customer base, taken as a whole. Certain individuals have, at times, requested things which are remarkably void of logic. I'll never forget Donald D... who demanded 24-bit (3 byte) integers because they'd be so much more efficient. Or the requirement that we include a complete, running application on every page of the printed books. Oh, the stories I could tell you... {smile}

                    Bob Zale
                    PowerBASIC Inc.

                    Comment


                    • #11
                      >who demanded 24-bit (3 byte) integers because they'd be so much more efficient.

                      Whoa, did you just violate your own rule against pre-announcing features for the next release?
                      Michael Mattias
                      Tal Systems (retired)
                      Port Washington WI USA
                      [email protected]
                      http://www.talsystems.com

                      Comment

                      Working...
                      X