Inheritance: Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
		/// <summary>
		/// <para> Set a request header value for the request, must be called prior to sending the request.  Will</para>
		/// <para> return false if the handle is invalid or the request is already sent.</para>
		/// </summary>
		public static bool SetHTTPRequestHeaderValue(HTTPRequestHandle hRequest, string pchHeaderName, string pchHeaderValue) {
			InteropHelp.TestIfAvailableClient();
			using (var pchHeaderName2 = new InteropHelp.UTF8StringHandle(pchHeaderName))
			using (var pchHeaderValue2 = new InteropHelp.UTF8StringHandle(pchHeaderValue)) {
				return NativeMethods.ISteamHTTP_SetHTTPRequestHeaderValue(hRequest, pchHeaderName2, pchHeaderValue2);
			}
		}
		/// <summary>
		/// <para> Adds a screenshot to the user's screenshot library from disk.  If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio</para>
		/// <para> as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot.  The screenshots must be in either JPEG or TGA format.</para>
		/// <para> The return value is a handle that is valid for the duration of the game process and can be used to apply tags.</para>
		/// <para> JPEG, TGA, and PNG formats are supported.</para>
		/// </summary>
		public static ScreenshotHandle AddScreenshotToLibrary(string pchFilename, string pchThumbnailFilename, int nWidth, int nHeight) {
			InteropHelp.TestIfAvailableClient();
			using (var pchFilename2 = new InteropHelp.UTF8StringHandle(pchFilename))
			using (var pchThumbnailFilename2 = new InteropHelp.UTF8StringHandle(pchThumbnailFilename)) {
				return (ScreenshotHandle)NativeMethods.ISteamScreenshots_AddScreenshotToLibrary(pchFilename2, pchThumbnailFilename2, nWidth, nHeight);
			}
		}
		/// <summary>
		/// <para> Create a browser object for display of a html page, when creation is complete the call handle</para>
		/// <para> will return a HTML_BrowserReady_t callback for the HHTMLBrowser of your new browser.</para>
		/// <para>   The user agent string is a substring to be added to the general user agent string so you can</para>
		/// <para> identify your client on web servers.</para>
		/// <para>   The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if</para>
		/// <para> you do not require this functionality.</para>
		/// </summary>
		public static SteamAPICall_t CreateBrowser(string pchUserAgent, string pchUserCSS) {
			InteropHelp.TestIfAvailableClient();
			using (var pchUserAgent2 = new InteropHelp.UTF8StringHandle(pchUserAgent))
			using (var pchUserCSS2 = new InteropHelp.UTF8StringHandle(pchUserCSS)) {
				return (SteamAPICall_t)NativeMethods.ISteamHTMLSurface_CreateBrowser(pchUserAgent2, pchUserCSS2);
			}
		}
		/// <summary>
		/// <para> Navigate to this URL, results in a HTML_StartRequest_t as the request commences</para>
		/// </summary>
		public static void LoadURL(HHTMLBrowser unBrowserHandle, string pchURL, string pchPostData) {
			InteropHelp.TestIfAvailableClient();
			using (var pchURL2 = new InteropHelp.UTF8StringHandle(pchURL))
			using (var pchPostData2 = new InteropHelp.UTF8StringHandle(pchPostData)) {
				NativeMethods.ISteamHTMLSurface_LoadURL(unBrowserHandle, pchURL2, pchPostData2);
			}
		}
		/// <summary>
		/// <para> Set a GET or POST parameter value on the request, which is set will depend on the EHTTPMethod specified</para>
		/// <para> when creating the request.  Must be called prior to sending the request.  Will return false if the</para>
		/// <para> handle is invalid or the request is already sent.</para>
		/// </summary>
		public static bool SetHTTPRequestGetOrPostParameter(HTTPRequestHandle hRequest, string pchParamName, string pchParamValue) {
			InteropHelp.TestIfAvailableGameServer();
			using (var pchParamName2 = new InteropHelp.UTF8StringHandle(pchParamName))
			using (var pchParamValue2 = new InteropHelp.UTF8StringHandle(pchParamValue)) {
				return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestGetOrPostParameter(hRequest, pchParamName2, pchParamValue2);
			}
		}
Exemple #6
0
 public static void ActivateGameOverlay(string pchDialog)
 {
     InteropHelp.TestIfAvailableClient();
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchDialog))
     {
         NativeMethods.ISteamFriends_ActivateGameOverlay(uTF8StringHandle);
     }
 }
 public static void SetOverrideMode(string pchMode)
 {
     InteropHelp.TestIfAvailableClient();
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchMode))
     {
         NativeMethods.ISteamController_SetOverrideMode(uTF8StringHandle);
     }
 }
 public static void Find(HHTMLBrowser unBrowserHandle, string pchSearchStr, bool bCurrentlyInFind, bool bReverse)
 {
     InteropHelp.TestIfAvailableClient();
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchSearchStr))
     {
         NativeMethods.ISteamHTMLSurface_Find(unBrowserHandle, uTF8StringHandle, bCurrentlyInFind, bReverse);
     }
 }
 public static void ExecuteJavascript(HHTMLBrowser unBrowserHandle, string pchScript)
 {
     InteropHelp.TestIfAvailableClient();
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchScript))
     {
         NativeMethods.ISteamHTMLSurface_ExecuteJavascript(unBrowserHandle, uTF8StringHandle);
     }
 }
