ReactOS  0.4.14-dev-614-gbfd8a84
send.cpp File Reference
#include "shellext.h"
#include "send.h"
#include "resource.h"
#include <stddef.h>
#include <shlobj.h>
#include <iostream>
Include dependency graph for send.cpp:

Go to the source code of this file.

Macros

#define SEND_BUFFER_LEN   1048576
 

Functions

static DWORD WINAPI send_thread (LPVOID lpParameter)
 
static INT_PTR CALLBACK stub_SendDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void CALLBACK SendSubvolGUIW (HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow)
 
static void send_subvol (const wstring &subvol, const wstring &file, const wstring &parent, const vector< wstring > &clones)
 
void CALLBACK SendSubvolW (HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow)
 

Macro Definition Documentation

◆ SEND_BUFFER_LEN

#define SEND_BUFFER_LEN   1048576

Definition at line 28 of file send.cpp.

Function Documentation

◆ send_subvol()

static void send_subvol ( const wstring &  subvol,
const wstring &  file,
const wstring &  parent,
const vector< wstring > &  clones 
)
static

Definition at line 571 of file send.cpp.

571  {
572  char* buf;
573  win_handle dirh, stream;
574  ULONG i;
575  btrfs_send_subvol* bss;
580 
581  buf = (char*)malloc(SEND_BUFFER_LEN);
582 
583  try {
585  if (dirh == INVALID_HANDLE_VALUE)
586  throw last_error(GetLastError());
587 
588  stream = CreateFileW(file.c_str(), FILE_WRITE_DATA | DELETE, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
590  throw last_error(GetLastError());
591 
592  try {
593  size_t bss_size = offsetof(btrfs_send_subvol, clones[0]) + (clones.size() * sizeof(HANDLE));
594  bss = (btrfs_send_subvol*)malloc(bss_size);
595  memset(bss, 0, bss_size);
596 
597  if (parent != L"") {
598  HANDLE parenth;
599 
601  if (parenth == INVALID_HANDLE_VALUE)
602  throw last_error(GetLastError());
603 
604  bss->parent = parenth;
605  } else
606  bss->parent = nullptr;
607 
608  bss->num_clones = (ULONG)clones.size();
609 
610  for (i = 0; i < bss->num_clones; i++) {
611  HANDLE h;
612 
614  if (h == INVALID_HANDLE_VALUE) {
615  auto le = GetLastError();
616  ULONG j;
617 
618  for (j = 0; j < i; j++) {
619  CloseHandle(bss->clones[j]);
620  }
621 
622  if (bss->parent) CloseHandle(bss->parent);
623 
624  throw last_error(le);
625  }
626 
627  bss->clones[i] = h;
628  }
629 
630  Status = NtFsControlFile(dirh, nullptr, nullptr, nullptr, &iosb, FSCTL_BTRFS_SEND_SUBVOL, bss, (ULONG)bss_size, nullptr, 0);
631 
632  for (i = 0; i < bss->num_clones; i++) {
633  CloseHandle(bss->clones[i]);
634  }
635 
636  if (bss->parent) CloseHandle(bss->parent);
637 
638  if (!NT_SUCCESS(Status))
639  throw ntstatus_error(Status);
640 
641  memcpy(header.magic, BTRFS_SEND_MAGIC, sizeof(header.magic));
642  header.version = 1;
643 
644  if (!WriteFile(stream, &header, sizeof(header), nullptr, nullptr))
645  throw last_error(GetLastError());
646 
647  do {
648  Status = NtFsControlFile(dirh, nullptr, nullptr, nullptr, &iosb, FSCTL_BTRFS_READ_SEND_BUFFER, nullptr, 0, buf, SEND_BUFFER_LEN);
649 
650  if (NT_SUCCESS(Status))
651  WriteFile(stream, buf, (DWORD)iosb.Information, nullptr, nullptr);
652  } while (NT_SUCCESS(Status));
653 
654  if (Status != STATUS_END_OF_FILE)
655  throw ntstatus_error(Status);
656 
657  end.length = 0;
658  end.cmd = BTRFS_SEND_CMD_END;
659  end.csum = 0x9dc96c50;
660 
661  if (!WriteFile(stream, &end, sizeof(end), nullptr, nullptr))
662  throw last_error(GetLastError());
663 
665  } catch (...) {
666  FILE_DISPOSITION_INFO fdi;
667 
668  fdi.DeleteFile = true;
669 
670  Status = NtSetInformationFile(stream, &iosb, &fdi, sizeof(FILE_DISPOSITION_INFO), FileDispositionInformation);
671  if (!NT_SUCCESS(Status))
672  throw ntstatus_error(Status);
673 
674  throw;
675  }
676  } catch (...) {
677  free(buf);
678  throw;
679  }
680 
681  free(buf);
682 }
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
static PIO_STATUS_BLOCK iosb
Definition: file.c:98
#define CloseHandle
Definition: compat.h:406
NTSTATUS NTAPI NtSetInformationFile(HANDLE hFile, PIO_STATUS_BLOCK io, PVOID ptr, ULONG len, FILE_INFORMATION_CLASS FileInformationClass)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define free
Definition: debug_ros.c:5
BOOL WINAPI SetEndOfFile(HANDLE hFile)
Definition: fileinfo.c:1154
LONG NTSTATUS
Definition: precomp.h:26
#define SEND_BUFFER_LEN
Definition: send.cpp:28
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
NTSYSCALLAPI NTSTATUS NTAPI NtFsControlFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG FsControlCode, PVOID InputBuffer, ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength)
GLuint GLuint end
Definition: gl.h:1545
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_SHARE_READ
Definition: compat.h:125
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define STATUS_END_OF_FILE
Definition: shellext.h:67
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FSCTL_BTRFS_SEND_SUBVOL
Definition: btrfsioctl.h:36
#define offsetof(TYPE, MEMBER)
#define FILE_WRITE_DATA
Definition: nt_native.h:631
#define OPEN_EXISTING
Definition: compat.h:434
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
r parent
Definition: btrfs.c:2869
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
HANDLE clones[1]
Definition: btrfsioctl.h:269
unsigned long DWORD
Definition: ntddk_ex.h:95
PVOID HANDLE
Definition: typedefs.h:71
#define FSCTL_BTRFS_READ_SEND_BUFFER
Definition: btrfsioctl.h:37
#define OPEN_ALWAYS
Definition: disk.h:70
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
static const WCHAR L[]
Definition: oid.c:1250
Definition: parse.h:22
GLuint GLuint stream
Definition: glext.h:7522
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define BTRFS_SEND_CMD_END
Definition: btrfs.h:543
Status
Definition: gdiplustypes.h:24
#define BTRFS_SEND_MAGIC
Definition: btrfs.h:571
#define CreateFileW
Definition: compat.h:408
#define FILE_FLAG_BACKUP_SEMANTICS
Definition: disk.h:41
size_type size() const
Definition: _vector.h:192
unsigned int ULONG
Definition: retypes.h:1
#define malloc
Definition: debug_ros.c:4
#define memset(x, y, z)
Definition: compat.h:39
struct CFHEADER header
Definition: fdi.c:101
#define DELETE
Definition: nt_native.h:57
Definition: fci.c:126

