[Bug 1131] - rpcrt4.dll.so with ms office 2k

wine-bugs at winehq.com wine-bugs at winehq.com
Fri Nov 8 13:58:46 CST 2002


http://bugs.winehq.com/show_bug.cgi?id=1131





------- Additional Comments From tony_lambregts at telusplanet.net  2002-11-08 13:58 -------
choose your favorite test editor and edit
where_ever_wine_is/dlls/rpcrt4/rpcrt4_main.c 

search for UuidToStringA

You should end up with at this

/*************************************************************************
 *           UuidToStringA   [RPCRT4.@]
 *
 * Converts a UUID to a string.
 *
 * UUID format is 8 hex digits, followed by a hyphen then three groups of
 * 4 hex digits each followed by a hyphen and then 12 hex digits
 *
 * RETURNS
 *
 *  S_OK if successful.
 *  S_OUT_OF_MEMORY if unsucessful.
 */
RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, LPSTR* StringUuid)
{
  *StringUuid = HeapAlloc( GetProcessHeap(), 0, sizeof(char) * 37);

  if(!(*StringUuid))
    return RPC_S_OUT_OF_MEMORY;

  if (!Uuid) Uuid = &uuid_nil;

  sprintf(*StringUuid, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
                 Uuid->Data1, Uuid->Data2, Uuid->Data3,
                 Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
                 Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
                 Uuid->Data4[6], Uuid->Data4[7] );

  return RPC_S_OK;
}
---

Insert trace statements before each statement so we an find out what is going
wrong like so

/*************************************************************************
 *           UuidToStringA   [RPCRT4.@]
 *
 * Converts a UUID to a string.
 *
 * UUID format is 8 hex digits, followed by a hyphen then three groups of
 * 4 hex digits each followed by a hyphen and then 12 hex digits
 *
 * RETURNS
 *
 *  S_OK if successful.
 *  S_OUT_OF_MEMORY if unsucessful.
 */
RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, LPSTR* StringUuid)
{
TRACE("before HeapAlloc")
  *StringUuid = HeapAlloc( GetProcessHeap(), 0, sizeof(char) * 37);
TRACE("Before if(!(*StringUuid))")
  if(!(*StringUuid))
    return RPC_S_OUT_OF_MEMORY;
TRACE("Before if(!Uuid)")
  if (!Uuid) Uuid = &uuid_nil;
TRACE("Before sprintf(")

  sprintf(*StringUuid, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
                 Uuid->Data1, Uuid->Data2, Uuid->Data3,
                 Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
                 Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
                 Uuid->Data4[6], Uuid->Data4[7] );
TRACE("Before Return")
  return RPC_S_OK;
}

Save the file and do a "make && make depend", "su" "make install" cycle so the
traces are in the wine binary


Is that simple enough or would you want more help?

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1131>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.



More information about the wine-bugs mailing list