• Welcome to Theos PowerBasic Museum 2017.

News:

Attachments are only available to registered users.
Please register using your full, real name.

Main Menu

WHEN TO USE DIRECT, AND WHEN TO USE DISPATCH with Microsoft Libraries?

Started by Murray Ruggiero, January 07, 2011, 02:20:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Murray Ruggiero

I'd like to access Microsoft's ADO library from my code.  I would think that I could make declarations such as:
Local myDatabaseConnection as INT__ADODB_Connection
Set myDatabaseConnection = NEWCOM $PROGID_ADODB_Connection
and so forth.
But in an example I saw in a powerbasic forum, the author said that he could not use code like this (Direct rather than dispatch) because the powerbasic com browser he used generated macros that somehow made it impossible.
So he uses "Object get" and so forth.
I'd like to know when I access other people's libraries, when I can use direct and when I can't.
Does anyone know?
Thanks

José Roca

Quote
But in an example I saw in a powerbasic forum, the author said that he could not use code like this (Direct rather than dispatch) because the powerbasic com browser he used generated macros that somehow made it impossible.

This must be the poorest excuse that I have heard in my life. If there is a problem with the generated code, modify it. Aren't we programmers?

Quote
I'd like to know when I access other people's libraries, when I can use direct and when I can't.
Does anyone know?

You can use direct interface calls if the server has a dual interface.