当前位置: 首页>>代码示例>>C++>>正文


C++ UuidToString函数代码示例

本文整理汇总了C++中UuidToString函数的典型用法代码示例。如果您正苦于以下问题:C++ UuidToString函数的具体用法?C++ UuidToString怎么用?C++ UuidToString使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了UuidToString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: UuidToString

int ClusterMapLink::Save(string directory)
{
    char uuid_s[36];
    char uuid_src[36], uuid_dest[36];

    UuidToString(&SourceClusterMapUUID,(RPC_CSTR*)uuid_src);
    UuidToString(&DestinationClusterMapUUID,(RPC_CSTR*)uuid_dest);

    UuidToString(&UUID_inst,(RPC_CSTR*)uuid_s);

    string uuid_ss = string(uuid_s);
    string _ClusterMapLinkDir = directory + "/" + uuid_ss;

	LPSECURITY_ATTRIBUTES attr = NULL;

    //create a directory with the ClusterMap UUID number
	CreateDirectory(_ClusterMapLinkDir.c_str(),attr);
    //mkdir(_ClusterMapLinkDir.c_str(),S_IFDIR | S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);

    if(errno == EEXIST)
        return 2; //ClusterMapLink already saved....

    SaveLoadCNN::SaveAxonData(join_axons,_ClusterMapLinkDir+"/axons.xml");

    SaveLinkData(uuid_src,uuid_dest,_ClusterMapLinkDir+"/header.lnk");


    return 0;
    
    
}
开发者ID:Bam4d,项目名称:Neuretix-Win,代码行数:31,代码来源:ClusterMapLink.cpp

示例2: UuidCreate

	std::wstring Directory::CreateDirectoryWithUniqueName (const std::wstring & strFolderPathRoot)
    {
        UUID uuid;
        RPC_WSTR str_uuid;
        UuidCreate (&uuid);
        UuidToString (&uuid, &str_uuid);
		std::wstring pcTemplate = strFolderPathRoot + FILE_SEPARATOR_STR;
        pcTemplate += (TCHAR *) str_uuid;
        RpcStringFree (&str_uuid);

        int attemps = 10;
        while (!CreateDirectory(pcTemplate))
        {
            UuidCreate (&uuid);
            UuidToString (&uuid, &str_uuid);
            pcTemplate = strFolderPathRoot + FILE_SEPARATOR_STR;
            pcTemplate += (TCHAR *) str_uuid;
            RpcStringFree (&str_uuid);
            attemps--;

            if (0 == attemps)
            {
                pcTemplate = _T("");
            }
        }
        return pcTemplate;
    }
开发者ID:alexandervnuchkov,项目名称:core,代码行数:27,代码来源:Directory.cpp

示例3: UuidToString