Referenced by fsctl_request(), and SendSubvolW().

◆ send_thread()

static DWORD WINAPI send_thread ( LPVOID  lpParameter)
static

Definition at line 227 of file send.cpp.

227  {
229 
230  return bs->Thread();
231 }
Definition: send.h:27
LPVOID lpParameter
Definition: kernel32.h:241
static struct msdos_boot_sector bs
Definition: mkdosfs.c:539

Referenced by send_subvol(), and BtrfsSend::StartSend().

◆ SendSubvolGUIW()

void CALLBACK SendSubvolGUIW ( HWND  hwnd,
HINSTANCE  hinst,
LPWSTR  lpszCmdLine,
int  nCmdShow 
)

Definition at line 538 of file send.cpp.

538  {
539  try {
542  LUID luid;
543 
544  set_dpi_aware();
545 
547  throw last_error(GetLastError());
548 
549  if (!LookupPrivilegeValueW(nullptr, L"SeManageVolumePrivilege", &luid))
550  throw last_error(GetLastError());
551 
552  tp.PrivilegeCount = 1;
553  tp.Privileges[0].Luid = luid;
554  tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
555 
556  if (!AdjustTokenPrivileges(token, false, &tp, sizeof(TOKEN_PRIVILEGES), nullptr, nullptr))
557  throw last_error(GetLastError());
558 
559  BtrfsSend bs;
560 
561  bs.Open(hwnd, lpszCmdLine);
562  } catch (const exception& e) {
563  error_message(hwnd, e.what());
564  }
565 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
BOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpPrivilegeName, PLUID lpLuid)
Definition: misc.c:782
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define SE_PRIVILEGE_ENABLED
Definition: setypes.h:63
Definition: send.h:27
void error_message(HWND hwnd, const char *msg)
Definition: main.cpp:785
#define e
Definition: ke_i.h:82
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2855
#define TOKEN_QUERY
Definition: setypes.h:874
HANDLE WINAPI GetCurrentProcess(VOID)
Definition: proc.c:1138
static const WCHAR L[]
Definition: oid.c:1250
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
Definition: security.c:376
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:296
static struct msdos_boot_sector bs
Definition: mkdosfs.c:539
#define TOKEN_ADJUST_PRIVILEGES
Definition: setypes.h:876
void set_dpi_aware()
Definition: main.cpp:50

