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 is software deployment? how we do software deployment?
What is LDAP?
Where is the AD database held? What other folders are related to AD?
How do you view all the GCs in the forest?
how to take back up in laptop when windows is crashed
I am unable to access other Pc within network without domain. when i am doing to access other Pc within lan like //192.168.1.11 it gives error message like "the network location cannot reached.For information about network troubleshooting, see windows help" what is the solution?
What is NTFS and FAT
What is Server OS? What is Domain Controler?
How do you change the DS Restore admin password?
I want to clear the mcse in 2007. So could i get the latest dump of msce questions?
hi friends...is thr anybd who can tel me how to c logs of internet useage of each system...and hoe to delete those logs and from wer???
A user claims he did not receive a GPO, yet his user and computer accounts are in the right OU, and everyone else there gets the GPO. What will you look for?