forked from EvilBeaver/OneScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDetectUnionOffset.cpp
More file actions
32 lines (29 loc) · 1.51 KB
/
DetectUnionOffset.cpp
File metadata and controls
32 lines (29 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*----------------------------------------------------------
This Source Code Form is subject to the terms of the
Mozilla Public License, v.2.0. If a copy of the MPL
was not distributed with this file, You can obtain one
at http://mozilla.org/MPL/2.0/.
----------------------------------------------------------*/
#include <windows.h>
#include "include/types.h"
#include "include/ComponentBase.h"
#include "include/AddInDefBase.h"
#include "include/IMemoryManager.h"
#include <stdio.h>
#include <stddef.h>
int main()
{
tVariant variant;
printf("offsetof(struct tVariant, lVal) is %d\n", (int)offsetof(struct tVariant, lVal));
printf("offsetof(struct tVariant, bVal) is %d\n", (int)offsetof(struct tVariant, bVal));
printf("offsetof(struct tVariant, dblVal) is %d\n", (int)offsetof(struct tVariant, dblVal));
printf("offsetof(struct tVariant, date) is %d\n", (int)offsetof(struct tVariant, date));
printf("offsetof(struct tVariant, tmVal) is %d\n", (int)offsetof(struct tVariant, tmVal));
printf("offsetof(struct tVariant, pstrVal) is %d\n", (int)offsetof(struct tVariant, pstrVal));
printf("offsetof(struct tVariant, strLen) is %d\n", (int)offsetof(struct tVariant, strLen));
printf("offsetof(struct tVariant, pwstrVal) is %d\n", (int)offsetof(struct tVariant, pwstrVal));
printf("offsetof(struct tVariant, wstrLen) is %d\n", (int)offsetof(struct tVariant, wstrLen));
printf("offsetof(struct tVariant, vt) is %d\n", (int)offsetof(struct tVariant, vt));
printf("sizeof(struct tVariant) is %d\n", (int)sizeof(tVariant));
return 0;
}