learning to understand the JR .INC header files

Started by John Montenigro, May 01, 2014, 12:18:39 PM

Previous topic - Next topic

John Montenigro

OK, now here's where my ignorance really shines brightly!

When I'm converting sample MSDN VBS code, and I find a statement up front that I cannot resolve (like this):
   Dim Conn        As ADODB.Connection


...here's how I try to figure it out:
- search all the JR header files for "ADODB.Connection"
- read and examine all matches and the surrounding lines/sections of text and code.
- try to find "ADODB.Connection" at MSDN.

Before JR headers, I could usually dope it out. But the JR headers are in a different kind of notation, and I don't know how to read it.

I guess that sums up my biggest problem in recent years - that since the move to COM, PB files are written in a new language, and I don't know where to learn all the details.

I can read the files and figure out some of the things, but the deeper significance of a lot of the notation, I just cannot follow, let alone comprehend!

Attributes, properties, methods are pretty self-explanatory. It's the way that various groups of them relate to others that isn't easy to grasp.

If I wanted to get proficient in understanding a whole file (not just fragments here and there), where could I go to get simple explanations? I need to understand how the whole INC is structured, what it contains, all the sections, and how they relate to each other...

-John


José Roca

Each language uses its own syntax.

If you look and the C++ example, you will see that they use

_ConnectionPtr Conn(__uuidof(Connection));

instead of

Set Conn = CreateObject("ADODB.Connection")

Using my headers, the equivalent to

Set Conn = CreateObject("ADODB.Connection")

is

LOCAL pConnection AS ADOConnection
pConnection = NEWCOM "ADODB.Connection"

The problem is not to understand my headers, but to understand low-level COM programming and how to use it with PB, and this requires much time of study and practice.

Bob implemented low-level COM support, but did not bother to provide tutorials or any other kind of support. The includes that come with the compiler don't have a single interface definition. Mine provide full low-level COM support, but that and the examples that I have posted is all that I can offer. I left programming and in the current rough times I need most of my time to earn my life.

John Montenigro

Jose,
I cannot put into words the value of your work! It is such a huge help to all PB programmers!!

I appreciate what you have done, and I do wish that PB had published better documentation and tutorials.

So, I'm OK struggling to learn, and I'm not asking anyone to do the work for me.

But I do appreciate getting hints from people more experienced than me, in where to begin!

A clarification as simple as LOCAL pConnection AS ADOConnection
pConnection = NEWCOM "ADODB.Connection"


...helps to put me on the right path, and I thank you!!   (It gives me clues about what to research next...)
-John