GIAC
GSSP-NET · Question #342
Julia works as a Software Developer for Mansoft Inc. She develops an application using Visual Studio .NET. The application uses a method named MyMethod, which is located in an unmanaged DLL. Julia…
The correct answer is C. Use the Marshal class. See the full explanation below for the reasoning.
Question
Julia works as a Software Developer for Mansoft Inc. She develops an application using Visual Studio .NET. The application uses a method named MyMethod, which is located in an unmanaged DLL. Julia wants MyMethod to require the application to allocate unmanaged GIAC GSSP-.NET Exam memory, fill the data, and pass the memory address to the application. She also wants to ensure that on returning from MyMethod, the application de-allocates the unmanaged memory. What will Julia do to accomplish the task?
Options
- AUse the methods of the MemoryStream class.
- BDerive a new class from the Stream class, and override the allocation methods.
- CUse the Marshal class.
- DUse a byte array.
How the community answered
(19 responses)- A5% (1)
- B5% (1)
- C74% (14)
- D16% (3)
Community Discussion
No community discussion yet for this question.