ebpf-for-windows/tools/bpf2c/bpf2c_dll.c

29 строки
770 B
C

// Copyright (c) Microsoft Corporation
// SPDX-License-Identifier: MIT
#include "bpf2c.h"
#include <stdio.h>
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#define metadata_table ___METADATA_TABLE___##_metadata_table
extern metadata_table_t metadata_table;
bool APIENTRY
DllMain(_In_ HMODULE hModule, unsigned int ul_reason_for_call, _In_ void* lpReserved)
{
UNREFERENCED_PARAMETER(hModule);
UNREFERENCED_PARAMETER(lpReserved);
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
__declspec(dllexport) metadata_table_t* get_metadata_table() { return &metadata_table; }