Steamworks.SteamGameServerInventory.GetItemDefinitionProperty C# (CSharp) Méthode

GetItemDefinitionProperty() public static méthode

GetItemDefinitionProperty returns a string property from a given item definition.

Note that some properties (for example, "name") may be localized and will depend

on the current Steam language settings (see ISteamApps::GetCurrentGameLanguage).

Property names are always composed of ASCII letters, numbers, and/or underscores.

Pass a NULL pointer for pchPropertyName to get a comma - separated list of available

property names. If pchValueBuffer is NULL, *punValueBufferSize will contain the

suggested buffer size. Otherwise it will be the number of bytes actually copied

to pchValueBuffer. If the results do not fit in the given buffer, partial

results may be copied.

public static GetItemDefinitionProperty ( SteamItemDef_t iDefinition, string pchPropertyName, string &pchValueBuffer, uint &punValueBufferSizeOut ) : bool
iDefinition SteamItemDef_t
pchPropertyName string
pchValueBuffer string
punValueBufferSizeOut uint
Résultat bool
		public static bool GetItemDefinitionProperty(SteamItemDef_t iDefinition, string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut) {
			InteropHelp.TestIfAvailableGameServer();
			IntPtr pchValueBuffer2 = Marshal.AllocHGlobal((int)punValueBufferSizeOut);
			using (var pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName)) {
				bool ret = NativeMethods.ISteamGameServerInventory_GetItemDefinitionProperty(iDefinition, pchPropertyName2, pchValueBuffer2, ref punValueBufferSizeOut);
				pchValueBuffer = ret ? InteropHelp.PtrToStringUTF8(pchValueBuffer2) : null;
				Marshal.FreeHGlobal(pchValueBuffer2);
				return ret;
			}
		}