Exemple #10
0
 public static SteamAPICall_t FindOrCreateLeaderboard(string pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType)
 {
     InteropHelp.TestIfAvailableClient();
     SteamAPICall_t result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchLeaderboardName))
     {
         result = (SteamAPICall_t)NativeMethods.ISteamUserStats_FindOrCreateLeaderboard(uTF8StringHandle, eLeaderboardSortMethod, eLeaderboardDisplayType);
     }
     return result;
 }
Exemple #11
0
 public static bool GetAchievementAchievedPercent(string pchName, out float pflPercent)
 {
     InteropHelp.TestIfAvailableClient();
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchName))
     {
         result = NativeMethods.ISteamUserStats_GetAchievementAchievedPercent(uTF8StringHandle, out pflPercent);
     }
     return result;
 }
Exemple #12
0
 public static bool InitSafe(uint unIP, ushort usSteamPort, ushort usGamePort, ushort usQueryPort, EServerMode eServerMode, string pchVersionString)
 {
     InteropHelp.TestIfPlatformSupported();
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchVersionString))
     {
         result = NativeMethods.SteamGameServer_InitSafe(unIP, usSteamPort, usGamePort, usQueryPort, eServerMode, uTF8StringHandle);
     }
     return result;
 }
Exemple #13
0
 public static bool ClearAchievement(string pchName)
 {
     InteropHelp.TestIfAvailableClient();
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchName))
     {
         result = NativeMethods.ISteamUserStats_ClearAchievement(uTF8StringHandle);
     }
     return result;
 }
 public static HTTPRequestHandle CreateHTTPRequest(EHTTPMethod eHTTPRequestMethod, string pchAbsoluteURL)
 {
     InteropHelp.TestIfAvailableGameServer();
     HTTPRequestHandle result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchAbsoluteURL))
     {
         result = (HTTPRequestHandle)NativeMethods.ISteamGameServerHTTP_CreateHTTPRequest(eHTTPRequestMethod, uTF8StringHandle);
     }
     return result;
 }
 public static bool GetHTTPResponseHeaderValue(HTTPRequestHandle hRequest, string pchHeaderName, byte[] pHeaderValueBuffer, uint unBufferSize)
 {
     InteropHelp.TestIfAvailableGameServer();
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchHeaderName))
     {
         result = NativeMethods.ISteamGameServerHTTP_GetHTTPResponseHeaderValue(hRequest, uTF8StringHandle, pHeaderValueBuffer, unBufferSize);
     }
     return result;
 }
 public static bool SetLocation(ScreenshotHandle hScreenshot, string pchLocation)
 {
     InteropHelp.TestIfAvailableClient();
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchLocation))
     {
         result = NativeMethods.ISteamScreenshots_SetLocation(hScreenshot, uTF8StringHandle);
     }
     return result;
 }
Exemple #17
0
 public static SteamAPICall_t CheckFileSignature(string szFileName)
 {
     InteropHelp.TestIfAvailableClient();
     SteamAPICall_t result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(szFileName))
     {
         result = (SteamAPICall_t)NativeMethods.ISteamUtils_CheckFileSignature(uTF8StringHandle);
     }
     return result;
 }
 public static bool Init(string pchAbsolutePathToControllerConfigVDF)
 {
     InteropHelp.TestIfAvailableClient();
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchAbsolutePathToControllerConfigVDF))
     {
         result = NativeMethods.ISteamController_Init(uTF8StringHandle);
     }
     return result;
 }
 public static bool FileForget(string pchFile)
 {
     InteropHelp.TestIfAvailableClient();
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchFile))
     {
         result = NativeMethods.ISteamRemoteStorage_FileForget(uTF8StringHandle);
     }
     return result;
 }
