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:
wj32
2010-08-15 01:43:47 +00:00
parent 813b07b044
commit ec6809fa4f
4 changed files with 7 additions and 10 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -2318,7 +2318,7 @@ PPH_STRING PhGetFullPath(
PHLIBAPI
PPH_STRING PhExpandEnvironmentStrings(
__in PWSTR String
__in PPH_STRINGREF String
);
PHLIBAPI
+4 -7
View File
@@ -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
);