You work as the application developer at Certkiller .com.
You are working on an application and want to use platform
invoke services to call an unmanaged function from managed code.
How will you accomplish the task?



You work as the application developer at Certkiller .com. You are working on an application and wan..

Answer / gaaa

A. Create a class to store DLL functions. Create prototype
methods by using the managed code.
B. Use COM to register the assembly. Reference the managed
code from COM.
C. Export a type library for the managed code.
D. Import a type library as an assembly. Create instances of
COM object.

Answer: A

Explanation: It is good practice to wrap the messy P-Invoke
code with a .net class.
The main benefit is to keep the client code tidy as the
messy and cryptic code will be hidden away. Also better for
maintenance e.g dll name or version changes.
The question explicitly says the unmanaged code should be
called with platform invoke services. Importing\exporting a
type library is relevant for interoperation with COM.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Microsoft Certifications Interview Questions

What's the difference between LDIFDE and CSVDE? Usage considerations?

1 Answers   FIC,


what is archive bit ?

3 Answers  


Name the AD NCs and replication issues for each NC

1 Answers  


What FSMO placement considerations do you know of?

1 Answers  


Whats Main Deference in Win XP and Win vista?

4 Answers   PCS, Unique Software Systems,






what is the difference between MCP,MCSA and MCSE a brief description?

1 Answers   HCL,


Which file system support Raid concept.FAT or NTFS

2 Answers   IBM, Matrix,


Where is the AD database held? What other folders are related to AD?

1 Answers  


What is Micro soft?

2 Answers   Microsoft,


hi im raghu im 26 yrs old can i take exams on mcse for windows server 2003 now instead of windows server 2008

3 Answers  


What is WSUS server? Basci requirement of installing? difference between WSUS ans SUS? benifits of both?

2 Answers  


Which is best among dotnet and dotnet diploma? Friends Please answer this question as soon as possible.

0 Answers  


Categories
  • Cisco Certifications Interview Questions Cisco Certifications (2321)
  • Microsoft Certifications Interview Questions Microsoft Certifications (171)
  • Sun Certifications Interview Questions Sun Certifications (45)
  • CISA Certification Interview Questions CISA Certification (744)
  • Oracle Certifications Interview Questions Oracle Certifications (64)
  • ISTQB Certification Interview Questions ISTQB Certification (109)
  • Certifications AllOther Interview Questions Certifications AllOther (295)