mirror of
https://github.com/thinkonmay/sunshine-sdk.git
synced 2026-08-06 20:54:52 +00:00
warning when dll not loaded
This commit is contained in:
parent
02a012d154
commit
b50fe1b108
14
src/main.cpp
14
src/main.cpp
@ -21,7 +21,13 @@ static PEEKEVENT callpeek;
|
||||
|
||||
int
|
||||
initlibrary() {
|
||||
hModule = LoadLibraryA(".\\libsunshine.dll");
|
||||
char szFullPath[MAX_PATH] = {};
|
||||
GetCurrentDirectoryA(MAX_PATH, szFullPath);
|
||||
strcat(szFullPath, "\\libsunshine.dll");
|
||||
hModule = LoadLibraryA(szFullPath);
|
||||
if(hModule == 0)
|
||||
return 1;
|
||||
|
||||
callstart = (STARTQUEUE) GetProcAddress( hModule,"StartQueue");
|
||||
callpop = (POPFROMQUEUE) GetProcAddress( hModule,"PopFromQueue");
|
||||
callraise = (RAISEEVENT) GetProcAddress( hModule,"RaiseEvent");
|
||||
@ -36,7 +42,11 @@ initlibrary() {
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
initlibrary();
|
||||
if(initlibrary()) {
|
||||
printf("failed to load libsunshine.dll");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// second encode session
|
||||
for (int i =0; i < 30; i++)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user