1
0
mirror of synced 2025-02-08 15:28:15 +01:00

Wrap it in an extern C

This commit is contained in:
Rin 2022-07-09 11:07:07 +01:00
parent fa746abd4f
commit 654c258bed
3 changed files with 35 additions and 24 deletions

View File

@ -80,7 +80,7 @@
<TargetName>OpenBanapass</TargetName> <TargetName>OpenBanapass</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>OpenBanapass</TargetName> <TargetName>bngrw</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
@ -139,8 +139,9 @@
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;OPENBANAPASS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;OPENBANAPASS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<CallingConvention>FastCall</CallingConvention>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>

View File

@ -3,6 +3,9 @@
#define BANA_API_VERSION "Ver 1.6.0" #define BANA_API_VERSION "Ver 1.6.0"
extern "C"
{
ULONGLONG BngRwAttach(UINT a1, char* a2, int a3, int a4, void* callback, long a6) ULONGLONG BngRwAttach(UINT a1, char* a2, int a3, int a4, void* callback, long a6)
{ {
log("BngRwAttach()\n"); log("BngRwAttach()\n");
@ -161,4 +164,6 @@ int BngRwReqWaitTouch(UINT a, int b, UINT c, ULONGLONG d, ULONGLONG e)
{ {
log("BngRwReqWaitTouch()\n"); log("BngRwReqWaitTouch()\n");
return GetAsyncKeyState(VK_RETURN) ? 0 : -1; return GetAsyncKeyState(VK_RETURN) ? 0 : -1;
}
} }

View File

@ -4,25 +4,30 @@
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <Windows.h> #include <Windows.h>
BANA_API ULONGLONG BngRwAttach(UINT, char*, int, int, void*, long); extern "C"
BANA_API int BngRwDevReset(UINT, ULONGLONG, ULONGLONG); {
BANA_API ULONGLONG BngRwExReadMifareAllBlock();
BANA_API void BngRwFin(); BANA_API ULONGLONG BngRwAttach(UINT, char*, int, int, void*, long);
BANA_API UINT BngRwGetFwVersion(UINT); BANA_API int BngRwDevReset(UINT, ULONGLONG, ULONGLONG);
BANA_API UINT BngRwGetStationID(UINT); BANA_API ULONGLONG BngRwExReadMifareAllBlock();
BANA_API UINT BngRwGetTotalRetryCount(UINT); BANA_API void BngRwFin();
BANA_API const char* BngRwGetVersion(); BANA_API UINT BngRwGetFwVersion(UINT);
BANA_API long BngRwInit(); BANA_API UINT BngRwGetStationID(UINT);
BANA_API ULONGLONG BngRwIsCmdExec(UINT); BANA_API UINT BngRwGetTotalRetryCount(UINT);
BANA_API int BngRwReqAction(UINT, UINT, ULONGLONG, ULONGLONG); BANA_API const char* BngRwGetVersion();
BANA_API int BngRwReqAiccAuth(UINT, int, UINT, int*, ULONGLONG, ULONGLONG, ULONGLONG*); BANA_API long BngRwInit();
BANA_API int BngRwReqBeep(UINT, UINT, ULONGLONG, ULONGLONG); BANA_API ULONGLONG BngRwIsCmdExec(UINT);
BANA_API int BngRwReqCancel(UINT); BANA_API int BngRwReqAction(UINT, UINT, ULONGLONG, ULONGLONG);
BANA_API int BngRwReqFwCleanup(UINT, ULONGLONG, ULONGLONG); BANA_API int BngRwReqAiccAuth(UINT, int, UINT, int*, ULONGLONG, ULONGLONG, ULONGLONG*);
BANA_API int BngRwReqFwVersionup(UINT, ULONGLONG, ULONGLONG, ULONGLONG); BANA_API int BngRwReqBeep(UINT, UINT, ULONGLONG, ULONGLONG);
BANA_API int BngRwReqLatchID(UINT, ULONGLONG, ULONGLONG); BANA_API int BngRwReqCancel(UINT);
BANA_API int BngRwReqLed(UINT, UINT, ULONGLONG, ULONGLONG); BANA_API int BngRwReqFwCleanup(UINT, ULONGLONG, ULONGLONG);
BANA_API int BngRwReqSendMailTo(UINT, int, UINT, int*, char*, char*, char*, char*, ULONGLONG, ULONGLONG); BANA_API int BngRwReqFwVersionup(UINT, ULONGLONG, ULONGLONG, ULONGLONG);
BANA_API int BngRwReqSendUrlTo(UINT, int, UINT, int*, char*, char*, ULONGLONG, ULONGLONG); BANA_API int BngRwReqLatchID(UINT, ULONGLONG, ULONGLONG);
BANA_API int BngRwReqWaitTouch(UINT, int, UINT, ULONGLONG, ULONGLONG); BANA_API int BngRwReqLed(UINT, UINT, ULONGLONG, ULONGLONG);
BANA_API ULONGLONG BngRwReqSetLedPower(); BANA_API int BngRwReqSendMailTo(UINT, int, UINT, int*, char*, char*, char*, char*, ULONGLONG, ULONGLONG);
BANA_API int BngRwReqSendUrlTo(UINT, int, UINT, int*, char*, char*, ULONGLONG, ULONGLONG);
BANA_API int BngRwReqWaitTouch(UINT, int, UINT, ULONGLONG, ULONGLONG);
BANA_API ULONGLONG BngRwReqSetLedPower();
}