|
How to created a well-formatted xml document like this using MSXML(I'm using MSXML6)?
<?xml version="1.0" encoding="utf-8"?>
<!--there are some comments-->
<root>
<node1>...</node1>
</root>
I found no way to add a CRLF after the ProcessInstruction and the first comment, but I do know how to add a CRLF in root node——Just createTextNode and add to the root element.
So my program will always create a xml document like this
<?xml version="1.0" encoding="utf-8"?><!--there are some comments--><root>
<node1>...</node1>
</root>
Please help. Thanks
A Chinese VC++ programmer
|
|
|
|
|
|
Hi all
I have a MDI Application and i am Adding a resource type new Dailog. And in this dailog i have taken a List Box.In this dailog i am calling in .cpp file of MDI.It is working in proper way.
Currently out is showing on MDI Application.But I want to show Out put on listbox. Plz help me
|
|
|
|
|
Hello !
I have declared an byte array say,
BYTE abyData [256];
since i donot know how much memory is exactly necessary.
now in a function i used only 20 bytes of memory i.e
abyData [0] = 23
abyData [1] = 21
.
.
abyData [19] = 45
Now I want to free/release rest of the memory from 20 - 255 ?
|
|
|
|
|
kapardhi wrote: BYTE abyData [256];
You cant do that..
You can use new/delete Or malloc/free for allocating the memory you need.
Regards,
Sandip.
|
|
|
|
|
Allocate 20 bytes of memory then copy the data you need to this new BYTE array then free delete the old one.
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
I think he is using Static array..
|
|
|
|
|
Oh right - the delete keyword will do nicely in that case
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
Delete an array in the stack ?
Your program will certainly crash if you try to do so.
|
|
|
|
|
Don't do it. If you know at design time that you will only have 20 bytes, then use an array of 20 bytes. If you don't know the size upfront (but if it is below 255), then keep your current solution. It's not a big deal that you allocated a bit too much memory. This memory will anyway be deleted when you exit the function.
You will probably end-up with a worse solution trying to optimize that than what you have now.
|
|
|
|
|
Hi there,
Anyone out there who could help me in this. So far, I can't get clearer info/docs regarding this one; I would be more than grateful...
I have an app (impersonated from a service - SYSTEM account) that uses .chm for help topics. Launching the chm file using HtmlHelp API somehow fails when you're SYSTEM account so I changed it using hh.exe, CreateProcessAsUser and WTSQueryUserToken. This works fine in both admin and limited user account during normal logon. However, during user switching, limited user can't somehow launch the chm file.
(SYSTEM account)
logon admin (from startup) -> launch chm file : ok
logon limited (from startup) -> launch chm file : ok
logon admin (from startup) -> switch user (limited) -> launch chm : nothing happens
logon limited (from startup) - switch user (admin) -> launch chm : ok
No messages/warnings from windows event logs. Also, the API's are returning nonzero (success), both WTSQueryUserToken and CreateProcessAsUser.
Though, this is not really a big issue but client is asking for explanations and I can't get straightforward docs online.
Working with XP Prof SP3 and VC++ 6.0. Only happening in XP and Server 2003. Everything works fine with Vista and Server 2008.
|
|
|
|
|
Hi, can somebody plse tell me how do i create a spline thru n points.In my problem, i had 3d points scattered all over the space, i projected them on a plane.I am supposed to join these points with a curve and for that i have to create a spline using c/c++ program.Can anyone help me out in this.Plse do let me know.Thnx in advance.
|
|
|
|
|
|
Thnx for the help.
|
|
|
|
|
Hi,
My code is giving debiug assertion failure when I call from OnInitDialog Function of CMainDlg the function
Cdialog::OnInitDialog();
the code is like the folowing:
BOOL CMainDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE);
}
Please help me
Dhiraj Kumar Saini
|
|
|
|
|
Dhiraj kumar Saini wrote: My code is giving debiug assertion failure when I call from OnInitDialog Function of CMainDlg the function
Why do you call OnInitDialog yourself ? You should never call this function, it is called by the framework before the window is shown.
|
|
|
|
|
I am not calling it is being called from CmainDlg like this
BOOL CMainDlg::OnInitDialog()
{
CDialog::OnInitDialog();
|
|
|
|
|
Ok, I misunderstood your post. Did you use your debugger to see where exactly it crashes and check the call stack ? What is the exact error message ?
Without any further information, we won't be able to help you.
|
|
|
|
|
It gives a message An unsupported operation was performed.
|
|
|
|
|
I am getting this type of error:
validation failed due to OOM or other resource failure
|
|
|
|
|
When an Assertion failed error occurs, try to debug and see exactly the problem happens using the "call stack". This will give you the line that caused the error.
Regards,
Rane
|
|
|
|
|
Can you just tell me where is the call stack. I am new
|
|
|
|
|
When an Assertion failed error occurs,click on the button "Retry" to debug. You will be able to see the "Call Stack" window aside of the output window.If not,Go to Debug ->Windows ->Call Stack to view the call stack.
Regards,
Rane
|
|
|
|
|
I am gettinh this assertion
validation failed due to OOM or other resource failure
|
|
|
|
|
Actually earlier it was not giving any errors. But as soon as i had added few control on class CMainDlg it is giving the errorrs
"Warning: UpdateData failed during dialog init.\n"
|
|
|
|