Ejemplo n.º 1
0
        public string GetAvailableGameLanguages()
        {
            var languagePointer = this.Call <IntPtr, NativeGetAvailableGameLanguages>(
                this.Functions.GetAvailableGameLanguages,
                this.ObjectAddress);

            return(NativeStrings.PointerToString(languagePointer));
        }
        public string GetCurrentGameLanguage()
        {
            var languagePointer = this.Call <IntPtr, NativeGetCurrentGameLanguage>(
                this.Functions.GetCurrentGameLanguage,
                this.ObjectAddress);

            return(NativeStrings.PointerToString(languagePointer));
        }
Ejemplo n.º 3
0
 public string GetAchievementDisplayAttribute(string name, string key)
 {
     using (var nativeName = NativeStrings.StringToStringHandle(name))
         using (var nativeKey = NativeStrings.StringToStringHandle(key))
         {
             var result = this.Call <IntPtr, NativeGetAchievementDisplayAttribute>(
                 this.Functions.GetAchievementDisplayAttribute,
                 this.ObjectAddress,
                 nativeName.Handle,
                 nativeKey.Handle);
             return(NativeStrings.PointerToString(result));
         }
 }
 public string GetAppData(uint appId, string key)
 {
     using (var nativeHandle = NativeStrings.StringToStringHandle(key))
     {
         const int valueLength  = 1024;
         var       valuePointer = Marshal.AllocHGlobal(valueLength);
         int       result       = this.Call <int, NativeGetAppData>(
             this.Functions.GetAppData,
             this.ObjectAddress,
             appId,
             nativeHandle.Handle,
             valuePointer,
             valueLength);
         var value = result == 0 ? null : NativeStrings.PointerToString(valuePointer, valueLength);
         Marshal.FreeHGlobal(valuePointer);
         return(value);
     }
 }
        public string GetIPCountry()
        {
            var result = this.Call <IntPtr, NativeGetIPCountry>(this.Functions.GetIPCountry, this.ObjectAddress);

            return(NativeStrings.PointerToString(result));
        }