Fix definitions for Uuid{To,From}String, RpcStringFree.

This commit is contained in:
Dimitrie O. Paun 2002-12-24 00:26:55 +00:00 committed by Alexandre Julliard
parent e25ab1fa7d
commit 48be9c6e87
5 changed files with 34 additions and 34 deletions

View File

@ -160,7 +160,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
HKEY key, subkey;
TRACE("(%p,%p,%s)\n", hDll, pProxyFileList, debugstr_guid(pclsid));
UuidToStringA((UUID*)pclsid, &clsid);
UuidToStringA((UUID*)pclsid, (unsigned char**)&clsid);
/* register interfaces to point to clsid */
while (*pProxyFileList) {
@ -172,9 +172,9 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
TRACE("registering %s %s => %s\n", name, debugstr_guid(proxy->header.piid), clsid);
UuidToStringA((UUID*)proxy->header.piid, &iid);
UuidToStringA((UUID*)proxy->header.piid, (unsigned char**)&iid);
snprintf(keyname, sizeof(keyname), "Interface\\%s", iid);
RpcStringFreeA(&iid);
RpcStringFreeA((unsigned char**)&iid);
if (RegCreateKeyExA(HKEY_CLASSES_ROOT, keyname, 0, NULL, 0,
KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) {
if (name)
@ -205,7 +205,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
}
/* done */
RpcStringFreeA(&clsid);
RpcStringFreeA((unsigned char**)&clsid);
return S_OK;
}
@ -220,7 +220,7 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll,
char keyname[120], module[120];
TRACE("(%p,%p,%s)\n", hDll, pProxyFileList, debugstr_guid(pclsid));
UuidToStringA((UUID*)pclsid, &clsid);
UuidToStringA((UUID*)pclsid, (unsigned char**)&clsid);
/* unregister interfaces */
while (*pProxyFileList) {
@ -232,9 +232,9 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll,
TRACE("unregistering %s %s <= %s\n", name, debugstr_guid(proxy->header.piid), clsid);
UuidToStringA((UUID*)proxy->header.piid, &iid);
UuidToStringA((UUID*)proxy->header.piid, (unsigned char**)&iid);
snprintf(keyname, sizeof(keyname), "Interface\\%s", iid);
RpcStringFreeA(&iid);
RpcStringFreeA((unsigned char**)&iid);
RegDeleteKeyA(HKEY_CLASSES_ROOT, keyname);
}
pProxyFileList++;
@ -247,6 +247,6 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll,
RegDeleteKeyA(HKEY_CLASSES_ROOT, keyname);
/* done */
RpcStringFreeA(&clsid);
RpcStringFreeA((unsigned char**)&clsid);
return S_OK;
}

View File

