Good ol’ Microsoft!

So I was looking at the possibility of returning a block of memory to .NET from an assembler DLL (I’m in that kind of mood), and thought about using the GlobalAlloc function, because .NET has the built-in Marshal.AllocHGlobal and Marshal.FreeHGlobal functions that I could then use afterwards. I thought I’d better take a look at the documentation for those just in case there were any pitfalls I ought to know about and guess what? Despite their names, those functions use the LocalAlloc and LocalFree functions instead.
 
I decided not to do it that way in any case, but come on Microsoft! That’s just stupid!
Advertisements
This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s