Fixed windows compilation

pull/7/head
ko1N 4 years ago
parent f4e6e92cb0
commit 9a90bf5dd9

@ -9,6 +9,10 @@ More information about pcileech can be found under https://github.com/ufrisk/pci
## Compilation
- Make sure the git submodule is checked out
- Make sure gcc, clang, libusb-1.0 are installed (on windows you can use chocolatey)
- Run `cargo build --release`
This project uses libusb to interface with the ftdi chip over usb. Make sure you have the appropiate headers installed. More information about the libusb implementation can be found in the https://github.com/a1ien/rusb project.
### Using the install script

@ -16,11 +16,8 @@ fn os_define() -> &'static str {
"LINUX"
}
fn main() -> () {
//let target = env::var("TARGET").unwrap();
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
let objs = vec![
fn build_leechcore(target: &str) {
let mut files = vec![
"oscompatibility.c",
"leechcore.c",
"util.c",
@ -32,44 +29,134 @@ fn main() -> () {
"device_usb3380.c",
"leechrpcclient.c",
];
pkg_config::probe_library("libusb-1.0")
.unwrap_or_else(|err| panic!("Failed to find libusb-1.0 via pkg-config: {:?}", err));
// TODO: windows
// TODO: pkg_config ?
let libusb_flags = Command::new("pkg-config")
.args(&["libusb-1.0", "--libs", "--cflags"])
.output()
.unwrap_or_else(|err| panic!("Failed to find libusb-1.0 via pkg-config: {:?}", err));
if target.contains("windows") {
files.push("leechrpc_c.c");
files.push("leechrpcshared.c");
}
let mut cfg = cc::Build::new();
cfg.cpp(false)
.files(
objs.iter()
files
.iter()
.map(|o| "src/leechcore/leechcore/".to_string() + o)
.collect::<Vec<_>>(),
)
.flag(&format!("-D{}", os_define()))
.flag("-fPIC")
.flag("-fvisibility=hidden")
.flag("-pthread")
.flag("-g")
.flag("-ldl");
for flag in String::from_utf8_lossy(&libusb_flags.stdout)
.trim()
.split(" ")
{
cfg.flag(flag);
.flag(&format!("-D{}", os_define()));
if !target.contains("windows") {
// setup additional flags
cfg.flag("-fvisibility=hidden");
cfg.flag("-fPIC");
cfg.flag("-pthread");
cfg.flag("-g");
cfg.flag("-ldl");
// add libusb-1.0 on *nix
pkg_config::probe_library("libusb-1.0")
.unwrap_or_else(|err| panic!("Failed to find libusb-1.0 via pkg-config: {:?}", err));
let libusb_flags = Command::new("pkg-config")
.args(&["libusb-1.0", "--libs", "--cflags"])
.output()
.unwrap_or_else(|err| panic!("Failed to find libusb-1.0 via pkg-config: {:?}", err));
for flag in String::from_utf8_lossy(&libusb_flags.stdout)
.trim()
.split(" ")
{
cfg.flag(flag);
}
} else {
// copy pre-compiled idl file into the leechcore folder
std::fs::copy("gen/leechrpc_c.c", "src/leechcore/leechcore/leechrpc_c.c").unwrap();
std::fs::copy("gen/leechrpc_h.h", "src/leechcore/leechcore/leechrpc_h.h").unwrap();
// link against required libraries
println!("cargo:rustc-link-lib=rpcrt4");
println!("cargo:rustc-link-lib=setupapi");
println!("cargo:rustc-link-lib=winusb");
println!("cargo:rustc-link-lib=ws2_32");
}
cfg.compile("libleechcore.a");
if target.contains("windows") {
// remove temporary generated files
std::fs::remove_file("src/leechcore/leechcore/leechrpc_c.c").unwrap();
std::fs::remove_file("src/leechcore/leechcore/leechrpc_h.h").unwrap();
}
println!("cargo:rustc-link-lib=static=leechcore");
}
fn main() -> () {
let target = env::var("TARGET").unwrap();
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
// build leechcore
build_leechcore(&target);
// generate bindings
let bindings = bindgen::builder()
let mut builder = bindgen::builder()
.clang_arg(format!("-D{}", os_define()))
.header("./src/leechcore/leechcore/leechcore.h")
.header("./src/leechcore/leechcore/leechcore.h");
// workaround for windows.h
// see https://github.com/rust-lang/rust-bindgen/issues/1556
if target.contains("windows") {
builder = builder
.blacklist_type("LPMONITORINFOEXA?W?")
.blacklist_type("LPTOP_LEVEL_EXCEPTION_FILTER")
.blacklist_type("MONITORINFOEXA?W?")
.blacklist_type("PEXCEPTION_FILTER")
.blacklist_type("PEXCEPTION_ROUTINE")
.blacklist_type("PSLIST_HEADER")
.blacklist_type("PTOP_LEVEL_EXCEPTION_FILTER")
.blacklist_type("PVECTORED_EXCEPTION_HANDLER")
.blacklist_type("_?L?P?CONTEXT")
.blacklist_type("_?L?P?EXCEPTION_POINTERS")
.blacklist_type("_?P?DISPATCHER_CONTEXT")
.blacklist_type("_?P?EXCEPTION_REGISTRATION_RECORD")
.blacklist_type("_?P?IMAGE_TLS_DIRECTORY.*")
.blacklist_type("_?P?NT_TIB")
.blacklist_type("tagMONITORINFOEXA")
.blacklist_type("tagMONITORINFOEXW")
.blacklist_function("AddVectoredContinueHandler")
.blacklist_function("AddVectoredExceptionHandler")
.blacklist_function("CopyContext")
.blacklist_function("GetThreadContext")
.blacklist_function("GetXStateFeaturesMask")
.blacklist_function("InitializeContext")
.blacklist_function("InitializeContext2")
.blacklist_function("InitializeSListHead")
.blacklist_function("InterlockedFlushSList")
.blacklist_function("InterlockedPopEntrySList")
.blacklist_function("InterlockedPushEntrySList")
.blacklist_function("InterlockedPushListSListEx")
.blacklist_function("LocateXStateFeature")
.blacklist_function("QueryDepthSList")
.blacklist_function("RaiseFailFastException")
.blacklist_function("RtlCaptureContext")
.blacklist_function("RtlCaptureContext2")
.blacklist_function("RtlFirstEntrySList")
.blacklist_function("RtlInitializeSListHead")
.blacklist_function("RtlInterlockedFlushSList")
.blacklist_function("RtlInterlockedPopEntrySList")
.blacklist_function("RtlInterlockedPushEntrySList")
.blacklist_function("RtlInterlockedPushListSListEx")
.blacklist_function("RtlQueryDepthSList")
.blacklist_function("RtlRestoreContext")
.blacklist_function("RtlUnwindEx")
.blacklist_function("RtlVirtualUnwind")
.blacklist_function("SetThreadContext")
.blacklist_function("SetUnhandledExceptionFilter")
.blacklist_function("SetXStateFeaturesMask")
.blacklist_function("UnhandledExceptionFilter")
.blacklist_function("__C_specific_handler");
}
let bindings = builder
.generate()
.unwrap_or_else(|err| panic!("Failed to generate bindings: {:?}", err));
@ -77,6 +164,4 @@ fn main() -> () {
bindings
.write_to_file(&bindings_path)
.unwrap_or_else(|_| panic!("Failed to write {}", bindings_path.display()));
println!("cargo:rustc-link-lib=static=leechcore");
}

@ -0,0 +1,732 @@
/* this ALWAYS GENERATED file contains the RPC client stubs */
/* File created by MIDL compiler version 8.01.0622 */
/* at Tue Jan 19 03:14:07 2038
*/
/* Compiler settings for leechrpc.idl:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
protocol : all , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#if defined(_M_AMD64)
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning( disable: 4211 ) /* redefine extern to static */
#pragma warning( disable: 4232 ) /* dllimport identity*/
#pragma warning( disable: 4024 ) /* array to pointer mapping*/
#include <string.h>
#include "leechrpc_h.h"
#define TYPE_FORMAT_STRING_SIZE 43
#define PROC_FORMAT_STRING_SIZE 61
#define EXPR_FORMAT_STRING_SIZE 1
#define TRANSMIT_AS_TABLE_SIZE 0
#define WIRE_MARSHAL_TABLE_SIZE 0
typedef struct _leechrpc_MIDL_TYPE_FORMAT_STRING
{
short Pad;
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
} leechrpc_MIDL_TYPE_FORMAT_STRING;
typedef struct _leechrpc_MIDL_PROC_FORMAT_STRING
{
short Pad;
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
} leechrpc_MIDL_PROC_FORMAT_STRING;
typedef struct _leechrpc_MIDL_EXPR_FORMAT_STRING
{
long Pad;
unsigned char Format[ EXPR_FORMAT_STRING_SIZE ];
} leechrpc_MIDL_EXPR_FORMAT_STRING;
static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax =
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
static const RPC_SYNTAX_IDENTIFIER _NDR64_RpcTransferSyntax =
{{0x71710533,0xbeba,0x4937,{0x83,0x19,0xb5,0xdb,0xef,0x9c,0xcc,0x36}},{1,0}};
extern const leechrpc_MIDL_TYPE_FORMAT_STRING leechrpc__MIDL_TypeFormatString;
extern const leechrpc_MIDL_PROC_FORMAT_STRING leechrpc__MIDL_ProcFormatString;
extern const leechrpc_MIDL_EXPR_FORMAT_STRING leechrpc__MIDL_ExprFormatString;
#define GENERIC_BINDING_TABLE_SIZE 0
/* Standard interface: LeechRpc, ver. 1.0,
GUID={0x906B0DC2,0x1337,0x0666,{0x00,0x01,0x00,0x00,0x65,0x7A,0x63,0xDD}} */
extern const MIDL_STUBLESS_PROXY_INFO LeechRpc_ProxyInfo;
static const RPC_PROTSEQ_ENDPOINT __RpcProtseqEndpoint[] =
{
{(unsigned char *) "ncacn_ip_tcp", (unsigned char *) "28473"}
};
static const RPC_CLIENT_INTERFACE LeechRpc___RpcClientInterface =
{
sizeof(RPC_CLIENT_INTERFACE),
{{0x906B0DC2,0x1337,0x0666,{0x00,0x01,0x00,0x00,0x65,0x7A,0x63,0xDD}},{1,0}},
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
0,
1,
(RPC_PROTSEQ_ENDPOINT *)__RpcProtseqEndpoint,
0,
&LeechRpc_ProxyInfo,
0x02000000
};
RPC_IF_HANDLE LeechRpc_v1_0_c_ifspec = (RPC_IF_HANDLE)& LeechRpc___RpcClientInterface;
extern const MIDL_STUB_DESC LeechRpc_StubDesc;
static RPC_BINDING_HANDLE LeechRpc__MIDL_AutoBindHandle;
error_status_t LeechRpc_ReservedSubmitCommand(
/* [in] */ handle_t hBinding,
/* [in] */ long cbIn,
/* [size_is][in] */ byte *pbIn,
/* [out] */ long *pcbOut,
/* [size_is][size_is][out] */ byte **ppbOut)
{
CLIENT_CALL_RETURN _RetVal;
_RetVal = NdrClientCall3(
( PMIDL_STUBLESS_PROXY_INFO )&LeechRpc_ProxyInfo,
0,
0,
hBinding,
cbIn,
pbIn,
pcbOut,
ppbOut);
return ( error_status_t )_RetVal.Simple;
}
#if !defined(__RPC_WIN64__)
#error Invalid build platform for this stub.
#endif
static const leechrpc_MIDL_PROC_FORMAT_STRING leechrpc__MIDL_ProcFormatString =
{
0,
{
/* Procedure LeechRpc_ReservedSubmitCommand */
0x0, /* 0 */
0x48, /* Old Flags: */
/* 2 */ NdrFcLong( 0x0 ), /* 0 */
/* 6 */ NdrFcShort( 0x0 ), /* 0 */
/* 8 */ NdrFcShort( 0x30 ), /* X64 Stack size/offset = 48 */
/* 10 */ 0x32, /* FC_BIND_PRIMITIVE */
0x0, /* 0 */
/* 12 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
/* 14 */ NdrFcShort( 0x8 ), /* 8 */
/* 16 */ NdrFcShort( 0x24 ), /* 36 */
/* 18 */ 0x47, /* Oi2 Flags: srv must size, clt must size, has return, has ext, */
0x5, /* 5 */
/* 20 */ 0xa, /* 10 */
0x7, /* Ext Flags: new corr desc, clt corr check, srv corr check, */
/* 22 */ NdrFcShort( 0x1 ), /* 1 */
/* 24 */ NdrFcShort( 0x1 ), /* 1 */
/* 26 */ NdrFcShort( 0x0 ), /* 0 */
/* 28 */ NdrFcShort( 0x0 ), /* 0 */
/* Parameter cbIn */
/* 30 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */
/* 32 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
/* 34 */ 0x8, /* FC_LONG */
0x0, /* 0 */
/* Parameter pbIn */
/* 36 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */
/* 38 */ NdrFcShort( 0x10 ), /* X64 Stack size/offset = 16 */
/* 40 */ NdrFcShort( 0x6 ), /* Type Offset=6 */
/* Parameter pcbOut */
/* 42 */ NdrFcShort( 0x2150 ), /* Flags: out, base type, simple ref, srv alloc size=8 */
/* 44 */ NdrFcShort( 0x18 ), /* X64 Stack size/offset = 24 */
/* 46 */ 0x8, /* FC_LONG */
0x0, /* 0 */
/* Parameter ppbOut */
/* 48 */ NdrFcShort( 0x2013 ), /* Flags: must size, must free, out, srv alloc size=8 */
/* 50 */ NdrFcShort( 0x20 ), /* X64 Stack size/offset = 32 */
/* 52 */ NdrFcShort( 0x16 ), /* Type Offset=22 */
/* Return value */
/* 54 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
/* 56 */ NdrFcShort( 0x28 ), /* X64 Stack size/offset = 40 */
/* 58 */ 0x10, /* FC_ERROR_STATUS_T */
0x0, /* 0 */
0x0
}
};
static const leechrpc_MIDL_TYPE_FORMAT_STRING leechrpc__MIDL_TypeFormatString =
{
0,
{
NdrFcShort( 0x0 ), /* 0 */
/* 2 */
0x11, 0x0, /* FC_RP */
/* 4 */ NdrFcShort( 0x2 ), /* Offset= 2 (6) */
/* 6 */
0x1b, /* FC_CARRAY */
0x0, /* 0 */
/* 8 */ NdrFcShort( 0x1 ), /* 1 */
/* 10 */ 0x28, /* Corr desc: parameter, FC_LONG */
0x0, /* */
/* 12 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
/* 14 */ NdrFcShort( 0x1 ), /* Corr flags: early, */
/* 16 */ 0x1, /* FC_BYTE */
0x5b, /* FC_END */
/* 18 */
0x11, 0xc, /* FC_RP [alloced_on_stack] [simple_pointer] */
/* 20 */ 0x8, /* FC_LONG */
0x5c, /* FC_PAD */
/* 22 */
0x11, 0x14, /* FC_RP [alloced_on_stack] [pointer_deref] */
/* 24 */ NdrFcShort( 0x2 ), /* Offset= 2 (26) */
/* 26 */
0x12, 0x20, /* FC_UP [maybenull_sizeis] */
/* 28 */ NdrFcShort( 0x2 ), /* Offset= 2 (30) */
/* 30 */
0x1b, /* FC_CARRAY */
0x0, /* 0 */
/* 32 */ NdrFcShort( 0x1 ), /* 1 */
/* 34 */ 0x28, /* Corr desc: parameter, FC_LONG */
0x54, /* FC_DEREFERENCE */
/* 36 */ NdrFcShort( 0x18 ), /* X64 Stack size/offset = 24 */
/* 38 */ NdrFcShort( 0x1 ), /* Corr flags: early, */
/* 40 */ 0x1, /* FC_BYTE */
0x5b, /* FC_END */
0x0
}
};
static const unsigned short LeechRpc_FormatStringOffsetTable[] =
{
0
};
#endif /* defined(_M_AMD64)*/
/* this ALWAYS GENERATED file contains the RPC client stubs */
/* File created by MIDL compiler version 8.01.0622 */
/* at Tue Jan 19 03:14:07 2038
*/
/* Compiler settings for leechrpc.idl:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
protocol : all , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#if defined(_M_AMD64)
#if !defined(__RPC_WIN64__)
#error Invalid build platform for this stub.
#endif
#include "ndr64types.h"
#include "pshpack8.h"
typedef
NDR64_FORMAT_CHAR
__midl_frag15_t;
extern const __midl_frag15_t __midl_frag15;
typedef
NDR64_FORMAT_CHAR
__midl_frag14_t;
extern const __midl_frag14_t __midl_frag14;
typedef
struct
{
NDR64_FORMAT_UINT32 frag1;
struct _NDR64_EXPR_OPERATOR frag2;
struct _NDR64_EXPR_VAR frag3;
}
__midl_frag13_t;
extern const __midl_frag13_t __midl_frag13;
typedef
struct
{
struct _NDR64_CONF_ARRAY_HEADER_FORMAT frag1;
struct _NDR64_ARRAY_ELEMENT_INFO frag2;
}
__midl_frag12_t;
extern const __midl_frag12_t __midl_frag12;
typedef
struct _NDR64_POINTER_FORMAT
__midl_frag11_t;
extern const __midl_frag11_t __midl_frag11;
typedef
struct _NDR64_POINTER_FORMAT
__midl_frag10_t;
extern const __midl_frag10_t __midl_frag10;
typedef
NDR64_FORMAT_CHAR
__midl_frag9_t;
extern const __midl_frag9_t __midl_frag9;
typedef
struct _NDR64_POINTER_FORMAT
__midl_frag8_t;
extern const __midl_frag8_t __midl_frag8;
typedef
struct
{
NDR64_FORMAT_UINT32 frag1;
struct _NDR64_EXPR_VAR frag2;
}
__midl_frag6_t;
extern const __midl_frag6_t __midl_frag6;
typedef
struct
{
struct _NDR64_CONF_ARRAY_HEADER_FORMAT frag1;
struct _NDR64_ARRAY_ELEMENT_INFO frag2;
}
__midl_frag5_t;
extern const __midl_frag5_t __midl_frag5;
typedef
struct _NDR64_POINTER_FORMAT
__midl_frag4_t;
extern const __midl_frag4_t __midl_frag4;
typedef
struct
{
struct _NDR64_PROC_FORMAT frag1;
struct _NDR64_BIND_AND_NOTIFY_EXTENSION frag2;
struct _NDR64_PARAM_FORMAT frag3;
struct _NDR64_PARAM_FORMAT frag4;
struct _NDR64_PARAM_FORMAT frag5;
struct _NDR64_PARAM_FORMAT frag6;
struct _NDR64_PARAM_FORMAT frag7;
}
__midl_frag2_t;
extern const __midl_frag2_t __midl_frag2;
typedef
NDR64_FORMAT_UINT32
__midl_frag1_t;
extern const __midl_frag1_t __midl_frag1;
static const __midl_frag15_t __midl_frag15 =
0x13 /* FC64_ERROR_STATUS_T */;
static const __midl_frag14_t __midl_frag14 =
0x2 /* FC64_INT8 */;
static const __midl_frag13_t __midl_frag13 =
{
/* */
(NDR64_UINT32) 1 /* 0x1 */,
{
/* struct _NDR64_EXPR_OPERATOR */
0x4, /* FC_EXPR_OPER */
0x5, /* OP_UNARY_INDIRECTION */
0x5, /* FC64_INT32 */
(NDR64_UINT8) 0 /* 0x0 */
},
{
/* struct _NDR64_EXPR_VAR */
0x3, /* FC_EXPR_VAR */
0x7, /* FC64_INT64 */
(NDR64_UINT16) 0 /* 0x0 */,
(NDR64_UINT32) 24 /* 0x18 */ /* Offset */
}
};
static const __midl_frag12_t __midl_frag12 =
{
/* *byte */
{
/* *byte */
0x41, /* FC64_CONF_ARRAY */
(NDR64_UINT8) 0 /* 0x0 */,
{
/* *byte */
0,
0,
0,
0,
0,
0,
0,
0
},
(NDR64_UINT8) 0 /* 0x0 */,
(NDR64_UINT32) 1 /* 0x1 */,
&__midl_frag13
},
{
/* struct _NDR64_ARRAY_ELEMENT_INFO */
(NDR64_UINT32) 1 /* 0x1 */,
&__midl_frag14
}
};
static const __midl_frag11_t __midl_frag11 =
{
/* *byte */
0x21, /* FC64_UP */
(NDR64_UINT8) 32 /* 0x20 */,
(NDR64_UINT16) 0 /* 0x0 */,
&__midl_frag12
};
static const __midl_frag10_t __midl_frag10 =
{
/* **byte */
0x20, /* FC64_RP */
(NDR64_UINT8) 20 /* 0x14 */,
(NDR64_UINT16) 0 /* 0x0 */,
&__midl_frag11
};
static const __midl_frag9_t __midl_frag9 =
0x5 /* FC64_INT32 */;
static const __midl_frag8_t __midl_frag8 =
{
/* *long */
0x20, /* FC64_RP */
(NDR64_UINT8) 12 /* 0xc */,
(NDR64_UINT16) 0 /* 0x0 */,
&__midl_frag9
};
static const __midl_frag6_t __midl_frag6 =
{
/* */
(NDR64_UINT32) 1 /* 0x1 */,
{
/* struct _NDR64_EXPR_VAR */
0x3, /* FC_EXPR_VAR */
0x5, /* FC64_INT32 */
(NDR64_UINT16) 0 /* 0x0 */,
(NDR64_UINT32) 8 /* 0x8 */ /* Offset */
}
};
static const __midl_frag5_t __midl_frag5 =
{
/* *byte */
{
/* *byte */
0x41, /* FC64_CONF_ARRAY */
(NDR64_UINT8) 0 /* 0x0 */,
{
/* *byte */
0,
0,
0,
0,
0,
0,
0,
0
},
(NDR64_UINT8) 0 /* 0x0 */,
(NDR64_UINT32) 1 /* 0x1 */,
&__midl_frag6
},
{
/* struct _NDR64_ARRAY_ELEMENT_INFO */
(NDR64_UINT32) 1 /* 0x1 */,
&__midl_frag14
}
};
static const __midl_frag4_t __midl_frag4 =
{
/* *byte */
0x20, /* FC64_RP */
(NDR64_UINT8) 0 /* 0x0 */,
(NDR64_UINT16) 0 /* 0x0 */,
&__midl_frag5
};
static const __midl_frag2_t __midl_frag2 =
{
/* LeechRpc_ReservedSubmitCommand */
{
/* LeechRpc_ReservedSubmitCommand */ /* procedure LeechRpc_ReservedSubmitCommand */
(NDR64_UINT32) 23986240 /* 0x16e0040 */, /* explicit handle */ /* IsIntrepreted, ServerMustSize, ClientMustSize, HasReturn, ServerCorrelation, ClientCorrelation, HasExtensions */
(NDR64_UINT32) 48 /* 0x30 */ , /* Stack size */
(NDR64_UINT32) 8 /* 0x8 */,
(NDR64_UINT32) 40 /* 0x28 */,
(NDR64_UINT16) 0 /* 0x0 */,
(NDR64_UINT16) 0 /* 0x0 */,
(NDR64_UINT16) 5 /* 0x5 */,
(NDR64_UINT16) 8 /* 0x8 */
},
{
/* struct _NDR64_BIND_AND_NOTIFY_EXTENSION */
{
/* struct _NDR64_BIND_AND_NOTIFY_EXTENSION */
0x72, /* FC64_BIND_PRIMITIVE */
(NDR64_UINT8) 0 /* 0x0 */,
0 /* 0x0 */, /* Stack offset */
(NDR64_UINT8) 0 /* 0x0 */,
(NDR64_UINT8) 0 /* 0x0 */
},
(NDR64_UINT16) 0 /* 0x0 */ /* Notify index */
},
{
/* cbIn */ /* parameter cbIn */
&__midl_frag9,
{
/* cbIn */
0,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
(NDR64_UINT16) 0 /* 0x0 */,
0
}, /* [in], Basetype, ByValue */
(NDR64_UINT16) 0 /* 0x0 */,
8 /* 0x8 */, /* Stack offset */
},
{
/* pbIn */ /* parameter pbIn */
&__midl_frag5,
{
/* pbIn */
1,
1,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
(NDR64_UINT16) 0 /* 0x0 */,
0
}, /* MustSize, MustFree, [in], SimpleRef */
(NDR64_UINT16) 0 /* 0x0 */,
16 /* 0x10 */, /* Stack offset */
},
{
/* pcbOut */ /* parameter pcbOut */
&__midl_frag9,
{
/* pcbOut */
0,
0,
0,
0,
1,
0,
1,
0,
1,
0,
0,
0,
0,
(NDR64_UINT16) 0 /* 0x0 */,
1
}, /* [out], Basetype, SimpleRef, UseCache */
(NDR64_UINT16) 0 /* 0x0 */,
24 /* 0x18 */, /* Stack offset */
},
{
/* ppbOut */ /* parameter ppbOut */
&__midl_frag10,
{
/* ppbOut */
1,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
(NDR64_UINT16) 0 /* 0x0 */,
1
}, /* MustSize, MustFree, [out], UseCache */
(NDR64_UINT16) 0 /* 0x0 */,
32 /* 0x20 */, /* Stack offset */
},
{
/* error_status_t */ /* parameter error_status_t */
&__midl_frag15,
{
/* error_status_t */
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
(NDR64_UINT16) 0 /* 0x0 */,
0
}, /* [out], IsReturn, Basetype, ByValue */
(NDR64_UINT16) 0 /* 0x0 */,
40 /* 0x28 */, /* Stack offset */
}
};
static const __midl_frag1_t __midl_frag1 =
(NDR64_UINT32) 0 /* 0x0 */;
#include "poppack.h"
static const FormatInfoRef LeechRpc_Ndr64ProcTable[] =
{
&__midl_frag2
};
static const MIDL_STUB_DESC LeechRpc_StubDesc =
{
(void *)& LeechRpc___RpcClientInterface,
MIDL_user_allocate,
MIDL_user_free,
&LeechRpc__MIDL_AutoBindHandle,
0,
0,
0,
0,
leechrpc__MIDL_TypeFormatString.Format,
1, /* -error bounds_check flag */
0x60001, /* Ndr library version */
0,
0x801026e, /* MIDL Version 8.1.622 */
0,
0,
0, /* notify & notify_flag routine table */
0x2000001, /* MIDL flag */
0, /* cs routines */
(void *)& LeechRpc_ProxyInfo, /* proxy/server info */
0
};
static const MIDL_SYNTAX_INFO LeechRpc_SyntaxInfo [ 2 ] =
{
{
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
0,
leechrpc__MIDL_ProcFormatString.Format,
LeechRpc_FormatStringOffsetTable,
leechrpc__MIDL_TypeFormatString.Format,
0,
0,
0
}
,{
{{0x71710533,0xbeba,0x4937,{0x83,0x19,0xb5,0xdb,0xef,0x9c,0xcc,0x36}},{1,0}},
0,
0 ,
(unsigned short *) LeechRpc_Ndr64ProcTable,
0,
0,
0,
0
}
};
static const MIDL_STUBLESS_PROXY_INFO LeechRpc_ProxyInfo =
{
&LeechRpc_StubDesc,
leechrpc__MIDL_ProcFormatString.Format,
LeechRpc_FormatStringOffsetTable,
(RPC_SYNTAX_IDENTIFIER*)&_RpcTransferSyntax,
2,
(MIDL_SYNTAX_INFO*)LeechRpc_SyntaxInfo
};
#if _MSC_VER >= 1200
#pragma warning(pop)
#endif
#endif /* defined(_M_AMD64)*/

@ -0,0 +1,77 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 8.01.0622 */
/* at Tue Jan 19 03:14:07 2038
*/
/* Compiler settings for leechrpc.idl:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
protocol : all , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif /* __RPCNDR_H_VERSION__ */
#ifndef __leechrpc_h_h__
#define __leechrpc_h_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __LeechRpc_INTERFACE_DEFINED__
#define __LeechRpc_INTERFACE_DEFINED__
/* interface LeechRpc */
/* [unique][endpoint][version][uuid] */
error_status_t LeechRpc_ReservedSubmitCommand(
/* [in] */ handle_t hBinding,
/* [in] */ long cbIn,
/* [size_is][in] */ byte *pbIn,
/* [out] */ long *pcbOut,
/* [size_is][size_is][out] */ byte **ppbOut);
extern RPC_IF_HANDLE LeechRpc_v1_0_c_ifspec;
extern RPC_IF_HANDLE LeechRpc_v1_0_s_ifspec;
#endif /* __LeechRpc_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif
Loading…
Cancel
Save