Click here to Skip to main content
15,909,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Variant Comparison ignoring case Pin
abhi_code10-Aug-05 3:22
abhi_code10-Aug-05 3:22 
Hi Jose !
Firstly, Thanks For responding to my query.
Below is the code i am using for variant comparison


_variant_t serverVal, clientVal;

// nSize is computed earlier.
// obj1 and obj2 used below are user-defined objects in our application
// and getValue returns the value for given property as a variant type.

for (int nIndx = nSize-1; nIndx >= 0; nIndx--)
{
// other code

::VariantClear( &clientVal );
::VariantClear(&serverVal);

obj1->getValue(property, &clientVal); // getValue returns variant here
obj2->getValue(property, &serverVal);

if (clientVal.vt == VT_EMPTY && serverVal.vt == VT_EMPTY)
continue;

if(::VarCmp(&clientVal, &serverVal, 0, NORM_IGNORECASE )!= VARCMP_EQ )
{
// Not matched - Processing
}
else
{ // Matched - Processing
}

// other code
}


Please let me know in case there is something wrong.



Abhijeet Jadhav
GeneralRe: Variant Comparison ignoring case Pin
Jose Lamas Rios10-Aug-05 8:37
Jose Lamas Rios10-Aug-05 8:37 
GeneralRe: Variant Comparison ignoring case Pin
abhi_code13-Aug-05 8:58
abhi_code13-Aug-05 8:58 
QuestionHow to differentiate between a scanner and usbcam Pin
nripun9-Aug-05 21:10
nripun9-Aug-05 21:10 
Questioniconify application? Pin
ThinkingPrometheus9-Aug-05 21:03
ThinkingPrometheus9-Aug-05 21:03 
AnswerRe: iconify application? Pin
ddmcr9-Aug-05 21:19
ddmcr9-Aug-05 21:19 
GeneralRe: iconify application? Pin
ThinkingPrometheus10-Aug-05 1:28
ThinkingPrometheus10-Aug-05 1:28 
AnswerRe: iconify application? Pin
David Crow10-Aug-05 3:55
David Crow10-Aug-05 3:55 
Generallinking erros Pin
Member 20725789-Aug-05 20:29
Member 20725789-Aug-05 20:29 
GeneralRe: linking erros Pin
David Crow10-Aug-05 3:56
David Crow10-Aug-05 3:56 
GeneralRe: linking erros Pin
Chris Losinger10-Aug-05 5:16
professionalChris Losinger10-Aug-05 5:16 
GeneralRe: linking erros Pin
SunKnight010-Aug-05 6:35
SunKnight010-Aug-05 6:35 
GeneralRe: linking erros Pin
Member 207257810-Aug-05 19:23
Member 207257810-Aug-05 19:23 
GeneralRe: linking erros Pin
Steen Krogsgaard10-Aug-05 22:40
Steen Krogsgaard10-Aug-05 22:40 
GeneralRe: linking erros Pin
Anonymous11-Aug-05 6:25
Anonymous11-Aug-05 6:25 
GeneralRe: linking erros Pin
11-Aug-05 6:38
suss11-Aug-05 6:38 
GeneralRe: linking erros Pin
Steen Krogsgaard11-Aug-05 20:40
Steen Krogsgaard11-Aug-05 20:40 
GeneralRe: linking erros Pin
Anonymous11-Aug-05 2:55
Anonymous11-Aug-05 2:55 
QuestionHow to get the virtual-key code value of the character? Pin
gohappy_19999-Aug-05 20:17
gohappy_19999-Aug-05 20:17 
AnswerRe: How to get the virtual-key code value of the character? Pin
ThatsAlok9-Aug-05 22:49
ThatsAlok9-Aug-05 22:49 
AnswerRe: How to get the virtual-key code value of the character? Pin
Bob Stanneveld10-Aug-05 1:15
Bob Stanneveld10-Aug-05 1:15 
GeneralConverting String *s to int. Pin
Member 34198919-Aug-05 19:41
Member 34198919-Aug-05 19:41 
GeneralRe: Converting String *s to int. Pin
Kevin McFarlane9-Aug-05 23:08
Kevin McFarlane9-Aug-05 23:08 
GeneralRe: Converting String *s to int. Pin
Member 34198919-Aug-05 23:19
Member 34198919-Aug-05 23:19 
GeneralRe: Converting String *s to int. Pin
toxcct10-Aug-05 1:21
toxcct10-Aug-05 1:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.