all groups > dotnet interop > september 2006 >
You're in the

dotnet interop

group:

GetFunctionPointerForDelegate and cdecl



GetFunctionPointerForDelegate and cdecl Christian_Fröschlin
9/7/2006 12:00:00 AM
dotnet interop: I noticed that the documentation for GetFunctionPointerForDelegate
states that "The delegate d is converted to a function pointer
that can be passed to unmanaged code using the __stdcall
calling convention."

I would have expected that method to honour the
UnmanagedFunctionPointer attribute decorating the
delegate declaration.

Does this describe the actual behavior or is it just
a documentation bug? AFAIK, both the function and the
attribute were newly added in .NET 2.0.

Re: GetFunctionPointerForDelegate and cdecl Willy Denoyette [MVP]
9/9/2006 12:30:31 AM

[quoted text, click to view]
|I noticed that the documentation for GetFunctionPointerForDelegate
| states that "The delegate d is converted to a function pointer
| that can be passed to unmanaged code using the __stdcall
| calling convention."
|

That's the default behavior of the 'naked' method.

| I would have expected that method to honour the
| UnmanagedFunctionPointer attribute decorating the
| delegate declaration.
|

It does honor the attribute.

| Does this describe the actual behavior or is it just
| a documentation bug?

Not a bug, it does describe the functions behavior, it would help if the
remarks section would refer to the UnmanagedFunctionPointer however.


Willy.

AddThis Social Bookmark Button