IoDeleteSymbolicLink

NTSTATUS __stdcall IoDeleteSymbolicLink(_UNICODE_STRING *SymbolicLinkName){
  int TemporaryObject; 
  struct _OBJECT_ATTRIBUTES ObjectAttributes; 
  void *LinkHandle; 
  *(&ObjectAttributes.Length + 1) = 0;
  memset(&ObjectAttributes.Attributes + 1, 0, 20);
  LinkHandle = 0i64;
  ObjectAttributes.RootDirectory = 0i64;
  ObjectAttributes.ObjectName = SymbolicLinkName;
  ObjectAttributes.Length = 48;
  ObjectAttributes.Attributes = 576;
  TemporaryObject = ZwOpenSymbolicLinkObject(&LinkHandle, 0x10000ui64, &ObjectAttributes);
  if( TemporaryObject >= 0 )
  {
    TemporaryObject = ZwMakeTemporaryObject(LinkHandle);
    if( TemporaryObject >= 0 )
      ZwClose(LinkHandle);
  }
  return TemporaryObject;
}

Referenced by:

No references.