Re: [PATCH] strmbase: Display dll in which we are searching a class to instanciate.
Christian Costa <titan.costa(a)gmail.com> writes:
@@ -360,14 +361,17 @@ HRESULT WINAPI STRMBASE_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * break; }
+ if (!GetModuleFileNameA(g_hInst, dllname, sizeof(dllname))) + strcpy(dllname, "???");
You don't want to do that in the success case. -- Alexandre Julliard julliard(a)winehq.org
2012/3/28 Alexandre Julliard <julliard(a)winehq.org>
Christian Costa <titan.costa(a)gmail.com> writes:
@@ -360,14 +361,17 @@ HRESULT WINAPI STRMBASE_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * break; }
+ if (!GetModuleFileNameA(g_hInst, dllname, sizeof(dllname))) + strcpy(dllname, "???");
You don't want to do that in the success case.
GetModuleFileNameA returns the length of the string copied to the buffer. The length is 0 in case of error.
Christian Costa <titan.costa(a)gmail.com> writes:
2012/3/28 Alexandre Julliard <julliard(a)winehq.org>
Christian Costa <titan.costa(a)gmail.com> writes:
@@ -360,14 +361,17 @@ HRESULT WINAPI STRMBASE_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * break; }
+ if (!GetModuleFileNameA(g_hInst, dllname, sizeof(dllname))) + strcpy(dllname, "???");
You don't want to do that in the success case.
GetModuleFileNameA returns the length of the string copied to the buffer. The length is 0 in case of error.
What I mean is that you only need the module name in case the class is not found (and really, only in the null constructor case). -- Alexandre Julliard julliard(a)winehq.org
2012/3/28 Alexandre Julliard <julliard(a)winehq.org>
Christian Costa <titan.costa(a)gmail.com> writes:
2012/3/28 Alexandre Julliard <julliard(a)winehq.org>
Christian Costa <titan.costa(a)gmail.com> writes:
@@ -360,14 +361,17 @@ HRESULT WINAPI STRMBASE_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * break; }
+ if (!GetModuleFileNameA(g_hInst, dllname, sizeof(dllname))) + strcpy(dllname, "???");
You don't want to do that in the success case.
GetModuleFileNameA returns the length of the string copied to the buffer. The length is 0 in case of error.
What I mean is that you only need the module name in case the class is not found (and really, only in the null constructor case).
It's convenient to see from a log where the class is supposed to be implemented but since this can be retreive in the registry, it can be remove.
participants (2)
-
Alexandre Julliard -
Christian Costa