Esempio n. 1
0
 public TransferUnit()
 {
     field_storage = new SortedDictionary <string, object>();
     apiCallName   = new APIFullName("undefined", "undefined");
     PID           = -1;
     TID           = -1;
 }
Esempio n. 2
0
 public override bool Equals(object obj)
 {
     if (obj is APIFullName)
     {
         APIFullName r = (APIFullName)obj;
         return((this.api_name.Equals(r.api_name)) && (this.library_name.Equals(r.library_name)));
     }
     else
     {
         return(false);
     }
 }
Esempio n. 3
0
        private static HookDescription getHookDescription(APIFullName api_full_name)
        {
            HookDescription result;
            Type            type = System.Type.GetType(typeof(AbstractHookDescription).Namespace + "." + api_full_name.library_name + ".Hook_" + api_full_name.api_name);

            //Console.WriteLine("Looking for type " + typeof(AbstractHookDescription).Namespace + "." + api_full_name.library_name + ".Hook_" + api_full_name.api_name);

            if (type == null)
            {
                Console.WriteLine("Could not find type " + typeof(AbstractHookDescription).Namespace + "." + api_full_name.library_name + ".Hook_" + api_full_name.api_name);
                System.Threading.Thread.Sleep(3000);
                throw new NoSuchHookException("No hook type found for API " + api_full_name);
            }
            Activator.CreateInstance(type);
            flat_hook_db.TryGetValue(api_full_name, out result);
            return(result);
        }