Last change
on this file since 514 was 153, checked in by Nicholas Riley, 21 years ago |
Integrates SCPatch and mach_inject; unfinished, buggy.
|
File size:
811 bytes
|
Line | |
---|
1 | #pragma once
|
---|
2 |
|
---|
3 | #ifdef __cplusplus
|
---|
4 | extern "C"
|
---|
5 | {
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #include <Carbon/Carbon.h>
|
---|
9 |
|
---|
10 | typedef struct SCPatchLoaderData
|
---|
11 | {
|
---|
12 | // Bundle ID's are unicode < 255 chars
|
---|
13 | HFSUniStr255 bundleID;
|
---|
14 | // urls are just UTF CStrings
|
---|
15 | char urlData[0];
|
---|
16 | } SCPatchLoaderData;
|
---|
17 |
|
---|
18 |
|
---|
19 | typedef struct SCPatchLoaderParams
|
---|
20 | {
|
---|
21 | short version;
|
---|
22 | size_t size;
|
---|
23 | ptrdiff_t codeOffset;
|
---|
24 | pid_t parent;
|
---|
25 | HFSUniStr255 parentBundleID;
|
---|
26 |
|
---|
27 | // patches are just packed one after another (this has to be
|
---|
28 | // one contiguous chunk for injection into the target process).
|
---|
29 | short patchCount;
|
---|
30 | SCPatchLoaderData patchData[0];
|
---|
31 |
|
---|
32 | } SCPatchLoaderParams;
|
---|
33 |
|
---|
34 | char *SCPatchGetStringPointer(SCPatchLoaderParams *params, short patchNumber);
|
---|
35 | HFSUniStr255 *SCPatchGetHFSUniStrPointer(SCPatchLoaderParams *params, short patchNumber);
|
---|
36 |
|
---|
37 | #ifdef __cplusplus
|
---|
38 | }
|
---|
39 | #endif |
---|
Note:
See
TracBrowser
for help on using the repository browser.