nerdexam
GIAC

GSSP-NET · Question #193

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 B. 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 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.
  • BUse the Marshal class.
  • CDerive a new class from the Stream class, and override the allocation methods.
  • DUse a byte array.

How the community answered

(41 responses)
  • A
    12% (5)
  • B
    78% (32)
  • C
    7% (3)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full GSSP-NET Practice