Click here to Skip to main content
15,928,109 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionC++ wrapper for .net assembly Pin
NikoTanghe20-Jun-06 22:41
NikoTanghe20-Jun-06 22:41 
AnswerRe: C++ wrapper for .net assembly Pin
Milton Karimbekallil21-Jun-06 7:55
Milton Karimbekallil21-Jun-06 7:55 
QuestionAs an experienced C user, from where can I start C++ programming? Pin
sergin8020-Jun-06 5:03
sergin8020-Jun-06 5:03 
AnswerRe: As an experienced C user, from where can I start C++ programming? Pin
Jun Du20-Jun-06 5:56
Jun Du20-Jun-06 5:56 
GeneralRe: As an experienced C user, from where can I start C++ programming? Pin
sergin8020-Jun-06 21:38
sergin8020-Jun-06 21:38 
GeneralRe: As an experienced C user, from where can I start C++ programming? Pin
Jun Du21-Jun-06 4:00
Jun Du21-Jun-06 4:00 
AnswerRe: As an experienced C user, from where can I start C++ programming? Pin
Nemanja Trifunovic21-Jun-06 4:15
Nemanja Trifunovic21-Jun-06 4:15 
QuestionXmlTextReader & XML navigation help required Pin
Slohnda20-Jun-06 5:00
Slohnda20-Jun-06 5:00 
I'm working with the XmlTextReader and I'm having some difficulty navigating through the xml document. The issue I'm running into is getting the attributes from the child nodes of a specific element. Here is a sample layout of the xml document.

<sample>
<hw id="HP-D500" name="Compaq Evo D500 Desktop" type="Desktop">
<software fn="SP26150.exe" title="HP Easy Access Keyboard Driver for Windows 2000/XP" type="DRIVER"
category="Input Devices" version="8.0.0.683" path="OS\ID\HP\KB" si="setup.exe -s"></software>
</hw>
<hw id="HP-D510" name="Compaq Evo D510 Small Form Factor" type="Desktop">
<software fn="SP26150.exe" title="HP Easy Access Keyboard Driver for Windows 2000/XP" type="DRIVER"
category="Input Devices" version="8.0.0.683" path="OS\ID\HP\KB" si="setup.exe -s"></software>
</hw>
<hw id="HP-N600c" name="Compaq Evo n600c Notebook PC" type="Laptop">
<software fn="SP22515.exe" title="Easy Access Buttons" type="Application"
category="Input Devices" version="3.00" path="OS\ID\SP22515" si="setup -s -SMS"></software>
<software fn="SP27852.exe" title="HP Notebook LidSwitch Policy" type="DRIVER"
category="OS and OS Enhancements" version="2.02" path="OS\Enh\SP27852" si="setup.exe -s"></software>
<software fn="SP21661.exe" title="Synaptics Touchpad Driver for Windows 2000 and XP" type="DRIVER"
category="Input Devices" version="6x" path="OS\ID\SP21661" si="setup.exe -s -SMS"></software>
<software fn="SP22442.exe" title="Compaq Hotkey Support Software" type="Application"
category="OS and OS Enhancements" version="1.1" path="OS\Enh\SP22442" si="\disk1\setup.exe -s -SMS"></software>
</hw>
</sample>



Here is the function implementation that is parsing the file.


StringCollection* ESBPARSER::getModelSoftware(XmlTextReader* Reader,String* modelName)
{ //modelName contains the attribute from a hw element name id.

StringCollection* SOFTWARE_LIST = new StringCollection();

try {
while (Reader->Read())
{
if (Reader->NodeType == XmlNodeType::Element)
{
if (Reader->HasAttributes)
{

Reader->MoveToAttribute("name");
int strVal = Reader->Value->ToString()->CompareTo(modelName);
if (strVal == 0)
{

// Logic to Get each Child element attribute name title

}


}
}
}

}
catch(...){
MessageBox::Show(S"An Error has occurred while trying updating hardware list box.");
}

return SOFTWARE_LIST;

}


Any help would be greatly appreciated.

TIA
QuestionHi Alls Pin
vassilux@19-Jun-06 10:05
vassilux@19-Jun-06 10:05 
AnswerRe: Hi Alls Pin
Milton Karimbekallil20-Jun-06 3:07
Milton Karimbekallil20-Jun-06 3:07 
GeneralRe: Hi Alls Pin
vassilux@20-Jun-06 3:31
vassilux@20-Jun-06 3:31 
GeneralRe: Hi Alls Pin
Milton Karimbekallil20-Jun-06 4:22
Milton Karimbekallil20-Jun-06 4:22 
GeneralRe: Hi Alls Pin
vassilux@20-Jun-06 5:33
vassilux@20-Jun-06 5:33 
GeneralRe: Hi Alls Pin
Milton Karimbekallil20-Jun-06 19:50
Milton Karimbekallil20-Jun-06 19:50 
GeneralRe: Hi Alls Pin
vassilux@20-Jun-06 20:47
vassilux@20-Jun-06 20:47 
GeneralRe: Hi Alls Pin
vassilux@20-Jun-06 20:53
vassilux@20-Jun-06 20:53 
GeneralRe: Hi Alls Pin
Jun Du26-Jun-06 16:51
Jun Du26-Jun-06 16:51 
GeneralRe: Hi Alls Pin
vassilux@27-Jun-06 2:12
vassilux@27-Jun-06 2:12 
GeneralRe: Hi Alls Pin
Jun Du27-Jun-06 3:40
Jun Du27-Jun-06 3:40 
QuestionNeed help to return string value from COM Pin
agarunk19-Jun-06 4:41
agarunk19-Jun-06 4:41 
AnswerRe: Need help to return string value from COM Pin
Milton Karimbekallil19-Jun-06 21:58
Milton Karimbekallil19-Jun-06 21:58 
QuestionStack problem with setting callback in native code. Pin
dbriggs19-Jun-06 4:15
dbriggs19-Jun-06 4:15 
AnswerRe: Stack problem with setting callback in native code. Pin
Jun Du27-Jun-06 7:27
Jun Du27-Jun-06 7:27 
QuestionMultidimension arrays Pin
Preminition18-Jun-06 11:57
Preminition18-Jun-06 11:57 
AnswerRe: Multidimension arrays Pin
Michael Dunn18-Jun-06 13:38
sitebuilderMichael Dunn18-Jun-06 13:38 

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.