这篇教程C++ GetDeviceName函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetDeviceName函数的典型用法代码示例。如果您正苦于以下问题:C++ GetDeviceName函数的具体用法?C++ GetDeviceName怎么用?C++ GetDeviceName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetDeviceName函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: R_ASSERTvoid ALDeviceList::SelectBestDevice(){ m_defaultDeviceIndex = -1; int best_majorVersion = -1; int best_minorVersion = -1; int majorVersion, minorVersion; for (int i = 0; i < GetNumDevices(); i++) { if( m_defaultDeviceName!=GetDeviceName(i) )continue; GetDeviceVersion (i, &majorVersion, &minorVersion); if( (majorVersion>best_majorVersion) || (majorVersion==best_majorVersion && minorVersion>best_minorVersion) ) { best_majorVersion = majorVersion; best_minorVersion = minorVersion; m_defaultDeviceIndex = i; } } if(m_defaultDeviceIndex==-1) { // not selected R_ASSERT(GetNumDevices()!=0); m_defaultDeviceIndex = 0; //first }; if(GetNumDevices()==0) Msg("SOUND: OpenAL: SelectBestDevice: list empty"); else Msg("SOUND: OpenAL: SelectBestDevice is %s %d.%d",GetDeviceName(m_defaultDeviceIndex).c_str(),best_majorVersion,best_minorVersion);}
开发者ID:Karlan88,项目名称:xray,代码行数:30,
示例2: DEBUG_LOGIPCCommandResult FileIO::IOCtl(const IOCtlRequest& request){ DEBUG_LOG(IOS_FILEIO, "FileIO: IOCtl (Device=%s)", m_name.c_str()); s32 return_value = IPC_SUCCESS; switch (request.request) { case ISFS_IOCTL_GETFILESTATS: { if (m_file->IsOpen()) { DEBUG_LOG(IOS_FILEIO, "File: %s, Length: %" PRIu64 ", Pos: %i", m_name.c_str(), m_file->GetSize(), m_SeekPos); Memory::Write_U32(static_cast<u32>(m_file->GetSize()), request.buffer_out); Memory::Write_U32(m_SeekPos, request.buffer_out + 4); } else { return_value = FS_ENOENT; } } break; default: request.Log(GetDeviceName(), LogTypes::IOS_FILEIO, LogTypes::LERROR); } return GetDefaultReply(return_value);}
开发者ID:spankminister,项目名称:dolphin,代码行数:29,
示例3: SetIconBOOL CBTTestDlg::OnInitDialog(){ CDialog::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon CFont *font=new CFont; font->CreateFont( 14, // nHeight 0, // nWidth 0, // nEscapement 0, // nOrientation 0, // nWeight FALSE, // bItalic FALSE, // bUnderline FALSE, // cStrikeOut DEFAULT_CHARSET, // nCharSet OUT_DEFAULT_PRECIS, // nOutPrecision CLIP_DEFAULT_PRECIS, // nClipPrecision DEFAULT_QUALITY, // nQuality FF_DONTCARE, // nPitchAndFamily "Courier New"); // lpszFacename m_lbHCI.SetFont(font); fbtLogSetFile("bttest.log"); fbtLogSetLevel(255); UINT i=0; CString szString; while (i<255 && !IsAttached()) { szString.Format("////.//FbtUsb%02d", i++); CHciRoundTrip::Attach(szString); } if (!IsAttached()) { MessageBox(_T("No Bluetooth hardware detected!")); exit(0); } // Retrieve the HW driver device name fbtLog(fbtLog_Notice, _T("CBTTestDlg::OnInitDialog: Connected to device %s"), szString); char szDeviceName[80]={0}; if (GetDeviceName(szDeviceName, 80)>0) m_stDevice.SetWindowText(szDeviceName); // Let the dialog finish creating itself and displaying the window // When its done, it will process its message queue on catch WM_USER+1 PostMessage(WM_USER+1, 0, 0); return TRUE; // return TRUE unless you set the focus to a control}
开发者ID:ErwanLegrand,项目名称:freebt,代码行数:60,
示例4: GetNoReplyIPCCommandResult CWII_IPC_HLE_Device_usb_oh0_46d_a03::IOCtl(u32 CommandAddress){ IPCCommandResult SendReply = GetNoReply(); SIOCtlVBuffer CommandBuffer(CommandAddress); switch (CommandBuffer.Parameter) { case USBV0_IOCTL_DEVREMOVALHOOK: // Reply is sent when device is removed //SendReply = true; break; default: WARN_LOG(OSHLE, "%s - IOCtl:", GetDeviceName().c_str()); WARN_LOG(OSHLE, " Parameter: 0x%x", CommandBuffer.Parameter); WARN_LOG(OSHLE, " NumberIn: 0x%08x", CommandBuffer.NumberInBuffer); WARN_LOG(OSHLE, " NumberOut: 0x%08x", CommandBuffer.NumberPayloadBuffer); WARN_LOG(OSHLE, " BufferVector: 0x%08x", CommandBuffer.BufferVector); DumpAsync(CommandBuffer.BufferVector, CommandBuffer.NumberInBuffer, CommandBuffer.NumberPayloadBuffer); break; } Memory::Write_U32(0, CommandAddress + 4); return SendReply;}
开发者ID:Asmodean-,项目名称:Ishiiruka,代码行数:26,
示例5: HandleGetSockNameRequestIPCCommandResult NetIPTop::HandleGetSockNameRequest(const IOCtlRequest& request){ u32 fd = Memory::Read_U32(request.buffer_in); request.Log(GetDeviceName(), LogTypes::IOS_WC24); sockaddr sa; socklen_t sa_len = sizeof(sa); int ret = getsockname(WiiSockMan::GetInstance().GetHostSocket(fd), &sa, &sa_len); if (request.buffer_out_size < 2 + sizeof(sa.sa_data)) WARN_LOG(IOS_NET, "IOCTL_SO_GETSOCKNAME output buffer is too small. Truncating"); if (request.buffer_out_size > 0) Memory::Write_U8(request.buffer_out_size, request.buffer_out); if (request.buffer_out_size > 1) Memory::Write_U8(sa.sa_family & 0xFF, request.buffer_out + 1); if (request.buffer_out_size > 2) { Memory::CopyToEmu(request.buffer_out + 2, &sa.sa_data, std::min<size_t>(sizeof(sa.sa_data), request.buffer_out_size - 2)); } return GetDefaultReply(ret);}
开发者ID:Tinob,项目名称:Ishiiruka,代码行数:25,
示例6: HandleGetSockOptRequestIPCCommandResult NetIPTop::HandleGetSockOptRequest(const IOCtlRequest& request){ u32 fd = Memory::Read_U32(request.buffer_out); u32 level = Memory::Read_U32(request.buffer_out + 4); u32 optname = Memory::Read_U32(request.buffer_out + 8); request.Log(GetDeviceName(), LogTypes::IOS_WC24); // Do the level/optname translation int nat_level = MapWiiSockOptLevelToNative(level); int nat_optname = MapWiiSockOptNameToNative(optname); u8 optval[20]; u32 optlen = 4; int ret = getsockopt(WiiSockMan::GetInstance().GetHostSocket(fd), nat_level, nat_optname, (char*)&optval, (socklen_t*)&optlen); const s32 return_value = WiiSockMan::GetNetErrorCode(ret, "SO_GETSOCKOPT", false); Memory::Write_U32(optlen, request.buffer_out + 0xC); Memory::CopyToEmu(request.buffer_out + 0x10, optval, optlen); if (optname == SO_ERROR) { s32 last_error = WiiSockMan::GetInstance().GetLastNetError(); Memory::Write_U32(sizeof(s32), request.buffer_out + 0xC); Memory::Write_U32(last_error, request.buffer_out + 0x10); } return GetDefaultReply(return_value);}
开发者ID:Tinob,项目名称:Ishiiruka,代码行数:32,
示例7: GetDeviceNamesPStringArray PVideoOutputDevice_EKIGA::GetDeviceNames() const{ PStringArray devlist; devlist.AppendString(GetDeviceName()); return devlist;}
开发者ID:GNOME,项目名称:ekiga,代码行数:7,
示例8: GetDisplayCoordinates/*========================GetDisplayCoordinates========================*/static bool GetDisplayCoordinates( const int deviceNum, int & x, int & y, int & width, int & height, int & displayHz ) { idStr deviceName = GetDeviceName( deviceNum ); if ( deviceName.Length() == 0 ) { return false; } DISPLAY_DEVICE device = {}; device.cb = sizeof( device ); if ( !EnumDisplayDevices( 0, // lpDevice deviceNum, &device, 0 /* dwFlags */ ) ) { return false; } DISPLAY_DEVICE monitor; monitor.cb = sizeof( monitor ); if ( !EnumDisplayDevices( deviceName.c_str(), 0, &monitor, 0 /* dwFlags */ ) ) { return false; } DEVMODE devmode; devmode.dmSize = sizeof( devmode ); if ( !EnumDisplaySettings( deviceName.c_str(),ENUM_CURRENT_SETTINGS, &devmode ) ) { return false; } common->Printf( "display device: %i/n", deviceNum ); common->Printf( " DeviceName : %s/n", device.DeviceName ); common->Printf( " DeviceString: %s/n", device.DeviceString ); common->Printf( " StateFlags : 0x%x/n", device.StateFlags ); common->Printf( " DeviceID : %s/n", device.DeviceID ); common->Printf( " DeviceKey : %s/n", device.DeviceKey ); common->Printf( " DeviceName : %s/n", monitor.DeviceName ); common->Printf( " DeviceString: %s/n", monitor.DeviceString ); common->Printf( " StateFlags : 0x%x/n", monitor.StateFlags ); common->Printf( " DeviceID : %s/n", monitor.DeviceID ); common->Printf( " DeviceKey : %s/n", monitor.DeviceKey ); common->Printf( " dmPosition.x : %i/n", devmode.dmPosition.x ); common->Printf( " dmPosition.y : %i/n", devmode.dmPosition.y ); common->Printf( " dmBitsPerPel : %i/n", devmode.dmBitsPerPel ); common->Printf( " dmPelsWidth : %i/n", devmode.dmPelsWidth ); common->Printf( " dmPelsHeight : %i/n", devmode.dmPelsHeight ); common->Printf( " dmDisplayFlags : 0x%x/n", devmode.dmDisplayFlags ); common->Printf( " dmDisplayFrequency: %i/n", devmode.dmDisplayFrequency ); x = devmode.dmPosition.x; y = devmode.dmPosition.y; width = devmode.dmPelsWidth; height = devmode.dmPelsHeight; displayHz = devmode.dmDisplayFrequency; return true;}
开发者ID:neilogd,项目名称:DOOM-3-BFG,代码行数:64,
示例9: switchIPCCommandResult STMImmediate::IOCtl(const IOCtlRequest& request){ s32 return_value = IPC_SUCCESS; switch (request.request) { case IOCTL_STM_IDLE: case IOCTL_STM_SHUTDOWN: NOTICE_LOG(IOS_STM, "IOCTL_STM_IDLE or IOCTL_STM_SHUTDOWN received, shutting down"); Core::QueueHostJob(&Core::Stop, false); break; case IOCTL_STM_RELEASE_EH: if (!s_event_hook_request) { return_value = IPC_ENOENT; break; } Memory::Write_U32(0, s_event_hook_request->buffer_out); EnqueueReply(*s_event_hook_request, IPC_SUCCESS); s_event_hook_request.reset(); break; case IOCTL_STM_HOTRESET: INFO_LOG(IOS_STM, "%s - IOCtl:", GetDeviceName().c_str()); INFO_LOG(IOS_STM, " IOCTL_STM_HOTRESET"); break; case IOCTL_STM_VIDIMMING: // (Input: 20 bytes, Output: 20 bytes) INFO_LOG(IOS_STM, "%s - IOCtl:", GetDeviceName().c_str()); INFO_LOG(IOS_STM, " IOCTL_STM_VIDIMMING"); // Memory::Write_U32(1, buffer_out); // return_value = 1; break; case IOCTL_STM_LEDMODE: // (Input: 20 bytes, Output: 20 bytes) INFO_LOG(IOS_STM, "%s - IOCtl:", GetDeviceName().c_str()); INFO_LOG(IOS_STM, " IOCTL_STM_LEDMODE"); break; default: request.DumpUnknown(GetDeviceName(), LogTypes::IOS_STM); } return GetDefaultReply(return_value);}
开发者ID:spankminister,项目名称:dolphin,代码行数:45,
示例10: GetDeviceNameBOOL CDevCProbe::SetDeviceName( PDeviceDescriptor_t d, const std::tstring& strName ){ if (d && d->Com && strName.size() <= 15) { d->Com->WriteString(TEXT("$PCPILOT,C,SET,")); d->Com->WriteString(strName.c_str()); d->Com->WriteString(TEXT("/r/n")); return GetDeviceName(d); } return FALSE;}
开发者ID:PhilColbert,项目名称:LK8000,代码行数:9,
示例11: GetDeviceNametbool CDeviceManagerWaveIO::GetDeviceName_OutputsOnly(tint iIndex, tchar* pszName){ if (!DeviceMayHaveOutput(iIndex)) { *pszName = '/0'; return false; } return GetDeviceName(iIndex, pszName);} // GetDeviceName_OutputsOnly
开发者ID:grimtraveller,项目名称:koblo_software,代码行数:9,
示例12: listenIPCCommandResult NetIPTop::HandleListenRequest(const IOCtlRequest& request){ u32 fd = Memory::Read_U32(request.buffer_in); u32 BACKLOG = Memory::Read_U32(request.buffer_in + 0x04); u32 ret = listen(WiiSockMan::GetInstance().GetHostSocket(fd), BACKLOG); request.Log(GetDeviceName(), LogTypes::IOS_WC24); return GetDefaultReply(WiiSockMan::GetNetErrorCode(ret, "SO_LISTEN", false));}
开发者ID:Tinob,项目名称:Ishiiruka,代码行数:9,
示例13: HandleShutdownRequestIPCCommandResult NetIPTop::HandleShutdownRequest(const IOCtlRequest& request){ request.Log(GetDeviceName(), LogTypes::IOS_WC24); u32 fd = Memory::Read_U32(request.buffer_in); u32 how = Memory::Read_U32(request.buffer_in + 4); int ret = shutdown(WiiSockMan::GetInstance().GetHostSocket(fd), how); return GetDefaultReply(WiiSockMan::GetNetErrorCode(ret, "SO_SHUTDOWN", false));}
开发者ID:Tinob,项目名称:Ishiiruka,代码行数:10,
示例14: ParODE_GetDeviceName// void GetDeviceName( int *DeviceId, char strDeviceName[], int nErr[]);static PyObject*ParODE_GetDeviceName(PyObject *self, PyObject *args){ int deviceID; if(!PyArg_ParseTuple(args, "i", &deviceID)) return NULL; char deviceName[128]; int nErr = 0; GetDeviceName(&deviceID, deviceName, &nErr); return Py_BuildValue("s i", deviceName, nErr);}
开发者ID:apatriciu,项目名称:ParODE,代码行数:11,
示例15: Logvoid MMDeviceAudioSource::StartCapture(){ if(mmClient) { mmClient->Start(); UINT64 freq; mmClock->GetFrequency(&freq); Log(TEXT("frequency for device '%s' is %llu, samples per sec is %u"), GetDeviceName(), freq, this->GetSamplesPerSec()); }}
开发者ID:ramabhadrarao,项目名称:OBS,代码行数:11,
示例16: INFO_LOGvoid USBHost::DispatchHooks(const DeviceChangeHooks& hooks){ for (const auto& hook : hooks) { INFO_LOG(IOS_USB, "%s - %s device: %04x:%04x", GetDeviceName().c_str(), hook.second == ChangeEvent::Inserted ? "New" : "Removed", hook.first->GetVid(), hook.first->GetPid()); OnDeviceChange(hook.second, hook.first); } if (!hooks.empty()) OnDeviceChangeEnd();}
开发者ID:Anti-Ultimate,项目名称:dolphin,代码行数:12,
示例17: WARN_LOGIPCCommandResult CWII_IPC_HLE_Device_usb_oh0::IOCtl(u32 CommandAddress){ u32 Command = Memory::Read_U32(CommandAddress + 0x0c); u32 BufferIn = Memory::Read_U32(CommandAddress + 0x10); u32 BufferInSize = Memory::Read_U32(CommandAddress + 0x14); u32 BufferOut = Memory::Read_U32(CommandAddress + 0x18); u32 BufferOutSize = Memory::Read_U32(CommandAddress + 0x1c); WARN_LOG(OSHLE, "%s - IOCtl:%x", GetDeviceName().c_str(), Command); WARN_LOG(OSHLE, "%x:%x %x:%x", BufferIn, BufferInSize, BufferOut, BufferOutSize); return IOCtlV(CommandAddress);}
开发者ID:Asmodean-,项目名称:Ishiiruka,代码行数:13,
示例18: INFO_LOGIPCCommandResult CWII_IPC_HLE_Device_net_ssl::IOCtl(u32 _CommandAddress){ u32 BufferIn = Memory::Read_U32(_CommandAddress + 0x10); u32 BufferInSize = Memory::Read_U32(_CommandAddress + 0x14); u32 BufferOut = Memory::Read_U32(_CommandAddress + 0x18); u32 BufferOutSize = Memory::Read_U32(_CommandAddress + 0x1C); u32 Command = Memory::Read_U32(_CommandAddress + 0x0C); INFO_LOG(WII_IPC_SSL, "%s unknown %i " "(BufferIn: (%08x, %i), BufferOut: (%08x, %i)", GetDeviceName().c_str(), Command, BufferIn, BufferInSize, BufferOut, BufferOutSize); Memory::Write_U32(0, _CommandAddress + 0x4); return IPC_DEFAULT_REPLY;}
开发者ID:Buddybenj,项目名称:dolphin,代码行数:15,
示例19: CloseDevicebool BL_CDEngine::OpenDevice(int8 aIndex){ // If a device is already opened, then close it first. CloseDevice(); // Open the device for reading. mCurrentDevice = open(GetDeviceName(aIndex), O_RDONLY); // Error? if(mCurrentDevice < 0) { return FALSE; } return TRUE;}
开发者ID:HaikuArchives,项目名称:BeFAR,代码行数:15,
示例20: AfxGetAppvoid CBCGPRibbonBackstagePagePrint::OnPrinterProperties() { CWaitCursor wait; CWinApp* pApp = AfxGetApp(); if (pApp == NULL) { ASSERT(FALSE); return; } int nSelection = GetPrinterSelection (); if (nSelection < 0) { ASSERT(FALSE); return; } PRINTDLG* dlgPrint = GetPrintDlg(); ASSERT(dlgPrint != NULL); if (dlgPrint->hDevMode == NULL) { ASSERT(FALSE); return; } CString strDeviceName (GetDeviceName ()); HANDLE hPrinter = OpenPrinterByName(strDeviceName); if (hPrinter == NULL) { ASSERT(FALSE); return; } UpdatePrinterProperties (TRUE); LPDEVMODE lpDevMode = (LPDEVMODE)::GlobalLock (dlgPrint->hDevMode); BOOL bRes = ::DocumentProperties(GetParent()->GetSafeHwnd (), hPrinter, (LPTSTR)(LPCTSTR)strDeviceName, lpDevMode, lpDevMode, DM_IN_PROMPT | DM_IN_BUFFER | DM_OUT_BUFFER) == IDOK; ::GlobalUnlock (dlgPrint->hDevMode); ::ClosePrinter (hPrinter); if (bRes) { UpdatePrinterProperties(FALSE, TRUE); }}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:48,
示例21: whilebool AudioSource::GetBuffer(float **buffer, UINT *numFrames, QWORD targetTimestamp){ bool bSuccess = false; outputBuffer.Clear(); while(audioSegments.Num()) { if(audioSegments[0]->timestamp < targetTimestamp) { Log(TEXT("Audio timestamp for device '%s' was behind target timestamp by %llu! Had to delete audio segment./r/n"), GetDeviceName(), targetTimestamp-audioSegments[0]->timestamp); delete audioSegments[0]; audioSegments.Remove(0); } else break; } if(audioSegments.Num()) { bool bUseSegment = false; AudioSegment *segment = audioSegments[0]; QWORD difference = (segment->timestamp-targetTimestamp); if(difference <= 20) { //Log(TEXT("segment.timestamp: %llu, targetTimestamp: %llu"), segment.timestamp, targetTimestamp); outputBuffer.TransferFrom(segment->audioData); delete segment; audioSegments.Remove(0); bSuccess = true; } } outputBuffer.SetSize(441*2); *buffer = outputBuffer.Array(); *numFrames = outputBuffer.Num()/2; return bSuccess;}
开发者ID:ascendedguard,项目名称:OBS,代码行数:44,
示例22: GetAllDeviceNamesstatic void GetAllDeviceNames( struct port_in * pin ){ struct connection_in * in = pin->first ; ASCII * remaining_device_list = owstrdup( pin->init_data ) ; ASCII * remember_location = remaining_device_list ; while (remaining_device_list != NULL) { const ASCII *current_device_start; for (current_device_start = strsep(&remaining_device_list, " ,"); current_device_start[0] != '/0'; ++current_device_start) { // note that strsep updates "remaining_device_list" pointer if (current_device_start[0] != ' ' && current_device_start[0] != ',') { break; } } GetDeviceName( ¤t_device_start, in ) ; } SAFEFREE( remember_location ) ; in->AnyDevices = (DirblobElements(&(in->master.fake.main)) > 0) ? anydevices_yes : anydevices_no ;}
开发者ID:M-o-a-T,项目名称:owfs,代码行数:19,
示例23: NetworkHandler::NetworkHandler(std::string deviceName) { deviceName_ = deviceName; myMac_ = EthernetUtils::GetMacOfInterface(deviceName); myIP_ = EthernetUtils::GetIPOfInterface(GetDeviceName()); u_int32_t flags = 0; flags |= PF_RING_LONG_HEADER; flags |= PF_RING_PROMISC; flags |= PF_RING_DNA_SYMMETRIC_RSS; /* Note that symmetric RSS is ignored by non-DNA drivers */ const int snaplen = 128; pfring** rings = new pfring*[MAX_NUM_RX_CHANNELS]; numberOfQueues_ = pfring_open_multichannel((char*) deviceName.data(), snaplen, flags, rings); queueRings_ = new ntop::PFring *[numberOfQueues_]; for (uint_fast8_t i = 0; i < numberOfQueues_; i++) { std::string queDeviceName = deviceName; queDeviceName = deviceName + "@" + std::to_string((int) i); /* * http://www.ntop.org/pfring_api/pfring_8h.html#a397061c37a91876b6b68584e2cb99da5 */ pfring_set_poll_watermark(rings[i], 128); queueRings_[i] = new ntop::PFring(rings[i], (char*) queDeviceName.data(), snaplen, flags); if (queueRings_[i]->enable_ring() >= 0) { LOG_INFO<< "Successfully opened device " << queueRings_[i]->get_device_name(); } else { LOG_ERROR << "Unable to open device " << queDeviceName << "! Is pf_ring not loaded or do you use quick mode and have already a socket bound to this device?!"; exit(1); } } asyncSendData_.set_capacity(1000);}
开发者ID:glehmannmiotto,项目名称:na62-farm-lib-networking,代码行数:43,
示例24: strDeviceNameHANDLE CBCGPRibbonBackstagePagePrint::OpenPrinterByName (LPCTSTR lpDeviceName){ CString strDeviceName (lpDeviceName); if (strDeviceName.IsEmpty ()) { strDeviceName = GetDeviceName (); } HANDLE hPrinter = NULL; if (!strDeviceName.IsEmpty ()) { if (!::OpenPrinter ((LPTSTR)(LPCTSTR)strDeviceName, &hPrinter, NULL)) { hPrinter = NULL; } } return hPrinter;}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:19,
示例25: GetNumberOfDevicesstd::vector<std::string>LoadedDeviceAdapter::GetAvailableDeviceNames() const{ unsigned deviceCount = GetNumberOfDevices(); std::vector<std::string> deviceNames; deviceNames.reserve(deviceCount); for (unsigned i = 0; i < deviceCount; ++i) { ModuleStringBuffer nameBuf(this, "GetDeviceName"); bool ok = GetDeviceName(i, nameBuf.GetBuffer(), nameBuf.GetMaxStrLen()); if (!ok) { throw CMMError("Cannot get device name at index " + ToString(i) + " from device adapter module " + ToQuotedString(name_)); } deviceNames.push_back(nameBuf.Get()); } return deviceNames;}
开发者ID:bwagjor,项目名称:Thesis,代码行数:19,
示例26: ClearInstalledDevicesint Hub::DetectInstalledDevices(){ ClearInstalledDevices(); InitializeModuleData(); char hubname[MM::MaxStrLength]; GetName(hubname); for(unsigned i = 0; i < GetNumberOfDevices(); i++) { char devname[MM::MaxStrLength]; if(GetDeviceName(i, devname, MM::MaxStrLength) && strcmp(hubname, devname) != 0) { MM::Device* dev = CreateDevice(devname); AddInstalledDevice(dev); } } return DEVICE_OK;}
开发者ID:kwitekrac,项目名称:micromanager2,代码行数:21,
注:本文中的GetDeviceName函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetDevicePathSize函数代码示例 C++ GetDeviceGammaRamp函数代码示例 |