Smart Device Functions:
Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
VB .NET Signature:
<DllImport("kernel32.dll", SetLastError:=True)> _
For .NET 2.0, consider using Microsoft.Win32.SafeHandles.SafeFileHandle instead. It can be used where IntPtr is used.
Can someone explain why "[return: MarshalAs(UnmanagedType.Bool)]" is part of the signature?
External values of type 'bool' could represent a 1-byte (e.g. C++ bool), 2-byte (e.g. COM VARIANT_BOOL) or 4-byte (e.g. Windows BOOL) value. The distinction is less important for parameters, but for the return, the value would be stored in either (on x86) AL (1 byte), AX (2 bytes) or EAX (4 bytes). By telling interop of the native return type, it knows which parts of EAX to interpret.
Tips & Tricks:
Please add some!
hMapFile = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, 4096, "mIRC")
Alternative Managed API:
Do you know one? Please contribute it!
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 4:00:13 AM - Damon Carr-184.108.40.206
Please edit this page!
Do you have...