Permalink
Browse files

Two changes:

- add the required CIAPI.dll to the repository
- if functions can't be located/loaded in the DLL then the AnyseeCiApi constructor should not set _dllLoaded to true
  • Loading branch information...
1 parent 82cf959 commit 6807db03bf760460d066cd6790f65949ecd7f8a3 @mm1352000 mm1352000 committed Mar 31, 2012
@@ -410,6 +410,7 @@ public AnyseeCiApi()
if (function == IntPtr.Zero)
{
Log.Log.Debug("Anysee: failed to locate the CreateDtvCIAPI function");
+ return;
}
try
{
@@ -418,12 +419,14 @@ public AnyseeCiApi()
catch (Exception ex)
{
Log.Log.Debug("Anysee: failed to load the CreateDtvCIAPI function: {0}", ex.ToString());
+ return;
}
function = GetProcAddress(lib, "DestroyDtvCIAPI");
if (function == IntPtr.Zero)
{
Log.Log.Debug("Anysee: failed to locate the DestroyDtvCIAPI function");
+ return;
}
try
{
@@ -432,12 +435,14 @@ public AnyseeCiApi()
catch (Exception ex)
{
Log.Log.Debug("Anysee: failed to load the DestroyDtvCIAPI function: {0}", ex.ToString());
+ return;
}
function = GetProcAddress(lib, "GetanyseeNumberofDevicesEx");
if (function == IntPtr.Zero)
{
Log.Log.Debug("Anysee: failed to locate the GetanyseeNumberofDevicesEx function");
+ return;
}
try
{
@@ -446,12 +451,14 @@ public AnyseeCiApi()
catch (Exception ex)
{
Log.Log.Debug("Anysee: failed to load the GetanyseeNumberofDevicesEx function: {0}", ex.ToString());
+ return;
}
function = GetProcAddress(lib, "?OpenCILib@CCIAPI@@UAGJPAUHWND__@@H@Z");
if (function == IntPtr.Zero)
{
Log.Log.Debug("Anysee: failed to locate the OpenCILib function");
+ return;
}
try
{
@@ -460,12 +467,14 @@ public AnyseeCiApi()
catch (Exception ex)
{
Log.Log.Debug("Anysee: failed to load the OpenCILib function: {0}", ex.ToString());
+ return;
}
function = GetProcAddress(lib, "?CI_Control@CCIAPI@@UAGJKPAJ0@Z");
if (function == IntPtr.Zero)
{
Log.Log.Debug("Anysee: failed to locate the CI_Control function");
+ return;
}
try
{
@@ -474,6 +483,7 @@ public AnyseeCiApi()
catch (Exception ex)
{
Log.Log.Debug("Anysee: failed to load the CI_Control function: {0}", ex.ToString());
+ return;
}
_dllLoaded = true;
Binary file not shown.

0 comments on commit 6807db0

Please sign in to comment.