Announcement

Collapse
No announcement yet.

PBCC as COM Server?

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

  • Michael Mattias
    replied
    >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?

    Leave a comment:


  • Bob Zale
    replied
    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.

    Leave a comment:


  • Michael Mattias
    replied
    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.

    Leave a comment:


  • Bob Zale
    replied
    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.

    Leave a comment:


  • Michael Mattias
    replied
    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

    Leave a comment:


  • Kev Peel
    replied
    It's just an example for PB/WIN, as Bob says "complimentary". PB/CC does not support COM servers

    Leave a comment:


  • Edwin Knoppert
    replied
    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?

    Leave a comment:


  • Bob Zale
    replied
    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.

    Leave a comment:


  • Michael Mattias
    replied
    >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

    Leave a comment:


  • Edwin Knoppert
    replied
    Currently only dll's are supported, not exe servers.
    Therefore PB/WIN would be required.

    Leave a comment:


  • Reinhard Böck
    started a topic PBCC as COM Server?

    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?
Working...
X