[PATCH 2/2] mprapi: Add a stub for MprAdminGetErrorString
Detlef Riekenberg
wine.dev at web.de
Mon Oct 4 16:51:57 CDT 2010
Avoid a crash in netsh.exe
--
By by ... Detlef
---
dlls/mprapi/mprapi.c | 26 ++++++++++++++++++++++++++
dlls/mprapi/mprapi.spec | 2 +-
2 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/dlls/mprapi/mprapi.c b/dlls/mprapi/mprapi.c
index 90f47ae..715f1b8 100644
--- a/dlls/mprapi/mprapi.c
+++ b/dlls/mprapi/mprapi.c
@@ -45,6 +45,32 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
}
/***********************************************************************
+ * MprAdminGetErrorString (MPRAPI.@)
+ *
+ * Return a unicode string for the given mpr errorcode
+ *
+ * PARAMS
+ * mprerror [i] errorcode, for which a description is requested
+ * localstr [o] pointer, where a buffer with the error description is returned
+ *
+ * RETURNS
+ * Failure: ERROR_MR_MID_NOT_FOUND, when mprerror is not known
+ * Success: ERROR_SUCCESS, and in localstr a pointer to a buffer from LocalAlloc,
+ * which contains the error description.
+ *
+ * NOTES
+ * The caller must free the returned buffer with LocalFree
+ *
+ */
+DWORD APIENTRY MprAdminGetErrorString(DWORD mprerror, LPWSTR *localstr)
+{
+ FIXME("(0x%x/%u, %p): stub!\n", mprerror, mprerror, localstr);
+
+ *localstr = NULL;
+ return ERROR_MR_MID_NOT_FOUND;
+}
+
+/***********************************************************************
* MprAdminIsServiceRunning (MPRAPI.@)
*/
BOOL APIENTRY MprAdminIsServiceRunning(LPWSTR server)
diff --git a/dlls/mprapi/mprapi.spec b/dlls/mprapi/mprapi.spec
index 6fb8439..4b5937b 100644
--- a/dlls/mprapi/mprapi.spec
+++ b/dlls/mprapi/mprapi.spec
@@ -6,7 +6,7 @@
@ stub MprAdminDeregisterConnectionNotification
@ stub MprAdminDeviceEnum
@ stub MprAdminEstablishDomainRasServer
-@ stub MprAdminGetErrorString
+@ stdcall MprAdminGetErrorString(long ptr)
@ stub MprAdminGetPDCServer
@ stub MprAdminInterfaceConnect
@ stub MprAdminInterfaceCreate
--
1.7.0.4
More information about the wine-patches
mailing list