Exemplo n.º 1
0
 /// <summary>Retrieves a copy of the character string associated with the specified local atom.</summary>
 /// <param name="nAtom">
 /// <para>Type: <c>ATOM</c></para>
 /// <para>The local atom that identifies the character string to be retrieved.</para>
 /// </param>
 /// <returns>On success, the character string associated with the specified local atom. On failure, <see langword="null"/>.</returns>
 public static string GetAtomName(ATOM nAtom) => FunctionHelper.CallMethodWithStrBuf((sb, sz) => GetAtomName(nAtom, sb, sz), 255, out var result) > 0 ? result : null;
Exemplo n.º 2
0
 /// <summary>Retrieves the application-specific portion of the search path used to locate DLLs for the application.</summary>
 /// <returns>The application-specific portion of the search path.</returns>
 public static string GetDllDirectory() => FunctionHelper.CallMethodWithStrBuf((StringBuilder sb, ref uint sz) => GetDllDirectory(sz, sb), out var str, (sz, r) => r <= sz) > 0 ? str : throw Win32Error.GetLastError().GetException();