15 #error TnbRapi.h is only supported on Windows NT Series platforms.
20#pragma comment(lib,"rapi.lib")
22 #pragma comment(lib, "delayimp.lib")
23 #pragma comment(linker,"/DELAYLOAD:rapi.dll")
49 _SELECTANY RAPIINIT* s_pRapiInit = NULL;
83 LONG* P =
reinterpret_cast<LONG*
>(&s_pRapiInit);
84 if ( InterlockedCompareExchange(P, 1, NULL) == NULL )
86 HMODULE hModule = ::LoadLibraryA(
"rapi.dll");
87 if ( hModule == NULL )
93 ::FreeLibrary(hModule);
94 ASSERT( s_pRapiInit != NULL );
95 RAPIINIT* P =
new RAPIINIT;
96 P->cbSize =
sizeof(RAPIINIT);
99 static CReject s_reject;
100 ::OutputDebugString(_T(
"::CeRapiInitEx() 中\n"));
101 HRESULT hr = ::CeRapiInitEx(P);
102 ::OutputDebugString(_T(
"::CeRapiInitEx() 完了\n"));
114 while (
reinterpret_cast<UINT_PTR
>(s_pRapiInit) == 1 )
118 return s_pRapiInit != NULL;
130 return (s_pRapiInit != NULL);
144 DWORD dwWaitRet = ::WaitForSingleObject(s_pRapiInit->heRapiInit, time);
145 return (dwWaitRet == WAIT_OBJECT_0);
159 while (
reinterpret_cast<UINT_PTR
>(s_pRapiInit) == 1 )
163 if ( s_pRapiInit != NULL )
165 ::OutputDebugString(_T(
"::CeRapiUninit() 中\n"));
167 ::OutputDebugString(_T(
"::CeRapiUninit() 完了\n"));
static bool IsSupported(void)
[確認] サポート確認.
static bool IsConnected(DWORD time=0)
[確認] 接続確認.
static void Shutdown(void)
[設定] RAPI 解除.
static bool Startup(void)
[設定] RAPI 初期化.