No announcement yet.

Pb Com Limited? or more likely MY LIMITED COM

  • Filter
  • Time
  • Show
Clear All
new posts

    Pb Com Limited? or more likely MY LIMITED COM

    Last couple of hours I went through cleaning up code at my attempts to Events from PB Com, but used in other languages. (In this case VB6 calling a PB Dll with COM) and my struggles to understand the docs, vs "Why is this SOOOOoooo hard?"

    What I am about to post may become mute if I just read from Jose lit up my dim bulb? or if it just confused me more. But the below code is my train of thought before reading those posts.

    Blatantly taken from Thomas Tierney by the way, because till I tried his, I could not get events to work in VB whatsoever, so all the code will be recognized (just cleaned up a bit to be not as hard-coded as the original

    Since my ability to post zip is back, I will save the posting source for someone else to have to recompile

    Now I am on to answering a few of my own questions in my code comments, because Jose has often mentioned "CoInitializeEx and CoUninitialize" repeatedly, and how PB saves me from that. (But thinking, only if the client is PB too?)
    And Steve Rossell has been posting things like
    A destructor is only called when the reference count for an object reaches zero. If you have any copies of this object instantiated then the reference count is not zero and the destructor will not be called until all copies of the object are set to nothing. This maybe why when you close the application all instances of the object are destoyed and the destructor is called.
    which backs up the docs (as I "Loosely" understand them)

    All in all...maybe this will help someone to help me, and vice-versa and I gotta admit, NO WONDER!!!! Pb held off so long to give COM capabilities because if this is the basics...I would HATE to see the low-level COM to do the same.

    On the other hand...nothing learned easy is retained for future use

    And thank you to all for getting my knowledge even this far....(I gave up on COM years ago, but found a new use if viable)
    Attached Files
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "