예제 #1
0
 public static FindSurface GetInstance()
 {
     if (instance == null)
     {
         instance = new FindSurface();
         if (instance.context == IntPtr.Zero)
         {
             instance = null;                     // Failed to Initialized...
         }
     }
     return(instance);
 }
예제 #2
0
 public static FindSurface GetInstance(ref FS_CONTEXT_CREATION_ERROR err)
 {
     if (instance == null)
     {
         FS_CONTEXT_CREATION_ERROR ret = FS_CONTEXT_CREATION_ERROR.FS_NO_ERROR;
         instance = new FindSurface(ref ret);
         if (ret != FS_CONTEXT_CREATION_ERROR.FS_NO_ERROR || instance.context == IntPtr.Zero)
         {
             instance = null;                     // Failed to Initialized...
             err      = ret;
         }
     }
     else
     {
         err = FS_CONTEXT_CREATION_ERROR.FS_NO_ERROR;
     }
     return(instance);
 }