Bluetooth Special Interest Group Inc. BTSIG15A Manual De Usuario

Descargar
Página de 162
Extended Automating 
73 
Error Codes
  
This function returns the number of Projects that are available in the current Workspace. This count can be used as the 
upper boundary when using GetProjectName() in a loop to acquire the names of the available Projects. 
GetProjectName() 
Declaration 
HRESULT GetProjectName(UINT iProject, LPWSTR* ppszProjectName); 
  
  
Parameters  iProject: The zero based index to a Project in the currently open Workspace. 
  
  
  
ppszProjectName: A pointer to a Unicode string pointer that will receive the address of the name of the 
selected Project. 
  
  
  
The actual pointer should be initialized to NULL before making this call. 
  
  
Return 
Values 
A value greater than or equal to zero if successful. 
  
  
  
A value less than zero if not successful. For a list of error codes specific to the PTS Control API see 
API 
Error Codes
  
  
GetProjectName() returns a pointer to the name of a selected Project in the current Workspace. The Project is selected by 
the iProject value which must be less than the value returned by GetProjectCount(). 
ppszProjectName is a pointer to a Unicode character string and should be initialized to NULL before calling 
GetProjectName(). The pointer is filled in by GetProjectName() with the address of the string containing the Project name. 
The contents of the string pointed at by ppszProjectName should not be modified. 
Example: 
LPWSTR pszProjectName; 
pszProjectname = NULL; 
<interface pointer>->GetProjectName(0, &pszProjectName); 
Upon return from GetProjectName(), pszProjectName will point at the name of the selected Project and can be used as 
wprintf(L”The Project name is %s\n”, pszProjectName); 
GetProjectVersion() 
Declaration:  HRESULT GetProjectVersion(LPCWSTR pszProjectName, DWORD* pProjVersion);