Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Query relating to VB Com


Message #1 by markc@w... on Thu, 13 Jul 2000 14:42:34
-----Original Message-----
From: Ashok Thota [mailto:thota_ashok@h...]
Sent: 13 July 2000 00:09
To: feedback@w...
Subject: Query relating to com


Hi,

After reading the book "VB Com" written by " Thomos Lewis" I got some idea
of how to use com in Visual basic, but i have sligt queries to ask.
Please give the no. to contact or email ID to contact from where i get 
answers to my questions.


OK! any how i will give my query straight away

I have a class named as "clsMailer" which is implementing the Imailer 
Interface.

When i want to use my "clsMailer" class methods/properties through my 
"IMailer" interface i have to go through the three step process(according 
to the book).

(I) Steps:-
___________

Step-1 ---> Declare a vaiable "loMailer" of type "clsMailer" class
Step-2 ---> Declare a vaiable "loIMailer" of type "IMailer"  class
Step-3 ---> Create an Instance of "clsMailer" class
Step-4 ---> Assign the Created  loMailer to loIMailer
Step-5 ---> Call the private property of "loMailer" through our interface
class variable "loIMailer"


   See below for the code:-
   '********************************************************************
    Dim loMailer As Mailer.clsMailer
    Dim loIMailer As Mailer.IMailer

    Dim strDSN          As String


    'Create an Instance of clsMailer class of Mailer component.
    Set loMailer = CreateObject("Mailer.clsMailer")
    Set loIMailer = loMailer

    loIMailer.DSNValue = strDSN
   '********************************************************************

But when i use any components like "Cdonts.dll" mailing component of NT 
Server or something else.I need not do all these above steps.

(II) Simply i have to

(1) register the component in our machine
(2) Give the reference of that .dll to the project
(3) Last but not least create an instance of that
(4) Start accessing the methods and properties.

No need of the steps we talked about i.e (I)

So now please let me know how can i use my created component using the 
process given by the "VB Com" book just like as
"CDONTS.dll" type ( i mean like (II) )

or refer some other book from where i can get these info.

Thank you very much.

An early reply is highly solicited.

Regards
Ashok
thota_ashok@h...

  Return to Index