本文整理汇总了C#中Steamworks.InteropHelp.UTF8StringHandle类的典型用法代码示例。如果您正苦于以下问题:C# InteropHelp.UTF8StringHandle类的具体用法?C# InteropHelp.UTF8StringHandle怎么用?C# InteropHelp.UTF8StringHandle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InteropHelp.UTF8StringHandle类属于Steamworks命名空间,在下文中一共展示了InteropHelp.UTF8StringHandle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetHTTPRequestHeaderValue
/// <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);
}
}
示例2: AddScreenshotToLibrary
/// <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);
}
}
示例3: CreateBrowser
/// <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);
}
}
示例4: LoadURL
/// <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);
}
}
示例5: SetHTTPRequestGetOrPostParameter
/// <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);
}
}
示例6: ActivateGameOverlay
public static void ActivateGameOverlay(string pchDialog)
{
InteropHelp.TestIfAvailableClient();
using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchDialog))
{
NativeMethods.ISteamFriends_ActivateGameOverlay(uTF8StringHandle);
}
}
示例7: SetOverrideMode
public static void SetOverrideMode(string pchMode)
{
InteropHelp.TestIfAvailableClient();
using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchMode))
{
NativeMethods.ISteamController_SetOverrideMode(uTF8StringHandle);
}
}
示例8: Find
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);
}
}
示例9: ExecuteJavascript
public static void ExecuteJavascript(HHTMLBrowser unBrowserHandle, string pchScript)
{
InteropHelp.TestIfAvailableClient();
using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchScript))
{
NativeMethods.ISteamHTMLSurface_ExecuteJavascript(unBrowserHandle, uTF8StringHandle);
}
}
示例10: FindOrCreateLeaderboard
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;
}
示例11: GetAchievementAchievedPercent
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;
}
示例12: InitSafe
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;
}
示例13: ClearAchievement
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;
}
示例14: CreateHTTPRequest
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;
}
示例15: GetHTTPResponseHeaderValue
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;
}