PrepAway - Latest Free Exam Questions & Answers

What should you do?

You work as the application developer at Domain.com. Domain.com uses Visual Studio.NET 2005 as its application development platform.
You use a Windwos XP Professional client computer named Certkiller -WS554 as your development computer.
You are developing a .NET Framework 2.0 application on Certkiller -WS554.
You are trying to port an old Domain.com management application that was written in unmanaged Windows code with no COM interfaces.
The application you are developing makes calls to the old Domain.com management unmanaged library namedBillPerformance.dll.
You are required to make a call to the GetPerformaceScore method of the unmanaged Performance.dll library.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
The Type Library Exporter tool (tlbexp.exe) should be used.

B.
The Type Library Importer tool (tlbimp.exe) should be used.

C.
The Assembly Registration tool (regasm.exe) should be used.

D.
The Platform Invoke (DllImportAttribute) should be used.

Explanation:
The feature Platform Invoke is used to allow you to call methods that are in unmanaged libraries but you need to declare the unmanaged method in the managed code using the extern and static keywords with the DllImport attribute which is used to specify the unmanaged library.
Incorrect Answers:
A, B, C: The tool should not be considered for usage in the scenario because the unmanaged dll file is not in COM and it only processes COM type libraries.

One Comment on “What should you do?


Leave a Reply