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 |
What's the difference between LDIFDE and CSVDE? Usage considerations?
what is archive bit ?
Name the AD NCs and replication issues for each NC
What FSMO placement considerations do you know of?
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?
Which file system support Raid concept.FAT or NTFS
Where is the AD database held? What other folders are related to AD?
What is Micro soft?
hi im raghu im 26 yrs old can i take exams on mcse for windows server 2003 now instead of windows server 2008
What is WSUS server? Basci requirement of installing? difference between WSUS ans SUS? benifits of both?
Which is best among dotnet and dotnet diploma? Friends Please answer this question as soon as possible.