summaryrefslogtreecommitdiff
path: root/setup/devcon
diff options
context:
space:
mode:
Diffstat (limited to 'setup/devcon')
-rw-r--r--setup/devcon/cmds.cpp6
-rw-r--r--setup/devcon/devcon.cpp31
-rw-r--r--setup/devcon/devcon.sln18
-rw-r--r--setup/devcon/devcon.vcxproj4
-rw-r--r--setup/devcon/devcon.vcxproj.Filters6
-rw-r--r--setup/devcon/msg.mc2
6 files changed, 34 insertions, 33 deletions
diff --git a/setup/devcon/cmds.cpp b/setup/devcon/cmds.cpp
index 590decdd..3d845589 100644
--- a/setup/devcon/cmds.cpp
+++ b/setup/devcon/cmds.cpp
@@ -1327,7 +1327,7 @@ Return Value:
&DeviceInfoData,
SPDRP_HARDWAREID,
(LPBYTE)hwIdList,
- (lstrlen(hwIdList)+1+1)*sizeof(TCHAR)))
+ ((DWORD)_tcslen(hwIdList)+1+1)*sizeof(TCHAR)))
{
goto final;
}
@@ -1863,7 +1863,7 @@ Return Value:
LPTSTR multiSz = multiVal[-1];
LPTSTR p = multiSz;
while(*p) {
- p+=lstrlen(p)+1;
+ p+=_tcslen(p)+1;
}
p++; // skip past null
len = (p-multiSz)*sizeof(TCHAR);
@@ -2054,7 +2054,7 @@ Return Value:
LPTSTR multiSz = hwlist[-1];
LPTSTR p = multiSz;
while(*p) {
- p+=lstrlen(p)+1;
+ p+=_tcslen(p)+1;
}
p++; // skip past final null
len = (p-multiSz)*sizeof(TCHAR);
diff --git a/setup/devcon/devcon.cpp b/setup/devcon/devcon.cpp
index d501dc1e..24ec7b31 100644
--- a/setup/devcon/devcon.cpp
+++ b/setup/devcon/devcon.cpp
@@ -383,7 +383,7 @@ Return Value:
int elements;
for(scan = MultiSz, elements = 0; scan[0] ;elements++) {
- scan += lstrlen(scan)+1;
+ scan += _tcslen(scan)+1;
}
array = new LPTSTR[elements+2];
if(!array) {
@@ -394,7 +394,7 @@ Return Value:
if(elements) {
for(scan = MultiSz, elements = 0; scan[0]; elements++) {
array[elements] = scan;
- scan += lstrlen(scan)+1;
+ scan += _tcslen(scan)+1;
}
}
array[elements] = NULL;
@@ -426,7 +426,7 @@ Return Value:
int c;
if(Array) {
for(c=0;Array[c];c++) {
- cchMultiSz+=lstrlen(Array[c])+1;
+ cchMultiSz+=(int)_tcslen(Array[c])+1;
}
}
cchMultiSz+=1; // final Null
@@ -445,17 +445,17 @@ Return Value:
}
#pragma prefast(suppress:__WARNING_BUFFER_OVERFLOW, "ESP:732")
- len+=lstrlen(multiSz+len)+1;
+ len+=(int)_tcslen(multiSz+len)+1;
}
}
-
+
if( len < cchMultiSz ){
multiSz[len] = TEXT('\0');
} else {
// This should never happen!
multiSz[cchMultiSz-1] = TEXT('\0');
}
-
+
LPTSTR * pRes = GetMultiSzIndexArray(multiSz);
if(pRes) {
return pRes;
@@ -690,8 +690,8 @@ Return Value:
//
// last portion of match
//
- size_t scanlen = lstrlen(scanItem);
- matchlen = lstrlen(wildMark);
+ size_t scanlen = _tcslen(scanItem);
+ matchlen = _tcslen(wildMark);
if(scanlen < matchlen) {
return FALSE;
}
@@ -710,9 +710,9 @@ Return Value:
// to indicate that the return value of the function should be looked
// at and/or assigned to a variable. The check return annotation means
// the return value should always be checked in all code paths.
- // We assign the return values to variables but the while loop does not
- // examine both values in all code paths (e.g. when scanItem[0] == 0,
- // neither u nor l will be examined) and it doesn't need to examine
+ // We assign the return values to variables but the while loop does not
+ // examine both values in all code paths (e.g. when scanItem[0] == 0,
+ // neither u nor l will be examined) and it doesn't need to examine
// the values in all code paths.
//
#pragma warning( suppress: 28193)
@@ -790,9 +790,9 @@ Return Value:
}
bool SplitCommandLine(
- _In_ int & argc,
- _In_reads_(argc) LPTSTR * & argv,
- _Out_ int & argc_right,
+ _In_ int & argc,
+ _In_reads_(argc) LPTSTR * & argv,
+ _Out_ int & argc_right,
_Outref_result_buffer_(argc_right) LPTSTR * & argv_right)
/*++
@@ -1135,7 +1135,8 @@ Return Value:
}
firstArg++;
for(dispIndex = 0;DispatchTable[dispIndex].cmd;dispIndex++) {
- if(_tcsicmp(cmd,DispatchTable[dispIndex].cmd)==0) {
+ if ((_tcsicmp(cmd,DispatchTable[dispIndex].cmd) == 0) &&
+ (argc >= firstArg)) {
retval = DispatchTable[dispIndex].func(baseName,machine,flags,argc-firstArg,argv+firstArg);
switch(retval) {
case EXIT_USAGE:
diff --git a/setup/devcon/devcon.sln b/setup/devcon/devcon.sln
index d6151eac..584555f8 100644
--- a/setup/devcon/devcon.sln
+++ b/setup/devcon/devcon.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "devcon", "devcon.vcxproj", "{86BCB988-7719-4050-B570-6863C4169137}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "devcon", "devcon.vcxproj", "{14EDBD07-E4CD-4BD8-82CC-F2840C160570}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {86BCB988-7719-4050-B570-6863C4169137}.Debug|Win32.ActiveCfg = Debug|Win32
- {86BCB988-7719-4050-B570-6863C4169137}.Debug|Win32.Build.0 = Debug|Win32
- {86BCB988-7719-4050-B570-6863C4169137}.Release|Win32.ActiveCfg = Release|Win32
- {86BCB988-7719-4050-B570-6863C4169137}.Release|Win32.Build.0 = Release|Win32
- {86BCB988-7719-4050-B570-6863C4169137}.Debug|x64.ActiveCfg = Debug|x64
- {86BCB988-7719-4050-B570-6863C4169137}.Debug|x64.Build.0 = Debug|x64
- {86BCB988-7719-4050-B570-6863C4169137}.Release|x64.ActiveCfg = Release|x64
- {86BCB988-7719-4050-B570-6863C4169137}.Release|x64.Build.0 = Release|x64
+ {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Debug|Win32.ActiveCfg = Debug|Win32
+ {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Debug|Win32.Build.0 = Debug|Win32
+ {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Release|Win32.ActiveCfg = Release|Win32
+ {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Release|Win32.Build.0 = Release|Win32
+ {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Debug|x64.ActiveCfg = Debug|x64
+ {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Debug|x64.Build.0 = Debug|x64
+ {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Release|x64.ActiveCfg = Release|x64
+ {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/setup/devcon/devcon.vcxproj b/setup/devcon/devcon.vcxproj
index f8170400..a5728918 100644
--- a/setup/devcon/devcon.vcxproj
+++ b/setup/devcon/devcon.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{86BCB988-7719-4050-B570-6863C4169137}</ProjectGuid>
+ <ProjectGuid>{14EDBD07-E4CD-4BD8-82CC-F2840C160570}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{23BBD173-5CB7-48C8-8F01-AC3B501E40AB}</SampleGuid>
+ <SampleGuid>{FDCF5960-709F-48C2-A9D0-9F3F6BE0CAC9}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/setup/devcon/devcon.vcxproj.Filters b/setup/devcon/devcon.vcxproj.Filters
index 58210edf..05701d08 100644
--- a/setup/devcon/devcon.vcxproj.Filters
+++ b/setup/devcon/devcon.vcxproj.Filters
@@ -3,15 +3,15 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{5160D4D4-1A78-4E9D-BF18-F5E7B9C9E472}</UniqueIdentifier>
+ <UniqueIdentifier>{FDCB0202-4D4E-4FB6-BDEC-331565697E42}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{DB4773A9-01E9-4B56-BA48-0B6BE056675F}</UniqueIdentifier>
+ <UniqueIdentifier>{E7212D5A-ECFD-4775-841D-7F30A7B02793}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{F55A1D3D-0157-4FC5-A912-775FE35A697D}</UniqueIdentifier>
+ <UniqueIdentifier>{AD545432-CD18-4921-BE33-91FC936D062B}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/setup/devcon/msg.mc b/setup/devcon/msg.mc
index 6e6ec557..bc506d6d 100644
--- a/setup/devcon/msg.mc
+++ b/setup/devcon/msg.mc
@@ -818,7 +818,7 @@ MessageId=61300 SymbolicName=MSG_RESCAN_LONG
Language=English
Devcon Rescan Command
Directs Plug and Play to scan for new hardware. Valid on a local or remote computer.
-%1 [-m:\\<machine>]
+%1 [-m:\\<machine>] %2
<machine> Specifies a remote computer.
.
MessageId=61301 SymbolicName=MSG_RESCAN_SHORT