newlines for outputDebugStringF usage.
This commit is contained in:
parent
340e31298e
commit
37140f9e93
|
@ -25,22 +25,22 @@ extern void outputDebugStringF(const char *str, ...);
|
|||
CClassFactory::CClassFactory() :
|
||||
m_refCount(1)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CClassFactory::ctor, g_refCount=%d", g_refCount);
|
||||
outputDebugStringF("synwinxt: > CClassFactory::ctor, g_refCount=%d\n", g_refCount);
|
||||
InterlockedIncrement(&g_refCount);
|
||||
outputDebugStringF("synwinxt: < CClassFactory::ctor, g_refCount=%d", g_refCount);
|
||||
outputDebugStringF("synwinxt: < CClassFactory::ctor, g_refCount=%d\n", g_refCount);
|
||||
}
|
||||
|
||||
CClassFactory::~CClassFactory()
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CClassFactory::dtor, g_refCount=%d", g_refCount);
|
||||
outputDebugStringF("synwinxt: > CClassFactory::dtor, g_refCount=%d\n", g_refCount);
|
||||
InterlockedDecrement(&g_refCount);
|
||||
outputDebugStringF("synwinxt: < CClassFactory::dtor, g_refCount=%d", g_refCount);
|
||||
outputDebugStringF("synwinxt: < CClassFactory::dtor, g_refCount=%d\n", g_refCount);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE
|
||||
CClassFactory::QueryInterface(REFIID riid, void **ppvObject)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CClassFactory::QueryInterface");
|
||||
outputDebugStringF("synwinxt: > CClassFactory::QueryInterface\n");
|
||||
static const QITAB qit[] =
|
||||
{
|
||||
QITABENT(CClassFactory, IClassFactory),
|
||||
|
@ -48,36 +48,36 @@ CClassFactory::QueryInterface(REFIID riid, void **ppvObject)
|
|||
};
|
||||
HRESULT hr = QISearch(this, qit, riid, ppvObject);
|
||||
|
||||
outputDebugStringF("synwinxt: < CClassFactory::QueryInterface, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < CClassFactory::QueryInterface, hr=%d\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
ULONG STDMETHODCALLTYPE
|
||||
CClassFactory::AddRef()
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CClassFactory::AddRef, m_refCount=%d", m_refCount);
|
||||
outputDebugStringF("synwinxt: > CClassFactory::AddRef, m_refCount=%d\n", m_refCount);
|
||||
LONG r = InterlockedIncrement(&m_refCount);
|
||||
outputDebugStringF("synwinxt: < CClassFactory::AddRef, r=%d, m_refCount=%d", r, m_refCount);
|
||||
outputDebugStringF("synwinxt: < CClassFactory::AddRef, r=%d, m_refCount=%d\n", r, m_refCount);
|
||||
return r;
|
||||
}
|
||||
|
||||
ULONG STDMETHODCALLTYPE
|
||||
CClassFactory::Release()
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CClassFactory::Release, m_refCount=%d", m_refCount);
|
||||
outputDebugStringF("synwinxt: > CClassFactory::Release, m_refCount=%d\n", m_refCount);
|
||||
LONG r = InterlockedDecrement(&m_refCount);
|
||||
if (r == 0) {
|
||||
delete this;
|
||||
}
|
||||
|
||||
outputDebugStringF("synwinxt: < CClassFactory::Release, r=%d", r);
|
||||
outputDebugStringF("synwinxt: < CClassFactory::Release, r=%d\n", r);
|
||||
return r;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE
|
||||
CClassFactory::CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CClassFactory::CreateInstance");
|
||||
outputDebugStringF("synwinxt: > CClassFactory::CreateInstance\n");
|
||||
if (pUnkOuter != NULL) {
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
}
|
||||
|
@ -88,20 +88,20 @@ CClassFactory::CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObject
|
|||
delete pExtension;
|
||||
}
|
||||
|
||||
outputDebugStringF("synwinxt: < CClassFactory::CreateInstance, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < CClassFactory::CreateInstance, hr=%d\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE
|
||||
CClassFactory::LockServer(BOOL fLock)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CClassFactory::LockServer, g_refCount=%d", g_refCount);
|
||||
outputDebugStringF("synwinxt: > CClassFactory::LockServer, g_refCount=%d\n", g_refCount);
|
||||
if (fLock) {
|
||||
InterlockedIncrement(&g_refCount);
|
||||
}
|
||||
else {
|
||||
InterlockedDecrement(&g_refCount);
|
||||
}
|
||||
outputDebugStringF("synwinxt: < CClassFactory::LockServer, g_refCount=%d", g_refCount);
|
||||
outputDebugStringF("synwinxt: < CClassFactory::LockServer, g_refCount=%d\n", g_refCount);
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -27,22 +27,22 @@ extern void outputDebugStringF(const char *str, ...);
|
|||
CDataHandlerExtension::CDataHandlerExtension() :
|
||||
m_refCount(1)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::ctor, g_refCount=%d", g_refCount);
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::ctor, g_refCount=%d\n", g_refCount);
|
||||
InterlockedIncrement(&g_refCount);
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::ctor, g_refCount=%d", g_refCount);
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::ctor, g_refCount=%d\n", g_refCount);
|
||||
}
|
||||
|
||||
CDataHandlerExtension::~CDataHandlerExtension()
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::dtor, g_refCount=%d", g_refCount);
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::dtor, g_refCount=%d\n", g_refCount);
|
||||
InterlockedDecrement(&g_refCount);
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::dtor, g_refCount=%d", g_refCount);
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::dtor, g_refCount=%d\n", g_refCount);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE
|
||||
CDataHandlerExtension::QueryInterface(REFIID riid, void **ppvObject)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::QueryInterface");
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::QueryInterface\n");
|
||||
static const QITAB qit[] =
|
||||
{
|
||||
QITABENT(CDataHandlerExtension, IPersistFile),
|
||||
|
@ -52,10 +52,10 @@ CDataHandlerExtension::QueryInterface(REFIID riid, void **ppvObject)
|
|||
HRESULT hr = QISearch(this, qit, riid, ppvObject);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::QueryInterface, hr=FAILED");
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::QueryInterface, hr=FAILED\n");
|
||||
}
|
||||
else {
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::QueryInterface, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::QueryInterface, hr=%d\n", hr);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
@ -63,43 +63,43 @@ CDataHandlerExtension::QueryInterface(REFIID riid, void **ppvObject)
|
|||
ULONG STDMETHODCALLTYPE
|
||||
CDataHandlerExtension::AddRef()
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::AddRef, m_refCount=%d", m_refCount);
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::AddRef, m_refCount=%d\n", m_refCount);
|
||||
LONG r = InterlockedIncrement(&m_refCount);
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::AddRef, r=%d, m_refCount=%d", r, m_refCount);
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::AddRef, r=%d, m_refCount=%d\n", r, m_refCount);
|
||||
return r;
|
||||
}
|
||||
|
||||
ULONG STDMETHODCALLTYPE
|
||||
CDataHandlerExtension::Release()
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::Release, m_refCount=%d", m_refCount);
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::Release, m_refCount=%d\n", m_refCount);
|
||||
LONG r = InterlockedDecrement(&m_refCount);
|
||||
if (r == 0) {
|
||||
delete this;
|
||||
}
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::Release, r=%d", r);
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::Release, r=%d\n", r);
|
||||
return r;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE
|
||||
CDataHandlerExtension::Load(__RPC__in LPCOLESTR pszFileName, DWORD dwMode)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::Load");
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::Load\n");
|
||||
|
||||
char selectedFileDir[MAX_PATH];
|
||||
StringCchCopyW(m_selectedFileDir, ARRAYSIZE(m_selectedFileDir), pszFileName);
|
||||
WideCharToMultiByte(CP_ACP, 0, m_selectedFileDir, -1, selectedFileDir, MAX_PATH, NULL, NULL);
|
||||
updateDraggingDir(selectedFileDir);
|
||||
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::Load");
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::Load\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE
|
||||
CDataHandlerExtension::GetClassID(__RPC__out CLSID *pClassID)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::GetClassID");
|
||||
outputDebugStringF("synwinxt: > CDataHandlerExtension::GetClassID\n");
|
||||
*pClassID = g_CLSID;
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::GetClassID");
|
||||
outputDebugStringF("synwinxt: < CDataHandlerExtension::GetClassID\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ outputDebugStringF(const char* str, ...)
|
|||
BOOL APIENTRY
|
||||
DllMain(HMODULE module, DWORD reason, LPVOID reserved)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > DllMain, reason=%d", reason);
|
||||
outputDebugStringF("synwinxt: > DllMain, reason=%d\n", reason);
|
||||
|
||||
switch (reason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
|
@ -75,14 +75,14 @@ DllMain(HMODULE module, DWORD reason, LPVOID reserved)
|
|||
break;
|
||||
}
|
||||
|
||||
outputDebugStringF("synwinxt: < DllMain");
|
||||
outputDebugStringF("synwinxt: < DllMain\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
STDAPI
|
||||
DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppvObj)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > DllGetClassObject");
|
||||
outputDebugStringF("synwinxt: > DllGetClassObject\n");
|
||||
|
||||
HRESULT hr = E_OUTOFMEMORY;
|
||||
*ppvObj = NULL;
|
||||
|
@ -93,29 +93,29 @@ DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppvObj)
|
|||
classFactory->Release();
|
||||
}
|
||||
|
||||
outputDebugStringF("synwinxt: < DllGetClassObject, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < DllGetClassObject, hr=%d\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDAPI
|
||||
DllCanUnloadNow()
|
||||
{
|
||||
outputDebugStringF("synwinxt: > DllCanUnloadNow, g_refCount=%d", g_refCount);
|
||||
outputDebugStringF("synwinxt: > DllCanUnloadNow, g_refCount=%d\n", g_refCount);
|
||||
int r = g_refCount > 0 ? S_FALSE : S_OK;
|
||||
outputDebugStringF("synwinxt: < DllCanUnloadNow, g_refCount=%d, r=%d", g_refCount, r);
|
||||
outputDebugStringF("synwinxt: < DllCanUnloadNow, g_refCount=%d, r=%d\n", g_refCount, r);
|
||||
return r;
|
||||
}
|
||||
STDAPI
|
||||
DllRegisterServer()
|
||||
{
|
||||
outputDebugStringF("synwinxt: > DllRegisterServer");
|
||||
outputDebugStringF("synwinxt: > DllRegisterServer\n");
|
||||
|
||||
HRESULT hr;
|
||||
|
||||
CHAR module[MAX_PATH];
|
||||
if (GetModuleFileName(g_instance, module, ARRAYSIZE(module)) == 0) {
|
||||
hr = HRESULT_FROM_WIN32(GetLastError());
|
||||
outputDebugStringF("synwinxt: < DllRegisterServer, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < DllRegisterServer, hr=%d\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -130,21 +130,21 @@ DllRegisterServer()
|
|||
g_CLSID);
|
||||
}
|
||||
|
||||
outputDebugStringF("synwinxt: < DllRegisterServer, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < DllRegisterServer, hr=%d\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDAPI
|
||||
DllUnregisterServer()
|
||||
{
|
||||
outputDebugStringF("synwinxt: > DllUnregisterServer");
|
||||
outputDebugStringF("synwinxt: > DllUnregisterServer\n");
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
CHAR module[MAX_PATH];
|
||||
if (GetModuleFileName(g_instance, module, ARRAYSIZE(module)) == 0) {
|
||||
hr = HRESULT_FROM_WIN32(GetLastError());
|
||||
outputDebugStringF("synwinxt: < DllRegisterServer, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < DllRegisterServer, hr=%d\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -153,14 +153,14 @@ DllUnregisterServer()
|
|||
hr = unregisterShellExtDataHandler("*", g_CLSID);
|
||||
}
|
||||
|
||||
outputDebugStringF("synwinxt: < DllUnregisterServer, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < DllUnregisterServer, hr=%d\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT
|
||||
registerInprocServer(CHAR* module, const CLSID& clsid, CHAR* threadModel)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > registerInprocServer");
|
||||
outputDebugStringF("synwinxt: > registerInprocServer\n");
|
||||
|
||||
if (module == NULL || threadModel == NULL) {
|
||||
return E_INVALIDARG;
|
||||
|
@ -190,14 +190,14 @@ registerInprocServer(CHAR* module, const CLSID& clsid, CHAR* threadModel)
|
|||
}
|
||||
}
|
||||
|
||||
outputDebugStringF("synwinxt: < registerInprocServer, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < registerInprocServer, hr=%d\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT
|
||||
unregisterInprocServer(const CLSID& clsid)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > unregisterInprocServer");
|
||||
outputDebugStringF("synwinxt: > unregisterInprocServer\n");
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
|
@ -215,10 +215,10 @@ unregisterInprocServer(const CLSID& clsid)
|
|||
}
|
||||
|
||||
if (FAILED(hr)) {
|
||||
outputDebugStringF("synwinxt: < unregisterInprocServer, hr=FAILED");
|
||||
outputDebugStringF("synwinxt: < unregisterInprocServer, hr=FAILED\n");
|
||||
}
|
||||
else {
|
||||
outputDebugStringF("synwinxt: < unregisterInprocServer, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < unregisterInprocServer, hr=%d\n", hr);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ unregisterInprocServer(const CLSID& clsid)
|
|||
HRESULT
|
||||
registerShellExtDataHandler(CHAR* fileType, const CLSID& clsid)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > registerShellExtDataHandler");
|
||||
outputDebugStringF("synwinxt: > registerShellExtDataHandler\n");
|
||||
|
||||
if (fileType == NULL) {
|
||||
return E_INVALIDARG;
|
||||
|
@ -249,14 +249,14 @@ registerShellExtDataHandler(CHAR* fileType, const CLSID& clsid)
|
|||
CArchMiscWindows::setValue(key, NULL, CLASSID);
|
||||
}
|
||||
|
||||
outputDebugStringF("synwinxt: < registerShellExtDataHandler, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < registerShellExtDataHandler, hr=%d\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT
|
||||
unregisterShellExtDataHandler(CHAR* fileType, const CLSID& clsid)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > unregisterShellExtDataHandler");
|
||||
outputDebugStringF("synwinxt: > unregisterShellExtDataHandler\n");
|
||||
|
||||
if (fileType == NULL) {
|
||||
return E_INVALIDARG;
|
||||
|
@ -277,22 +277,22 @@ unregisterShellExtDataHandler(CHAR* fileType, const CLSID& clsid)
|
|||
hr = HRESULT_FROM_WIN32(RegDeleteTree(HKEY_CLASSES_ROOT, subkey));
|
||||
}
|
||||
|
||||
outputDebugStringF("synwinxt: < unregisterShellExtDataHandler, hr=%d", hr);
|
||||
outputDebugStringF("synwinxt: < unregisterShellExtDataHandler, hr=%d\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
void
|
||||
updateDraggingDir(char* dir)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > updateDraggingDir, dir=%s", dir);
|
||||
outputDebugStringF("synwinxt: > updateDraggingDir, dir=%s\n", dir);
|
||||
memcpy(g_draggingFileDir, dir, MAX_PATH);
|
||||
outputDebugStringF("synwinxt: < updateDraggingDir, g_draggingFileDir=%s", g_draggingFileDir);
|
||||
outputDebugStringF("synwinxt: < updateDraggingDir, g_draggingFileDir=%s\n", g_draggingFileDir);
|
||||
}
|
||||
|
||||
void
|
||||
getDraggingFileDir(char* dir)
|
||||
{
|
||||
outputDebugStringF("synwinxt: > getDraggingFileDir");
|
||||
outputDebugStringF("synwinxt: > getDraggingFileDir\n");
|
||||
memcpy(dir, g_draggingFileDir, MAX_PATH);
|
||||
outputDebugStringF("synwinxt: < getDraggingFileDir, dir=%s", dir);
|
||||
outputDebugStringF("synwinxt: < getDraggingFileDir, dir=%s\n", dir);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue