Embed
Email

Help

Document Sample

Shared by: ajizai
Categories
Tags
Stats
views:
0
posted:
12/19/2011
language:
pages:
1
How to work with OLE data types i.e Variants



Initially retrieve the info in variant. For example,



hr = pclsObj->Get(L"IPEnabled", 0, &vtProp, 0, 0);



Then check what type of data Variant contains. For example, I’m performing some actins when the

variant contains a string array:



if (vtProp.vt == (VT_ARRAY|VT_BSTR)) {

// do something

}



Without this check many types of error would occur!



Get upper and lower bound. Then calculate the difference. We may call it cElements

which we will use before accessing the array. For example,



cElements = lUBound-lLBound+1;

if (cElements > 0)

m_GWIP = pbstr[0];









Spec:

Two cases that the thread performs actions



1. When internet is available

a. Enable ping single host

b. Give the message on noticebox



2. When not available

a. Enable ping SIP

b. Give the message on noticebox



And toggle cases



Enables/disables single host. But doesn’t touch notice box 



Related docs
Other docs by ajizai
Resume 1.docx _20K_ - Student of Fortune
Views: 0  |  Downloads: 0
msg00000
Views: 0  |  Downloads: 0
Pre-Tax Return Calculator 2010-2011
Views: 0  |  Downloads: 0
Excel file - The GEO-3 Data Compendium
Views: 0  |  Downloads: 0
Cooperators Tests - ARS
Views: 0  |  Downloads: 0
2010101473142104
Views: 0  |  Downloads: 0
AJHL - Shawn Stewart Sales
Views: 0  |  Downloads: 0
OBLATES_ BROTHER CADFAEL AND ROME
Views: 1  |  Downloads: 0
DuaneChipKeeler_CV-Resume
Views: 0  |  Downloads: 0
AIT-2009-291-SC
Views: 0  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!