Skip to content

Commit

Permalink
Version 4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ufrisk committed Aug 26, 2020
1 parent 6c22b62 commit cd906e3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion includes/leechcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// (c) Ulf Frisk, 2020
// Author: Ulf Frisk, [email protected]
//
// Header Version: 2.0
// Header Version: 2.1
//

#ifndef __LEECHCORE_H__
Expand All @@ -35,6 +35,7 @@ typedef ULONG64 QWORD, *PQWORD;
#endif /* _WIN32 */
#ifdef LINUX
#include <inttypes.h>
#include <stdlib.h>

#define EXPORTED_FUNCTION __attribute__((visibility("default")))
typedef void VOID, *PVOID, *HANDLE;
Expand All @@ -43,6 +44,7 @@ typedef uint32_t DWORD, *PDWORD, BOOL;
typedef uint8_t BYTE, *PBYTE;
typedef char CHAR, *LPSTR;
typedef const char *LPCSTR;
typedef wchar_t WCHAR, *PWCHAR, *LPWSTR;
#define MAX_PATH 260
#define _In_
#define _In_z_
Expand Down Expand Up @@ -76,6 +78,7 @@ typedef const char *LPCSTR;
//-----------------------------------------------------------------------------

#define LC_CONFIG_VERSION 0xc0fd0002
#define LC_CONFIG_ERRORINFO_VERSION 0xc0fe0002

#define LC_CONFIG_PRINTF_ENABLED 0x01
#define LC_CONFIG_PRINTF_V 0x02
Expand All @@ -99,16 +102,36 @@ typedef struct LC_CONFIG {
CHAR szDeviceName[MAX_PATH]; // device name - such as 'fpga' or 'file'.
} LC_CONFIG, *PLC_CONFIG;

typedef struct tdLC_CONFIG_ERRORINFO {
DWORD dwVersion; // must equal LC_CONFIG_ERRORINFO_VERSION
DWORD cbStruct;
DWORD _FutureUse[16];
BOOL fUserInputRequest;
DWORD cwszUserText;
WCHAR wszUserText[];
} LC_CONFIG_ERRORINFO, *PLC_CONFIG_ERRORINFO, **PPLC_CONFIG_ERRORINFO;

/*
* Create a new LeechCore device according to the supplied configuration.
* CALLER LcMemFree: ppLcCreateErrorInfo
* -- pLcCreateConfig
* -- ppLcCreateErrorInfo = ptr to receive function allocated struct with error
* information upon function failure. This info may contain a user message
* requesting user action as an example. Any returned struct should be
* free'd by a call to LcMemFree().
* -- return
*/
_Success_(return != NULL)
EXPORTED_FUNCTION HANDLE LcCreate(
_Inout_ PLC_CONFIG pLcCreateConfig
);

_Success_(return != NULL)
EXPORTED_FUNCTION HANDLE LcCreateEx(
_Inout_ PLC_CONFIG pLcCreateConfig,
_Out_opt_ PPLC_CONFIG_ERRORINFO ppLcCreateErrorInfo
);

/*
* Close a LeechCore handle and free any resources no longer needed.
*/
Expand Down
Binary file modified includes/lib64/leechcore.lib
Binary file not shown.

0 comments on commit cd906e3

Please sign in to comment.