











CompTIA
Exam Vouchers
Save money on CompTIA exams
| Question of the day
Sign up to receive
interactive practice questions
for MCSE, CompTIA
Cisco and other exams
| TestKing
Get MCSE, MCSD, CCNA, CCNP,A+, N+ and many more | * ExamSheets *
Guide for Success!
Actual Questions & Answers
MCSE, MCSD, A+ ,CCNA, CCNP
Oracle 8i, Oracle 9i Online practice tests
Certification sites Online university Online college Online education Distance learning Software forum Server administration forum Programming resources
|
|  |
tamerelrefaie
member

Registered: May 2001 Location: Cairo Country: Egypt State: Certifications: MCP, CIWA, CIWP, MCIWD, MCSD Working on: MCDBA, MCSD.NET, MCSA en shaa allah
Total Posts: 168
|
|
what do u think ?
Hello everybody,
I faced this question several times and everytime I see different answer so what do u think about it
You have created a VB application that uses a COM component. The COM component will communicate with your application by calling a method of one of your applications objects. What should your application do to enable this type of communication?
A: Create an object and pass the address of that object to the COM component by using the AddressOf operator
B: Create an object and pass the reference of that object directly to the COM Component.
and plz tell me why do u choose ur answer
I'll be waiting 4 ur reply
thanx a lot everybody
tamer
__________________
tamer el-refaie
Last edited by tamerelrefaie on 04-18-02 at 11:24 AM
Report this post to a moderator
|
|
04-18-02 11:20 AM
|
|
vobedkov
Junior Member
Registered: Apr 2002 Location: Volgograd Country: Russia State: Certifications: MCSE NT4, MCSE W2K, MCT, MCDBA, MCSD, CNE Working on:
Total Posts: 11
|
|
More natural...
I think it sounds more natural to use reference to the object. So answer B - is simplest way to do that.
Furthermore AddressOf is used only with procedures.
"A unary operator that causes the address of the procedure it precedes to be passed to an API procedure that expects a function pointer at that position in the argument list." - MSDN
Good luck!
Report this post to a moderator
|
|
04-19-02 07:57 AM
|
|
tamerelrefaie
member

Registered: May 2001 Location: Cairo Country: Egypt State: Certifications: MCP, CIWA, CIWP, MCIWD, MCSD Working on: MCDBA, MCSD.NET, MCSA en shaa allah
Total Posts: 168
|
|
Thanx alot
Thanx a lot vobedkov,
I really appreciate ur effort in searching for me for the right answer, honestly I searched in the MSDN but I didn't reach to something and I was truelly not sure about the right answer.
thanx again my dear
tamer
__________________
tamer el-refaie
Report this post to a moderator
|
|
04-20-02 06:34 AM
|
|
fwitcher
Junior Member
Registered: Apr 2002 Location: Country: United Kingdom State: Certifications: Working on:
Total Posts: 3
|
|
I used to get confused as well but now know (through repeat exposure to this question) that the correct answer is B.
This question is testing your knowledge of using CALLBACK functions.
There are two types of Callback scenarios. One is where the function being called is a function in a standard module. Here you need to use the AddressOf function to indicate (and idenitfy physically) which function needs to be executed.
The other scenario is where the function you need to call exists as a method of a custom made object (eg is in a class module). The simplest way to call this function is to pass the reference to the object to the place where the call will be made.
You are basically passing an object variable by reference, so you can manipulate it, including calling its methods.
the code that does the callback might look like this:
Public Sub CallMethod(by Ref objClient as MyObject)
'manipulate the object that
'has been passed in
objClient.Method
End Sub
Hope that helps.
Report this post to a moderator
|
|
04-22-02 11:41 AM
|
|
|
Click here for list of MCSD
study guides and order yours now!
Forum Rules: Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author.
Posts: HTML code is OFF. Smilies are ON. vB code is ON. [IMG] code is ON. |
|
ExamNotes forum archive
|