// update string representation of new UUID
void Uuid::Set(const UUID &uuid)
{
  m_uuid = uuid;

  // get string representation
#ifdef _UNICODE
  UuidToString(&m_uuid, (unsigned short **)&m_pszUuid);
#else
  UuidToString(&m_uuid, &m_pszUuid);
#endif

  // cache UUID in C format
  UuidToCForm();
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:15,代码来源:uuid.cpp

示例4: FilterOnInfoTip

LRESULT
FilterOnInfoTip(
	IN HWND hWnd,
	IN HWND hWndTree,
	IN LPNMTVGETINFOTIP lp
	)
{
	HTREEITEM Parent;
	PBTR_FILTER Filter;
	PFILTER_NODE Node;
	RPC_WSTR Uuid = NULL;

	Parent = TreeView_GetParent(hWndTree, lp->hItem);

	if (!Parent) {

		Node = (PFILTER_NODE)lp->lParam;
		Filter = Node->Filter;

		UuidToString(&Filter->FilterGuid, &Uuid);
		StringCchPrintf(lp->pszText, lp->cchTextMax, FILTER_INFOTIP_FORMAT, 
						Filter->FilterName, Filter->Description, Uuid,
						Filter->MajorVersion, Filter->MinorVersion,
						Filter->Author );

		RpcStringFree(&Uuid);
	}

	return 0;	
}
开发者ID:John-Chan,项目名称:dprobe,代码行数:30,代码来源:filterdlg.c

示例5: InstallGUIDKey

BOOL InstallGUIDKey(GUID& guidKey, HKEY hkey, LPCTSTR strSubKey)
{
	HKEY hkeyNew, hKeySub;
	DWORD dwDisposition;
	LONG nReturn;
	BOOL b = FALSE;

	nReturn = RegCreateKeyEx(hkey,strSubKey,0,0,REG_OPTION_NON_VOLATILE,
		KEY_ALL_ACCESS,0,&hKeySub,&dwDisposition);
	if (ERROR_SUCCESS == nReturn)
	{
		UCHAR* wcs;
		char buf[1024];
		UuidToString(&guidKey,&wcs);
		sprintf(buf,"{%s}",wcs);
		strupr(buf);
		RpcStringFree(&wcs);
		nReturn = RegCreateKeyEx(hKeySub,buf,0,0,REG_OPTION_NON_VOLATILE,
			KEY_READ,0,&hkeyNew,&dwDisposition);
		if (ERROR_SUCCESS == nReturn)
		{
			RegCloseKey(hkeyNew);
			b = TRUE;
		}
		RegCloseKey(hKeySub);
	}
	return b;
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:28,代码来源:KeyUtility.cpp

示例6: e

COMError::COMError(HRESULT hr)
{
	_com_error e(hr);
	IErrorInfo *pIErrorInfo = NULL;
	GetErrorInfo(0, &pIErrorInfo);

	if (pIErrorInfo == NULL)
	{
		e = _com_error(hr);
		message = e.ErrorMessage();
	}
	else
	{
		e = _com_error(hr, pIErrorInfo);
		message = e.ErrorMessage();
		IErrorInfo *ptrIErrorInfo = e.ErrorInfo();
		if (ptrIErrorInfo != NULL)
		{
			// IErrorInfo Interface located
			description = (WCHAR *)e.Description();
			source = (WCHAR *)e.Source();
			GUID tmpGuid = e.GUID();
			RPC_WSTR guidStr = NULL;
			// must link in Rpcrt4.lib for UuidToString
			UuidToString(&tmpGuid, &guidStr);
			uuid = (WCHAR*)guidStr;
			RpcStringFree(&guidStr);

			ptrIErrorInfo->Release();
		}
	}
}
开发者ID:15375514460,项目名称:TortoiseGit,代码行数:32,代码来源:COMError.cpp

示例7: GuidToString

RPC_STATUS
GuidToString(
    UUID   *Uuid,
    LPTSTR StringGuid
)
{
    RPC_STATUS  Status;
    LPTSTR      pTempStringGuid;


    Status = UuidToString(Uuid, &pTempStringGuid);

    if (Status == RPC_S_OK) {
        //
        // the form we want is all uppercase and with curly brackets around,
        // like what OLE does
        //
        lstrcpy(StringGuid, TEXT("{"));
        lstrcat(StringGuid, pTempStringGuid);
        lstrcat(StringGuid, TEXT("}"));
        CharUpper(StringGuid);

        RpcStringFree(&pTempStringGuid);
    }

    return Status;

} // GuidToString
开发者ID:shuowen,项目名称:OpenNT,代码行数:28,代码来源:pnpapi.c

示例8: PrintInterfaces

static int
PrintInterfaces(struct rx_connection *aconn)
{
    Capabilities caps;
    struct interfaceAddr addr;
#ifdef AFS_NT40_ENV
    char * p;
#else
    char uuidstr[128];
#endif
    int i, code;
    char hoststr[16];

    caps.Capabilities_val = NULL;
    caps.Capabilities_len = 0;

    code = RXAFSCB_TellMeAboutYourself(aconn, &addr, &caps);
    if (code == RXGEN_OPCODE)
        code = RXAFSCB_WhoAreYou(aconn, &addr);
    if (code) {
	printf("cmdebug: error checking interfaces: %s\n",
	       afs_error_message(code));
	return 0;
    }

#ifdef AFS_NT40_ENV
    UuidToString((UUID *)&addr.uuid, &p);
    printf("UUID: %s\n",p);
    RpcStringFree(&p);
#else
    afsUUID_to_string(&addr.uuid, uuidstr, sizeof(uuidstr));
    printf("UUID: %s\n",uuidstr);
#endif

    printf("Host interfaces:\n");
    for (i = 0; i < addr.numberOfInterfaces; i++) {
	printf("%s", afs_inet_ntoa_r(htonl(addr.addr_in[i]), hoststr));
	if (addr.subnetmask[i])
	    printf(", netmask %s", afs_inet_ntoa_r(htonl(addr.subnetmask[i]), hoststr));
	if (addr.mtu[i])
	    printf(", MTU %d", addr.mtu[i]);
	printf("\n");
    }

    if (caps.Capabilities_val) {
        printf("Capabilities:\n");
        if (caps.Capabilities_val[0] & CAPABILITY_ERRORTRANS) {
            printf("Error Translation\n");
        }
        printf("\n");
    }

    if (caps.Capabilities_val)
	free(caps.Capabilities_val);
    caps.Capabilities_val = NULL;
    caps.Capabilities_len = 0;

    return 0;
}
开发者ID:SimonWilkinson,项目名称:openafs,代码行数:59,代码来源:cmdebug.c

示例9: UnregisterBluetoothSignalHandler

void
UnregisterBluetoothSignalHandler(const BluetoothUuid& aUuid,
                                 BluetoothSignalObserver* aHandler)
{
  nsAutoString path;
  UuidToString(aUuid, path);

  UnregisterBluetoothSignalHandler(path, aHandler);
}
开发者ID:Nazi-Nigger,项目名称:gecko-dev,代码行数:9,代码来源:BluetoothUtils.cpp

示例10: UuidCreate

zmq::uuid_t::uuid_t ()
{
    RPC_STATUS ret = UuidCreate (&uuid);
    zmq_assert (ret == RPC_S_OK);
    ret = UuidToString (&uuid, &string_buf);
    zmq_assert (ret == RPC_S_OK);

    create_blob ();
}
开发者ID:888,项目名称:zeromq2-x,代码行数:9,代码来源:uuid.cpp

示例11: pn_i_genuuid

char* pn_i_genuuid(void) {
    unsigned char *generated;
    UUID uuid;
    UuidCreate(&uuid);
    UuidToString(&uuid, &generated);
    char* r = pn_strdup((const char*)generated);
    RpcStringFree(&generated);
    return r;
}
开发者ID:ModusCreateOrg,项目名称:deb-qpid-proton,代码行数:9,代码来源:platform.c

示例12: UuidCreateToString

BOOL UuidCreateToString(TCHAR ** StringUuid)
{
	UUID Uuid;
	RPC_STATUS Status = UuidCreate(&Uuid);
	if (Status == RPC_S_OK)
	{
		Status = UuidToString(&Uuid, StringUuid);
	}
	return Status == RPC_S_OK;
}
开发者ID:shebdim,项目名称:chpwd,代码行数:10,代码来源:chpwd.c

示例13: gen_uuid_inplace

void gen_uuid_inplace (char *buf)
{
    unsigned char *str = NULL;
    UUID uuid;

    UuidCreate(&uuid);
    UuidToString(&uuid, &str);
    memcpy(buf, str, 37);
    RpcStringFree(&str);
}
开发者ID:andrey-str,项目名称:ccnet,代码行数:10,代码来源:utils.c

示例14: uuid_to_string

static void uuid_to_string(uuid_t *uuid, char *uuid_str) {
#ifdef __MINGW32__
  RPC_CSTR tmp;
  UuidToString(uuid, &tmp);
  strcpy(uuid_str, tmp);
  RpcStringFree(&tmp);
#elif __linux__
  uuid_unparse_lower(*uuid, uuid_str);
#endif
}
开发者ID:wayfarer-rus,项目名称:engine,代码行数:10,代码来源:tree.c

示例15: ReversedUuidToString

void
ReversedUuidToString(const BluetoothUuid& aUuid, nsAString& aString)
{
  BluetoothUuid uuid;
  for (uint8_t i = 0; i < 16; i++) {
    uuid.mUuid[i] = aUuid.mUuid[15 - i];
  }

  UuidToString(uuid, aString);
}
开发者ID:Mardak,项目名称:tiles-dev,代码行数:10,代码来源:BluetoothUtils.cpp


注:本文中的UuidToString函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。