@ -595,11 +595,11 @@ RPC_STATUS WINAPI RpcStringBindingParseA( LPSTR StringBinding, LPSTR *ObjUuid,
return RPC_S_OK;
fail:
if (ObjUuid) RpcStringFreeA(ObjUuid);
if (Protseq) RpcStringFreeA(Protseq);
if (NetworkAddr) RpcStringFreeA(NetworkAddr);
if (Endpoint) RpcStringFreeA(Endpoint);
if (Options) RpcStringFreeA(Options);
if (ObjUuid) RpcStringFreeA((unsigned char**)ObjUuid);
if (Protseq) RpcStringFreeA((unsigned char**)Protseq);
if (NetworkAddr) RpcStringFreeA((unsigned char**)NetworkAddr);
if (Endpoint) RpcStringFreeA((unsigned char**)Endpoint);
if (Options) RpcStringFreeA((unsigned char**)Options);
return RPC_S_INVALID_STRING_BINDING;
}
@ -771,11 +771,11 @@ RPC_STATUS WINAPI RpcBindingFromStringBindingA( LPSTR StringBinding, RPC_BINDING
if (ret == RPC_S_OK)
ret = RPCRT4_CompleteBindingA(bind, NetworkAddr, Endpoint, Options);
RpcStringFreeA(&Options);
RpcStringFreeA(&Endpoint);
RpcStringFreeA(&NetworkAddr);
RpcStringFreeA(&Protseq);
RpcStringFreeA(&ObjectUuid);
RpcStringFreeA((unsigned char**)&Options);
RpcStringFreeA((unsigned char**)&Endpoint);
RpcStringFreeA((unsigned char**)&NetworkAddr);
RpcStringFreeA((unsigned char**)&Protseq);
RpcStringFreeA((unsigned char**)&ObjectUuid);
if (ret == RPC_S_OK)
*Binding = (RPC_BINDING_HANDLE)bind;
@ -835,13 +835,13 @@ RPC_STATUS WINAPI RpcBindingToStringBindingA( RPC_BINDING_HANDLE Binding, LPSTR*
TRACE("(%p,%p)\n", Binding, StringBinding);
ret = UuidToStringA(&bind->ObjectUuid, &ObjectUuid);
ret = UuidToStringA(&bind->ObjectUuid, (unsigned char**)&ObjectUuid);
if (ret != RPC_S_OK) return ret;
ret = RpcStringBindingComposeA(ObjectUuid, bind->Protseq, bind->NetworkAddr,
bind->Endpoint, NULL, StringBinding);
RpcStringFreeA(&ObjectUuid);
RpcStringFreeA((unsigned char**)&ObjectUuid);
return ret;
}
@ -856,7 +856,7 @@ RPC_STATUS WINAPI RpcBindingToStringBindingW( RPC_BINDING_HANDLE Binding, LPWSTR
TRACE("(%p,%p)\n", Binding, StringBinding);
ret = RpcBindingToStringBindingA(Binding, &str);
*StringBinding = RPCRT4_strdupAtoW(str);
RpcStringFreeA(&str);
RpcStringFreeA((unsigned char**)&str);
return ret;
}

View File

@ -190,7 +190,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
*
* S_OK if successful.
*/
RPC_STATUS WINAPI RpcStringFreeA(LPSTR* String)
RPC_STATUS WINAPI RpcStringFreeA(unsigned char** String)
{
HeapFree( GetProcessHeap(), 0, *String);
@ -206,7 +206,7 @@ RPC_STATUS WINAPI RpcStringFreeA(LPSTR* String)
*
* S_OK if successful.
*/
RPC_STATUS WINAPI RpcStringFreeW(LPWSTR* String)
RPC_STATUS WINAPI RpcStringFreeW(unsigned short** String)
{
HeapFree( GetProcessHeap(), 0, *String);
@ -545,7 +545,7 @@ unsigned short WINAPI UuidHash(UUID *uuid, RPC_STATUS *Status)
* S_OK if successful.
* S_OUT_OF_MEMORY if unsucessful.
*/
RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, LPSTR* StringUuid)
RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, unsigned char** StringUuid)
{
*StringUuid = HeapAlloc( GetProcessHeap(), 0, sizeof(char) * 37);
@ -571,7 +571,7 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, LPSTR* StringUuid)
* S_OK if successful.
* S_OUT_OF_MEMORY if unsucessful.
*/
RPC_STATUS WINAPI UuidToStringW(UUID *Uuid, LPWSTR* StringUuid)
RPC_STATUS WINAPI UuidToStringW(UUID *Uuid, unsigned short** StringUuid)
{
char buf[37];
@ -605,7 +605,7 @@ static const BYTE hex2bin[] =
/***********************************************************************
* UuidFromStringA (RPCRT4.@)
*/
RPC_STATUS WINAPI UuidFromStringA(LPSTR str, UUID *uuid)
RPC_STATUS WINAPI UuidFromStringA(unsigned char* str, UUID *uuid)
{
BYTE *s = (BYTE *)str;
int i;
@ -646,7 +646,7 @@ RPC_STATUS WINAPI UuidFromStringA(LPSTR str, UUID *uuid)
/***********************************************************************
* UuidFromStringW (RPCRT4.@)
*/
RPC_STATUS WINAPI UuidFromStringW(LPWSTR s, UUID *uuid)
RPC_STATUS WINAPI UuidFromStringW(unsigned short* s, UUID *uuid)
{
int i;

View File

@ -86,7 +86,7 @@ void UuidConversionAndComparison(void) {
/* Uuid to String to Uuid (char) */
for (i1 = 0; i1 < 10; i1++) {
Uuid1 = Uuid_Table[i1];
ok( (UuidToStringA(&Uuid1, &str) == RPC_S_OK), "Simple UUID->String copy" );
ok( (UuidToStringA(&Uuid1, (unsigned char**)&str) == RPC_S_OK), "Simple UUID->String copy" );
ok( (UuidFromStringA(str, &Uuid2) == RPC_S_OK), "Simple String->UUID copy from generated UUID String" );
ok( UuidEqual(&Uuid1, &Uuid2, &rslt), "Uuid -> String -> Uuid transform" );
/* invalid uuid tests -- size of valid UUID string=36 */

View File

@ -250,21 +250,21 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
#define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcStringFreeA(LPSTR* String);
RpcStringFreeA(unsigned char** String);
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcStringFreeW(LPWSTR* String);
RpcStringFreeW(unsigned short** String);
#define RpcStringFree WINELIB_NAME_AW(RpcStringFree)
RPCRTAPI RPC_STATUS RPC_ENTRY
UuidToStringA( UUID* Uuid, LPSTR* StringUuid );
UuidToStringA( UUID* Uuid, unsigned char** StringUuid );
RPCRTAPI RPC_STATUS RPC_ENTRY
UuidToStringW( UUID* Uuid, LPWSTR* StringUuid );
UuidToStringW( UUID* Uuid, unsigned short** StringUuid );
#define UuidToString WINELIB_NAME_AW(UuidToString)
RPCRTAPI RPC_STATUS RPC_ENTRY
UuidFromStringA( LPSTR StringUuid, UUID* Uuid );
UuidFromStringA( unsigned char* StringUuid, UUID* Uuid );
RPCRTAPI RPC_STATUS RPC_ENTRY
UuidFromStringW( LPWSTR StringUuid, UUID* Uuid );
UuidFromStringW( unsigned short* StringUuid, UUID* Uuid );
#define UuidFromString WINELIB_NAME_AW(UuidFromString)
RPCRTAPI RPC_STATUS RPC_ENTRY