|
If you have an XmlDocument, you can use SelectSingleNode with an XPath to get an XMLNode. This has an attributes collection, you can iterate through this and change the attribute you want.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks. I have serious slowdonw. About 2 Minutes. So i have chose to use Accsess Database through Jet. But i have decidet that i will use XML as Inport, Export and setting
|
|
|
|
|
Saksida Bojan wrote:
I have serious slowdonw. About 2 Minutes.
Where ?
Saksida Bojan wrote:
So i have chose to use Accsess Database through Jet.
What is slow that you think this will help ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
By using objects like critical sections and mutexes to syncronise access to common objects between threads.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks for your reply.
Hi, i am from china.
|
|
|
|
|
I have written __gc class. now i don't know how to make Event Hande, declare it and ovverride
Can you help me, please
|
|
|
|
|
Hi all,
What's the best way for me to switch from one panel to the last visible panel. i.e. I have three panels on a form, panel2 (after some use) switches back to either panel1 or panel3 depending on which one was last being viewed. Does .net provide ant functions for this or will I have to write my own. If so what steps do I need to take.
Thanks
Rich
|
|
|
|
|
|
Hi
I am working on a dialogbased application that contains a toolbar. I have been able to add more icons to toolbar but the problem is after clicking on new toolbar icons control does not reach their respective message handlers while the icons that were created initially are working fine.
Do anyone face any problem like this? Can anyone provide me a possible solution to this?
Regards,
Anant
|
|
|
|
|
Hello there,
I'm doing a class library in C++.NET, and I declared two classes, A and b,
as follows:
public __gc class B;
public __gc class A : public baseA
{
private:
B *entrada;
B *salida;
};
public __gc class B : public baseB
{
private:
A **entrantes;
A **salientes;
};
However, while compiling I get the following error:
error C3160: 'entrantes' : cannot declare interior __gc pointer or reference
as a member of 'espacio_nombres::B'
error C3160: 'salientes' : cannot declare interior __gc pointer or reference
as a member of 'espacio_nombres::B'
Why this error happens? What can I do about it?
I mean, I already read the MSDN documentation on such error, but as far as I
understood, it says that a __gc class cannot have as member a pointer to
another __gc class. This sounds rather absurd to me, that's why I'm posting
this message. Hope someone can either confirm that what I understood was
right (and then I'll throw C++NET to the trash), or explain me the reason of
such error.
Thanks for any thought,
KK.
One day you'll find
that I have gone,
for tomorrow may rain, so
I'll follow the sun...
|
|
|
|
|
|
Here is the outline of the problem.
I have some third party software which can only access unmanaged dlls and
I need to pull some data out of an Access database and pass it into this software.
I have written a .net dll to get the data (using OleDb etc) which works great.
I have written a win32 dll that the third party software can access.
How do I get the win32 dll to call the method in the managed dll and pass the data into the app?
Can any one help with this?
|
|
|
|
|
Wrap your managed functionality with a CCW
|
|
|
|
|
You've probably already solved the problem, but some excellent articles I would recommend on the subject are Michael Comb's article and this article by Harkos.
I'm doing a lot of work on this kind of stuff for fun. So long as you're programming in managed C++, you shouldn't need to create a second DLL, as Michael does in his article... (At least, I haven't found a way to directly export .NET functionality to an unmanaged app with C#, which is my favorite .NET language, but I do know how to get .NET C++ to speak almost directly to regular C++.)
Gustavo Keener
C++/C# Programmer
|
|
|
|
|
Hi all,
I've got 8 boolean vars that I have to store. It will obviously be alot more efficient to store these 8 bools as a single byte but I don't know how to go about this task. Does VC++ provide any built in functionality for this or could anyone please tell me how to acheive this task.
Thanks in advance
Richie
|
|
|
|
|
easy
bool b0, b1, b2, b3, b4, b5, b6, b7; <font color=green>
<font color=blue>char</font> c = b0 * 0x01 |
b1 * 0x02 |
b2 * 0x04 |
b3 * 0x08 |
b4 * 0x10 |
b5 * 0x20 |
b6 * 0x40 |
b7 * 0x80;
as you know that to obtain the value of a byte with once bit set to 1, the remaining unset (set to 0), the mask formula is : bn * 2^n
---------------------------------------------------------
| b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 |
---------------------------------------------------------
2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
0x80 0x40 0x20 0x10 0x08 0x04 0x02 0x01
(ps:this was not a managed C++ question to my sense because you can easily convert bool s to boolean s and char s to byte s)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Thanks,
I know it's not really a managed c++ question but I needed a quick answer and just posted. I promise I won't be so hasty in the future.
|
|
|
|
|
<?xml version="1.0" standalone="yes"?>
<CDList>
<CDList>
<cdid>11</cdid>
<Name>Halo - Combat Evolved</Name>
<Type>Igre</Type>
<Comment />
</CDList>
</CDList>
Code Snipset:
XmlDocument *xmlCDList = new XmlDocument;<br />
xmlCDList->Load(strCDListFileName);<br />
<br />
XmlElement *nodRoot = xmlCDList->DocumentElement;<br />
XmlNodeList *nodCDListCDID = nodRoot->GetElementsByTagName(S"CDID");
The problem is:
nodCDListCDID->Count is always 0 (zero)
Please help. Thanks in advance.
i think that i have crashed Will you forgave me, because i have crashed the forum
// I have already send email to webmasters
|
|
|
|
|
Saksida Bojan wrote:
because i have crashed the forum
Yes, it appears you have. And I was coming to follow up on another one of your questions, too....
Why use 'GetElementsByTagName' ? I think the 'tagname' is the ID element. Try nodRoot->SelectNodes, with this: "/CDList/CDList/cdid", or this: "//cdid". These are valid xpaths. Why does the CDList node nest a copy of itself ?
Also, XML is case sensitive, if the above code was to work, you'd nee to make "CDID" the same case as in the XML.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks. That helped. But i have still a question.
Why does this one worke. Oh yeah i Have change from cdid to CDID
XmlNodeList *nodCDListName = nodRoot->GetElementsByTagName(S"Name");
PS: First CDList is database, Second CDList is table.
|
|
|
|
|
Saksida Bojan wrote:
Why does this one
Why wouldn't it ? It's correct case.
Saksida Bojan wrote:
First CDList is database, Second CDList is table.
Well, isn't that a little silly ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Now i got werious problems. and i will backtrack. but can you tell me where can i find a good Xml Guide or tutorial.
|
|
|
|
|
I bought SAMS XML Unleashed, it was a good book. MSPress have a good XML book as well.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|