Skip to content

Commit

Permalink
Correctly prefix the functions exposed from burnpipe.h
Browse files Browse the repository at this point in the history
  • Loading branch information
robmen committed Jan 12, 2024
1 parent 8cfd711 commit 8b55203
Show file tree
Hide file tree
Showing 10 changed files with 115 additions and 115 deletions.
50 changes: 25 additions & 25 deletions src/burn/engine/burnpipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ static HRESULT ChildPipeConnected(


/*******************************************************************
PipeConnectionInitialize - initialize pipe connection data.
BurnPipeConnectionInitialize - initialize pipe connection data.
*******************************************************************/
void PipeConnectionInitialize(
void BurnPipeConnectionInitialize(
__in BURN_PIPE_CONNECTION* pConnection
)
{
Expand All @@ -27,10 +27,10 @@ void PipeConnectionInitialize(
}

/*******************************************************************
PipeConnectionUninitialize - free data in a pipe connection.
BurnPipeConnectionUninitialize - free data in a pipe connection.
*******************************************************************/
void PipeConnectionUninitialize(
void BurnPipeConnectionUninitialize(
__in BURN_PIPE_CONNECTION* pConnection
)
{
Expand All @@ -41,14 +41,14 @@ void PipeConnectionUninitialize(
ReleaseStr(pConnection->sczSecret);
ReleaseStr(pConnection->sczName);

PipeConnectionInitialize(pConnection);
BurnPipeConnectionInitialize(pConnection);
}

/*******************************************************************
PipeSendMessage -
BurnPipeSendMessage -
*******************************************************************/
extern "C" HRESULT PipeSendMessage(
extern "C" HRESULT BurnPipeSendMessage(
__in HANDLE hPipe,
__in DWORD dwMessage,
__in_bcount_opt(cbData) LPVOID pvData,
Expand All @@ -64,7 +64,7 @@ extern "C" HRESULT PipeSendMessage(
hr = PipeWriteMessage(hPipe, dwMessage, pvData, cbData);
ExitOnFailure(hr, "Failed to write send message to pipe.");

hr = PipePumpMessages(hPipe, pfnCallback, pvContext, &result);
hr = BurnPipePumpMessages(hPipe, pfnCallback, pvContext, &result);
ExitOnFailure(hr, "Failed to pump messages during send message to pipe.");

*pdwResult = result.dwResult;
Expand All @@ -74,10 +74,10 @@ extern "C" HRESULT PipeSendMessage(
}

/*******************************************************************
PipePumpMessages -
BurnPipePumpMessages -
*******************************************************************/
extern "C" HRESULT PipePumpMessages(
extern "C" HRESULT BurnPipePumpMessages(
__in HANDLE hPipe,
__in_opt PFN_PIPE_MESSAGE_CALLBACK pfnCallback,
__in_opt LPVOID pvContext,
Expand Down Expand Up @@ -111,7 +111,7 @@ extern "C" HRESULT PipePumpMessages(
if (!msg.pvData || sizeof(DWORD) != msg.cbData)
{
hr = E_INVALIDARG;
ExitOnRootFailure(hr, "No status returned to PipePumpMessages()");
ExitOnRootFailure(hr, "No status returned to BurnPipePumpMessages()");
}

pResult->dwResult = *static_cast<DWORD*>(msg.pvData);
Expand All @@ -121,12 +121,12 @@ extern "C" HRESULT PipePumpMessages(
iData = 0;

hr = BuffReadNumber(static_cast<BYTE*>(msg.pvData), msg.cbData, &iData, &pResult->dwResult);
ExitOnFailure(hr, "Failed to read returned result to PipePumpMessages()");
ExitOnFailure(hr, "Failed to read returned result to BurnPipePumpMessages()");

if (sizeof(DWORD) * 2 == msg.cbData)
{
hr = BuffReadNumber(static_cast<BYTE*>(msg.pvData), msg.cbData, &iData, (DWORD*)&pResult->fRestart);
ExitOnFailure(hr, "Failed to read returned restart to PipePumpMessages()");
ExitOnFailure(hr, "Failed to read returned restart to BurnPipePumpMessages()");
}

ExitFunction1(hr = S_OK); // exit loop.
Expand Down Expand Up @@ -165,10 +165,10 @@ extern "C" HRESULT PipePumpMessages(
}

/*******************************************************************
PipeCreateNameAndSecret -
BurnPipeCreateNameAndSecret -
*******************************************************************/
extern "C" HRESULT PipeCreateNameAndSecret(
extern "C" HRESULT BurnPipeCreateNameAndSecret(
__out_z LPWSTR *psczConnectionName,
__out_z LPWSTR *psczSecret
)
Expand Down Expand Up @@ -205,10 +205,10 @@ extern "C" HRESULT PipeCreateNameAndSecret(
}

/*******************************************************************
PipeCreatePipes - create the pipes and event to signal child process.
BurnPipeCreatePipes - create the pipes and event to signal child process.
*******************************************************************/
extern "C" HRESULT PipeCreatePipes(
extern "C" HRESULT BurnPipeCreatePipes(
__in BURN_PIPE_CONNECTION* pConnection,
__in BOOL fCompanion
)
Expand Down Expand Up @@ -287,10 +287,10 @@ extern "C" HRESULT PipeCreatePipes(
}

/*******************************************************************
PipeWaitForChildConnect -
BurnPipeWaitForChildConnect -
*******************************************************************/
extern "C" HRESULT PipeWaitForChildConnect(
extern "C" HRESULT BurnPipeWaitForChildConnect(
__in BURN_PIPE_CONNECTION* pConnection
)
{
Expand Down Expand Up @@ -335,10 +335,10 @@ extern "C" HRESULT PipeWaitForChildConnect(
}

/*******************************************************************
PipeTerminateLoggingPipe -
BurnPipeTerminateLoggingPipe -
*******************************************************************/
extern "C" HRESULT PipeTerminateLoggingPipe(
extern "C" HRESULT BurnPipeTerminateLoggingPipe(
__in HANDLE hLoggingPipe,
__in DWORD dwParentExitCode
)
Expand All @@ -361,10 +361,10 @@ extern "C" HRESULT PipeTerminateLoggingPipe(
}

/*******************************************************************
PipeTerminateChildProcess -
BurnPipeTerminateChildProcess -
*******************************************************************/
extern "C" HRESULT PipeTerminateChildProcess(
extern "C" HRESULT BurnPipeTerminateChildProcess(
__in BURN_PIPE_CONNECTION* pConnection,
__in DWORD dwParentExitCode,
__in BOOL fRestart
Expand Down Expand Up @@ -425,11 +425,11 @@ extern "C" HRESULT PipeTerminateChildProcess(
}

/*******************************************************************
PipeChildConnect - Called from the child process to connect back
BurnPipeChildConnect - Called from the child process to connect back
to the pipe provided by the parent process.
*******************************************************************/
extern "C" HRESULT PipeChildConnect(
extern "C" HRESULT BurnPipeChildConnect(
__in BURN_PIPE_CONNECTION* pConnection,
__in BOOL fCompanion
)
Expand Down
20 changes: 10 additions & 10 deletions src/burn/engine/burnpipe.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ typedef HRESULT (*PFN_PIPE_MESSAGE_CALLBACK)(


// Common functions.
void PipeConnectionInitialize(
void BurnPipeConnectionInitialize(
__in BURN_PIPE_CONNECTION* pConnection
);
void PipeConnectionUninitialize(
void BurnPipeConnectionUninitialize(
__in BURN_PIPE_CONNECTION* pConnection
);
HRESULT PipeSendMessage(
HRESULT BurnPipeSendMessage(
__in HANDLE hPipe,
__in DWORD dwMessage,
__in_bcount_opt(cbData) LPVOID pvData,
Expand All @@ -55,37 +55,37 @@ HRESULT PipeSendMessage(
__in_opt LPVOID pvContext,
__out DWORD* pdwResult
);
HRESULT PipePumpMessages(
HRESULT BurnPipePumpMessages(
__in HANDLE hPipe,
__in_opt PFN_PIPE_MESSAGE_CALLBACK pfnCallback,
__in_opt LPVOID pvContext,
__in BURN_PIPE_RESULT* pResult
);

// Parent functions.
HRESULT PipeCreateNameAndSecret(
HRESULT BurnPipeCreateNameAndSecret(
__out_z LPWSTR *psczConnectionName,
__out_z LPWSTR *psczSecret
);
HRESULT PipeCreatePipes(
HRESULT BurnPipeCreatePipes(
__in BURN_PIPE_CONNECTION* pConnection,
__in BOOL fCompanion
);
HRESULT PipeWaitForChildConnect(
HRESULT BurnPipeWaitForChildConnect(
__in BURN_PIPE_CONNECTION* pConnection
);
HRESULT PipeTerminateLoggingPipe(
HRESULT BurnPipeTerminateLoggingPipe(
__in HANDLE hLoggingPipe,
__in DWORD dwParentExitCode
);
HRESULT PipeTerminateChildProcess(
HRESULT BurnPipeTerminateChildProcess(
__in BURN_PIPE_CONNECTION* pConnection,
__in DWORD dwParentExitCode,
__in BOOL fRestart
);

// Child functions.
HRESULT PipeChildConnect(
HRESULT BurnPipeChildConnect(
__in BURN_PIPE_CONNECTION* pConnection,
__in BOOL fCompanion
);
Expand Down
6 changes: 3 additions & 3 deletions src/burn/engine/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ extern "C" HRESULT CoreInitializeConstants(
hr = StrAllocString(&pRegistration->sczBundlePackageAncestors, pRegistration->sczId, 0);
ExitOnFailure(hr, "Failed to copy self to bundle package ancestors.");
}

for (DWORD i = 0; i < pEngineState->packages.cPackages; ++i)
{
BURN_PACKAGE* pPackage = pEngineState->packages.rgPackages + i;
Expand Down Expand Up @@ -2285,7 +2285,7 @@ static HRESULT DetectPackage(
{
HRESULT hr = S_OK;
BOOL fBegan = FALSE;

fBegan = TRUE;
hr = UserExperienceOnDetectPackageBegin(&pEngineState->userExperience, pPackage->sczId);
ExitOnRootFailure(hr, "BA aborted detect package begin.");
Expand Down Expand Up @@ -2423,7 +2423,7 @@ static DWORD WINAPI LoggingThreadProc(
BURN_ENGINE_STATE* pEngineState = reinterpret_cast<BURN_ENGINE_STATE*>(lpThreadParameter);
BURN_PIPE_RESULT result = { };

hr = PipePumpMessages(pEngineState->companionConnection.hLoggingPipe, NULL, NULL, &result);
hr = BurnPipePumpMessages(pEngineState->companionConnection.hLoggingPipe, NULL, NULL, &result);
ExitOnFailure(hr, "Failed to pump logging messages for elevated process.");

hr = (HRESULT)result.dwResult;
Expand Down
Loading

0 comments on commit 8b55203

Please sign in to comment.