这篇教程C++ strncpyz函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中strncpyz函数的典型用法代码示例。如果您正苦于以下问题:C++ strncpyz函数的具体用法?C++ strncpyz怎么用?C++ strncpyz使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了strncpyz函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetPasswordTextstatic void GetPasswordText(wchar *Str,uint MaxLength){ if (MaxLength==0) return;#ifdef _WIN_ALL HANDLE hConIn=GetStdHandle(STD_INPUT_HANDLE); HANDLE hConOut=GetStdHandle(STD_OUTPUT_HANDLE); DWORD ConInMode,ConOutMode; DWORD Read=0; GetConsoleMode(hConIn,&ConInMode); GetConsoleMode(hConOut,&ConOutMode); SetConsoleMode(hConIn,ENABLE_LINE_INPUT); SetConsoleMode(hConOut,ENABLE_PROCESSED_OUTPUT|ENABLE_WRAP_AT_EOL_OUTPUT); ReadConsole(hConIn,Str,MaxLength-1,&Read,NULL); Str[Read]=0; SetConsoleMode(hConIn,ConInMode); SetConsoleMode(hConOut,ConOutMode);#else char StrA[MAXPASSWORD];#if defined(_EMX) || defined (__VMS) || defined(__AROS__) fgets(StrA,ASIZE(StrA)-1,stdin);#elif defined(__sun) strncpyz(StrA,getpassphrase(""),ASIZE(StrA));#else strncpyz(StrA,getpass(""),ASIZE(StrA));#endif CharToWide(StrA,Str,MaxLength); cleandata(StrA,sizeof(StrA));#endif Str[MaxLength-1]=0; RemoveLF(Str);}
开发者ID:BSzili,项目名称:aros-stuff,代码行数:33,
示例2: strnicompint strnicomp(const char *Str1,const char *Str2,size_t N){ char S1[NM*2],S2[NM*2]; strncpyz(S1,Str1,ASIZE(S1)); strncpyz(S2,Str2,ASIZE(S2)); return(strncmp(strupper(S1),strupper(S2),N));}
开发者ID:ajnelson,项目名称:bulk_extractor,代码行数:7,
示例3: SoftwareList_EnteringItemstatic void SoftwareList_EnteringItem(HWND hwndSoftwareList, int nItem){ LPCSTR pszFullName; LPCSTR pszFileName; int drvindex = 0; HWND hwndList; hwndList = GetDlgItem(GetMainWindow(), IDC_LIST); if (!s_bIgnoreSoftwarePickerNotifies) { drvindex = Picker_GetSelectedItem(hwndList); // Get the fullname and partialname for this file pszFileName = SoftwareList_LookupFilename(hwndSoftwareList, nItem); // to run the software pszFullName = SoftwareList_LookupFullname(hwndSoftwareList, nItem); // for the screenshot strncpyz(g_szSelectedSoftware, pszFileName, ARRAY_LENGTH(g_szSelectedSoftware)); strncpyz(g_szSelectedDevice, SoftwareList_LookupDevice(hwndSoftwareList, nItem), ARRAY_LENGTH(g_szSelectedDevice)); // Set up s_szSelecteItem, for the benefit of UpdateScreenShot() strncpyz(g_szSelectedItem, pszFullName, ARRAY_LENGTH(g_szSelectedItem)); UpdateScreenShot(); } drvindex++;}
开发者ID:crazii,项目名称:mameui,代码行数:28,
|