Exemple #20
0
 public static bool AddRequiredTag(UGCQueryHandle_t handle, string pTagName)
 {
     InteropHelp.TestIfAvailableClient();
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pTagName))
     {
         result = NativeMethods.ISteamUGC_AddRequiredTag(handle, uTF8StringHandle);
     }
     return result;
 }
 public static void AddHeader(HHTMLBrowser unBrowserHandle, string pchKey, string pchValue)
 {
     InteropHelp.TestIfAvailableClient();
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchKey))
     {
         using (InteropHelp.UTF8StringHandle uTF8StringHandle2 = new InteropHelp.UTF8StringHandle(pchValue))
         {
             NativeMethods.ISteamHTMLSurface_AddHeader(unBrowserHandle, uTF8StringHandle, uTF8StringHandle2);
         }
     }
 }
 public static SteamAPICall_t CreateBrowser(string pchUserAgent, string pchUserCSS)
 {
     InteropHelp.TestIfAvailableClient();
     SteamAPICall_t result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchUserAgent))
     {
         using (InteropHelp.UTF8StringHandle uTF8StringHandle2 = new InteropHelp.UTF8StringHandle(pchUserCSS))
         {
             result = (SteamAPICall_t)NativeMethods.ISteamHTMLSurface_CreateBrowser(uTF8StringHandle, uTF8StringHandle2);
         }
     }
     return result;
 }
 public static bool GetItemDefinitionProperty(SteamItemDef_t iDefinition, string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSize)
 {
     InteropHelp.TestIfAvailableGameServer();
     IntPtr intPtr = Marshal.AllocHGlobal((int)punValueBufferSize);
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchPropertyName))
     {
         bool flag = NativeMethods.ISteamGameServerInventory_GetItemDefinitionProperty(iDefinition, uTF8StringHandle, intPtr, ref punValueBufferSize);
         pchValueBuffer = ((!flag) ? null : InteropHelp.PtrToStringUTF8(intPtr));
         Marshal.FreeHGlobal(intPtr);
         result = flag;
     }
     return result;
 }
 public static bool UpdatePublishedFileTitle(PublishedFileUpdateHandle_t updateHandle, string pchTitle)
 {
     InteropHelp.TestIfAvailableClient();
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchTitle))
     {
         result = NativeMethods.ISteamRemoteStorage_UpdatePublishedFileTitle(updateHandle, uTF8StringHandle);
     }
     return result;
 }
 public static SteamAPICall_t UGCDownloadToLocation(UGCHandle_t hContent, string pchLocation, uint unPriority)
 {
     InteropHelp.TestIfAvailableClient();
     SteamAPICall_t result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchLocation))
     {
         result = (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_UGCDownloadToLocation(hContent, uTF8StringHandle, unPriority);
     }
     return result;
 }
 public static bool SetSyncPlatforms(string pchFile, ERemoteStoragePlatform eRemoteStoragePlatform)
 {
     InteropHelp.TestIfAvailableClient();
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchFile))
     {
         result = NativeMethods.ISteamRemoteStorage_SetSyncPlatforms(uTF8StringHandle, eRemoteStoragePlatform);
     }
     return result;
 }
 public static SteamAPICall_t PublishWorkshopFile(string pchFile, string pchPreviewFile, AppId_t nConsumerAppId, string pchTitle, string pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, IList<string> pTags, EWorkshopFileType eWorkshopFileType)
 {
     InteropHelp.TestIfAvailableClient();
     SteamAPICall_t result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchFile))
     {
         using (InteropHelp.UTF8StringHandle uTF8StringHandle2 = new InteropHelp.UTF8StringHandle(pchPreviewFile))
         {
             using (InteropHelp.UTF8StringHandle uTF8StringHandle3 = new InteropHelp.UTF8StringHandle(pchTitle))
             {
                 using (InteropHelp.UTF8StringHandle uTF8StringHandle4 = new InteropHelp.UTF8StringHandle(pchDescription))
                 {
                     result = (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_PublishWorkshopFile(uTF8StringHandle, uTF8StringHandle2, nConsumerAppId, uTF8StringHandle3, uTF8StringHandle4, eVisibility, new InteropHelp.SteamParamStringArray(pTags), eWorkshopFileType);
                 }
             }
         }
     }
     return result;
 }
 public static SteamAPICall_t PublishVideo(EWorkshopVideoProvider eVideoProvider, string pchVideoAccount, string pchVideoIdentifier, string pchPreviewFile, AppId_t nConsumerAppId, string pchTitle, string pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, IList<string> pTags)
 {
     InteropHelp.TestIfAvailableClient();
     SteamAPICall_t result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchVideoAccount))
     {
         using (InteropHelp.UTF8StringHandle uTF8StringHandle2 = new InteropHelp.UTF8StringHandle(pchVideoIdentifier))
         {
             using (InteropHelp.UTF8StringHandle uTF8StringHandle3 = new InteropHelp.UTF8StringHandle(pchPreviewFile))
             {
                 using (InteropHelp.UTF8StringHandle uTF8StringHandle4 = new InteropHelp.UTF8StringHandle(pchTitle))
                 {
                     using (InteropHelp.UTF8StringHandle uTF8StringHandle5 = new InteropHelp.UTF8StringHandle(pchDescription))
                     {
                         result = (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_PublishVideo(eVideoProvider, uTF8StringHandle, uTF8StringHandle2, uTF8StringHandle3, nConsumerAppId, uTF8StringHandle4, uTF8StringHandle5, eVisibility, new InteropHelp.SteamParamStringArray(pTags));
                     }
                 }
             }
         }
     }
     return result;
 }
 public static long GetFileTimestamp(string pchFile)
 {
     InteropHelp.TestIfAvailableClient();
     long result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchFile))
     {
         result = NativeMethods.ISteamRemoteStorage_GetFileTimestamp(uTF8StringHandle);
     }
     return result;
 }
 public static UGCFileWriteStreamHandle_t FileWriteStreamOpen(string pchFile)
 {
     InteropHelp.TestIfAvailableClient();
     UGCFileWriteStreamHandle_t result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchFile))
     {
         result = (UGCFileWriteStreamHandle_t)NativeMethods.ISteamRemoteStorage_FileWriteStreamOpen(uTF8StringHandle);
     }
     return result;
 }