◆ SendSubvolW()

void CALLBACK SendSubvolW ( HWND  hwnd,
HINSTANCE  hinst,
LPWSTR  lpszCmdLine,
int  nCmdShow 
)

Definition at line 688 of file send.cpp.

688  {
690  wstring subvol = L"", parent = L"", file = L"";
691  vector<wstring> clones;
692 
693  command_line_to_args(lpszCmdLine, args);
694 
695  if (args.size() >= 2) {
697  LUID luid;
698 
699  {
701 
703  return;
704 
705  if (!LookupPrivilegeValueW(nullptr, L"SeManageVolumePrivilege", &luid))
706  return;
707 
708  tp.PrivilegeCount = 1;
709  tp.Privileges[0].Luid = luid;
710  tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
711 
712  if (!AdjustTokenPrivileges(token, false, &tp, sizeof(TOKEN_PRIVILEGES), nullptr, nullptr))
713  return;
714  }
715 
716  for (unsigned int i = 0; i < args.size(); i++) {
717  if (args[i][0] == '-') {
718  if (args[i][2] == 0 && i < args.size() - 1) {
719  if (args[i][1] == 'p') {
720  parent = args[i+1];
721  i++;
722  } else if (args[i][1] == 'c') {
723  clones.push_back(args[i+1]);
724  i++;
725  }
726  }
727  } else {
728  if (subvol == L"")
729  subvol = args[i];
730  else if (file == L"")
731  file = args[i];
732  }
733  }
734 
735  if (subvol != L"" && file != L"") {
736  try {
737  send_subvol(subvol, file, parent, clones);
738  } catch (const exception& e) {
739  cerr << "Error: " << e.what() << endl;
740  }
741  }
742  }
743 }
BOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpPrivilegeName, PLUID lpLuid)
Definition: misc.c:782
static void send_subvol(const wstring &subvol, const wstring &file, const wstring &parent, const vector< wstring > &clones)
Definition: send.cpp:571
Definition: match.c:390
#define SE_PRIVILEGE_ENABLED
Definition: setypes.h:63
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
basic_ostream< _CharT, _Traits > &_STLP_CALL endl(basic_ostream< _CharT, _Traits > &__os)
Definition: _ostream.h:357
#define e
Definition: ke_i.h:82
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2855
#define TOKEN_QUERY
Definition: setypes.h:874
r parent
Definition: btrfs.c:2869
_STLP_DECLSPEC _Stl_aligned_buffer< ostream > cerr
Definition: iostream.cpp:102
HANDLE WINAPI GetCurrentProcess(VOID)
Definition: proc.c:1138
void push_back(const _Tp &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _vector.h:379
static const WCHAR L[]
Definition: oid.c:1250
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
Definition: security.c:376
void command_line_to_args(LPWSTR cmdline, vector< wstring > &args)
Definition: main.cpp:647
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:296
#define TOKEN_ADJUST_PRIVILEGES
Definition: setypes.h:876
#define args
Definition: format.c:66
Definition: fci.c:126

◆ stub_SendDlgProc()

static INT_PTR CALLBACK stub_SendDlgProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 512 of file send.cpp.

512  {
513  BtrfsSend* bs;
514 
515  if (uMsg == WM_INITDIALOG) {
517  bs = (BtrfsSend*)lParam;
518  } else
520 
521  if (bs)
522  return bs->SendDlgProc(hwndDlg, uMsg, wParam, lParam);
523  else
524  return false;
525 }
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
Definition: send.h:27
#define GWLP_USERDATA
Definition: treelist.c:63
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define GetWindowLongPtr
Definition: treelist.c:73
static struct msdos_boot_sector bs
Definition: mkdosfs.c:539
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139

Referenced by BtrfsSend::Open().