ReactOS  0.4.14-dev-41-g31d7680
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 568 of file send.cpp.

568  {
569  char* buf;
570  win_handle dirh, stream;
571  ULONG bss_size, i;
572  btrfs_send_subvol* bss;
577 
578  buf = (char*)malloc(SEND_BUFFER_LEN);
579 
580  try {
582  if (dirh == INVALID_HANDLE_VALUE)
583  throw last_error(GetLastError());
584 
585  stream = CreateFileW(file.c_str(), FILE_WRITE_DATA | DELETE, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
587  throw last_error(GetLastError());
588 
589  try {
590  bss_size = offsetof(btrfs_send_subvol, clones[0]) + (clones.size() * sizeof(HANDLE));
591  bss = (btrfs_send_subvol*)malloc(bss_size);
592  memset(bss, 0, bss_size);
593 
594  if (parent != L"") {
595  HANDLE parenth;
596 
598  if (parenth == INVALID_HANDLE_VALUE)
599  throw last_error(GetLastError());
600 
601  bss->parent = parenth;
602  } else
603  bss->parent = nullptr;
604 
605  bss->num_clones = clones.size();
606 
607  for (i = 0; i < bss->num_clones; i++) {
608  HANDLE h;
609 
611  if (h == INVALID_HANDLE_VALUE) {
612  auto le = GetLastError();
613  ULONG j;
614 
615  for (j = 0; j < i; j++) {
616  CloseHandle(bss->clones[j]);
617  }
618 
619  if (bss->parent) CloseHandle(bss->parent);
620 
621  throw last_error(le);
622  }
623 
624  bss->clones[i] = h;
625  }
626 
627  Status = NtFsControlFile(dirh, nullptr, nullptr, nullptr, &iosb, FSCTL_BTRFS_SEND_SUBVOL, bss, bss_size, nullptr, 0);
628 
629  for (i = 0; i < bss->num_clones; i++) {
630  CloseHandle(bss->clones[i]);
631  }
632 
633  if (bss->parent) CloseHandle(bss->parent);
634 
635  if (!NT_SUCCESS(Status))
636  throw ntstatus_error(Status);
637 
638  memcpy(header.magic, BTRFS_SEND_MAGIC, sizeof(header.magic));
639  header.version = 1;
640 
641  if (!WriteFile(stream, &header, sizeof(header), nullptr, nullptr))
642  throw last_error(GetLastError());
643 
644  do {
645  Status = NtFsControlFile(dirh, nullptr, nullptr, nullptr, &iosb, FSCTL_BTRFS_READ_SEND_BUFFER, nullptr, 0, buf, SEND_BUFFER_LEN);
646 
647  if (NT_SUCCESS(Status))
648  WriteFile(stream, buf, iosb.Information, nullptr, nullptr);
649  } while (NT_SUCCESS(Status));
650 
651  if (Status != STATUS_END_OF_FILE)
652  throw ntstatus_error(Status);
653 
654  end.length = 0;
655  end.cmd = BTRFS_SEND_CMD_END;
656  end.csum = 0x9dc96c50;
657 
658  if (!WriteFile(stream, &end, sizeof(end), nullptr, nullptr))
659  throw last_error(GetLastError());
660 
662  } catch (...) {
663  FILE_DISPOSITION_INFO fdi;
664 
665  fdi.DeleteFile = true;
666 
667  SetFileInformationByHandle(stream, FileDispositionInfo, &fdi, sizeof(FILE_DISPOSITION_INFO));
668 
669  throw;
670  }
671  } catch (...) {
672  free(buf);
673  throw;
674  }
675 
676  free(buf);
677 }
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:398
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:391
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:62
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:426
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:2897
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
HANDLE clones[1]
Definition: btrfsioctl.h:268
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:542
Status
Definition: gdiplustypes.h:24
#define BTRFS_SEND_MAGIC
Definition: btrfs.h:570
#define CreateFileW
Definition: compat.h:400
BOOL WINAPI SetFileInformationByHandle(HANDLE hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, LPVOID lpFileInformation, DWORD dwBufferSize)
Definition: reactos.cpp:177
#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:109
#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 226 of file send.cpp.

226  {
228 
229  return bs->Thread();
230 }
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 535 of file send.cpp.

535  {
536  try {
539  LUID luid;
540 
541  set_dpi_aware();
542 
544  throw last_error(GetLastError());
545 
546  if (!LookupPrivilegeValueW(nullptr, L"SeManageVolumePrivilege", &luid))
547  throw last_error(GetLastError());
548 
549  tp.PrivilegeCount = 1;
550  tp.Privileges[0].Luid = luid;
551  tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
552 
553  if (!AdjustTokenPrivileges(token, false, &tp, sizeof(TOKEN_PRIVILEGES), nullptr, nullptr))
554  throw last_error(GetLastError());
555 
556  BtrfsSend bs;
557 
558  bs.Open(hwnd, lpszCmdLine);
559  } catch (const exception& e) {
560  error_message(hwnd, e.what());
561  }
562 }
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:738
#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:2883
#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 683 of file send.cpp.

683  {
685  wstring subvol = L"", parent = L"", file = L"";
686  vector<wstring> clones;
687 
688  command_line_to_args(lpszCmdLine, args);
689 
690  if (args.size() >= 2) {
692  LUID luid;
693 
694  {
696 
698  return;
699 
700  if (!LookupPrivilegeValueW(nullptr, L"SeManageVolumePrivilege", &luid))
701  return;
702 
703  tp.PrivilegeCount = 1;
704  tp.Privileges[0].Luid = luid;
705  tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
706 
707  if (!AdjustTokenPrivileges(token, false, &tp, sizeof(TOKEN_PRIVILEGES), nullptr, nullptr))
708  return;
709  }
710 
711  for (unsigned int i = 0; i < args.size(); i++) {
712  if (args[i][0] == '-') {
713  if (args[i][2] == 0 && i < args.size() - 1) {
714  if (args[i][1] == 'p') {
715  parent = args[i+1];
716  i++;
717  } else if (args[i][1] == 'c') {
718  clones.push_back(args[i+1]);
719  i++;
720  }
721  }
722  } else {
723  if (subvol == L"")
724  subvol = args[i];
725  else if (file == L"")
726  file = args[i];
727  }
728  }
729 
730  if (subvol != L"" && file != L"") {
731  try {
732  send_subvol(subvol, file, parent, clones);
733  } catch (const exception& e) {
734  cerr << "Error: " << e.what() << endl;
735  }
736  }
737  }
738 }
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:568
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:2883
#define TOKEN_QUERY
Definition: setypes.h:874
r parent
Definition: btrfs.c:2897
_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:376
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
#define TOKEN_ADJUST_PRIVILEGES
Definition: setypes.h:876
#define args
Definition: format.c:66
void command_line_to_args(LPWSTR cmdline, vector< wstring > args)
Definition: main.cpp:610
Definition: fci.c:126

◆ stub_SendDlgProc()

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

Definition at line 509 of file send.cpp.

509  {
510  BtrfsSend* bs;
511 
512  if (uMsg == WM_INITDIALOG) {
514  bs = (BtrfsSend*)lParam;
515  } else
517 
518  if (bs)
519  return bs->SendDlgProc(hwndDlg, uMsg, wParam, lParam);
520  else
521  return false;
522 }
#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().