mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
changed PhExpandEnvironmentStrings argument to a PH_STRINGREF
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@3499 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
@@ -334,7 +334,7 @@ BOOLEAN PhaGetProcessKnownCommandLine(
|
||||
PHA_DEREFERENCE(PhQueryRegistryString(inprocServer32KeyHandle, NULL));
|
||||
|
||||
if (fileName = PHA_DEREFERENCE(PhExpandEnvironmentStrings(
|
||||
KnownCommandLine->ComSurrogate.FileName->Buffer
|
||||
&KnownCommandLine->ComSurrogate.FileName->sr
|
||||
)))
|
||||
{
|
||||
KnownCommandLine->ComSurrogate.FileName = fileName;
|
||||
|
||||
@@ -235,7 +235,7 @@ INT_PTR CALLBACK PhpServiceGeneralDlgProc(
|
||||
{
|
||||
PPH_STRING expandedString;
|
||||
|
||||
if (expandedString = PhExpandEnvironmentStrings(serviceDllString->Buffer))
|
||||
if (expandedString = PhExpandEnvironmentStrings(&serviceDllString->sr))
|
||||
{
|
||||
SetDlgItemText(hwndDlg, IDC_SERVICEDLL, expandedString->Buffer);
|
||||
PhDereferenceObject(expandedString);
|
||||
|
||||
@@ -2318,7 +2318,7 @@ PPH_STRING PhGetFullPath(
|
||||
|
||||
PHLIBAPI
|
||||
PPH_STRING PhExpandEnvironmentStrings(
|
||||
__in PWSTR String
|
||||
__in PPH_STRINGREF String
|
||||
);
|
||||
|
||||
PHLIBAPI
|
||||
|
||||
@@ -1475,24 +1475,21 @@ PPH_STRING PhGetFullPath(
|
||||
}
|
||||
|
||||
PPH_STRING PhExpandEnvironmentStrings(
|
||||
__in PWSTR String
|
||||
__in PPH_STRINGREF String
|
||||
)
|
||||
{
|
||||
NTSTATUS status;
|
||||
PPH_STRING string;
|
||||
UNICODE_STRING sourceString;
|
||||
ULONG bufferLength;
|
||||
|
||||
RtlInitUnicodeString(&sourceString, String);
|
||||
|
||||
bufferLength = 0x40;
|
||||
string = PhCreateStringEx(NULL, bufferLength);
|
||||
string->us.Length = 0;
|
||||
|
||||
status = RtlExpandEnvironmentStrings_U(
|
||||
NULL,
|
||||
&sourceString,
|
||||
&string->us,
|
||||
&String->us,
|
||||
&string->us,
|
||||
&bufferLength
|
||||
);
|
||||
|
||||
@@ -1504,7 +1501,7 @@ PPH_STRING PhExpandEnvironmentStrings(
|
||||
|
||||
status = RtlExpandEnvironmentStrings_U(
|
||||
NULL,
|
||||
&sourceString,
|
||||
&String->us,
|
||||
&string->us,
|
||||
&bufferLength
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user