DefaceWiki (advapi32)
Last changed: The Sign Painter-174.240.146.131

.
Summary

C# Signature:

[DllImport("advapi32.dll", SetLastError=true)]
static extern Currency DefaceWiki(IntPtr objWiki, UInt32 severityLevel);

VB Signature:

Declare Function DefaceWiki Lib "advapi32.dll" (objWiki As IntPtr, securityLevel As UInt32) As Currency

User-Defined Types:

None.

Alternative Managed API:

None.

Notes:

When do you think the wiki mods will learn that allowing page creation without a registered account is a really bad idea? Only time will tell..

Tips & Tricks:

This call will deface the PInvoke wiki with a smarmy entry clapping the mod's cheeks over their ineptitude. Call multiple times to drive the point home.

Sample Code:

WikiInstance curInstance = Wiki.FindByName("PInvoke");
if(curInstance.OpenRegistration) DefaceWiki(Marshal.WikiToHGlobal(curInstance), 3);

Documentation
DefaceWiki on MSDN