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?
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 |
where are logical drives created on hard disk ?
Whats Main Deference in Win XP and Win vista?
4 Answers PCS, Unique Software Systems,
How Replication Works
mcse 2003 to mcitp upgrade paper
Is there any Microsoft Certification Examination for the software testing?
Anyone send me list of latest Microsoft certifications and where the dumps available for practice purpose
How do you change the DS Restore admin password?
What is Web Hosting?
friend i have some question plz help me out 1 how hash function works on router 2 what is diffrence between broad cast doman and collison doman 3 what is the difference between L3 Switch and Router, If they Perform the same function why we need both of them?
what is pata channel & sata channel?
what is the procedure to make a system stable if it is being repeatedly restart now and then saying RPC service failure?
What can I do to prevent inheritance from above?