|
I am using SelectSinglenode in the following way and the code is always aborting:
IXMLDOMNodePtr pChild;
IXMLDOMElementPtr pParent=NULL;
IXMLDOMNode **resultnode=NULL;
HRESULT pChild = pParent->selectSingleNode(_T("rtcs//Connection::connect"),resultnode);
i think i am not able to give the right first parameter of selectsinglenode function.
Please point out where i am wrong
Regards
|
|
|
|
|
hmm im not sure but you could try
IXMLDOMNodePtr pChild;
IXMLDOMElementPtr pParent=NULL;
IXMLDOMNodePtr resultnode=NULL;
HRESULT pChild = pParent->selectSingleNode(L"//rtcs//Connection::connect"), &resultnode);
hope that helps
|
|
|
|
|
if pParent is NULL, how can you call pParent->selectSingleNode() ?!
this will end in tears !
|
|
|
|
|
actually it takes two parameters whenever i am giving one parameter it is giving error.
Regards
|
|
|
|
|
i was talking about the NULL pointer dereferencing matter...
|
|
|
|
|
The query should be /rt/Connection/@connect
And you need to initialize pParent before using -> on it
|
|
|
|
|
hi
any body aware how can i find whether my application is running on laptop ro desktop machine.
Please let me if any win api is available or any specific thing i can look up.
sonani prakash
|
|
|
|
|
Using WMI Article on CP there are a few others
the WMI class that might contain the data your after is
Win32_ComputerSystem
there might be another.
worth a look
|
|
|
|
|
Hi all,
i have the following xml file:
<?xml version="1.0"?>
<rt name="Remote ">
<Connection connect= "connectval" ipaddress = "ip_addresss" Port = "port_number"/>
</rt>
I want to get the value of variable connect and store it using selectsinglenode function.
how can i accomplish the above.
Regards
|
|
|
|
|
Maynka wrote: how can i accomplish the above
you already answered the question
Maynka wrote: using selectsinglenode
What exactly is the problem?
|
|
|
|
|
I am using SelectSinglenode in the following way and the code is always aborting:
IXMLDOMNodePtr pChild;
IXMLDOMNode **resultnode=NULL;
HRESULT pChild = pParent->selectSingleNode(_T("rtcs//Connection::connect"),resultnode);
i think i am not able to give the right first parameter of selectsinglenode function.
Regards
|
|
|
|
|
if pParent is a IXMLDOMNodePtr , then you have to do:
pChild = pParent->selectSingleNode(_T("rtcs//Connection::connect"));
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Could that be:
"//Connection/@connect"
describing any <connection> tags having a "connect" attribute?
I am not an XPATH-Guru, though.
Failure is not an option - it's built right in.
|
|
|
|
|
In MFC SDI,How to write D3D code?
I had wroteen some code about D3D in MFC SDI project.
But I have a problem that when I resisze the view, the model will resize.
I had reccomputed the projective matrix by the view size (when I resize the View).
I had tried to modify the projective matrix and viewport.
But it seems to be error.
HRESULT hr;
hr=m_pD3DDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255,0,0,0), 1.0f, 0);
m_ViewClientSize.cx=cx;
m_ViewClientSize.cy=cy;
D3DXMATRIX proj;
D3DXMatrixPerspectiveFovLH(
&proj,
D3DX_PI * 0.5f, // 90 - degree
(float)m_ViewClientSize.cx / (float)m_ViewClientSize.cy,
1.0f,
1000.0f);
if (m_pD3DDevice)
m_pD3DDevice->SetTransform(D3DTS_PROJECTION, &proj);
D3DVIEWPORT9 ViewPort;
m_pD3DDevice->GetViewport(&ViewPort);
ViewPort.Width=m_ViewClientSize.cx;
ViewPort.Height=m_ViewClientSize.cy;
if (m_pD3DDevice)
m_pD3DDevice->SetViewport(&ViewPort);
|
|
|
|
|
Hi,
how can i check, given a file name, if the file has been 'locked' by any process... either for reading, writing or both?
Thanks...
------------------------------------------------------------
Never wear anything that panics the cat.
|
|
|
|
|
Can you open the file exclusively?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Actually, I want to check whether a file is locked by *any process*, be it my own app or any other process...
I'm aware of file locking functions when we open a file ourselves... but what about the files that are locked by some other app..?
|
|
|
|
|
Abhijeet Pathak wrote: ...but what about the files that are locked by some other app..?
If a file is open by another process, and your process tried to open the file exclusively, it would fail.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
do you know how to open a file and lock it yourself that might give you an idea!!!
Yours Truly, The One and Only!
|
|
|
|
|
_NightOwl_ wrote: do you know how to open a file and lock it yourself that might give you an idea!!!
Yours Truly, The One and Only!
Actually, I want to check whether a file is locked by *any process*, be it my own app or any other process...
I'm aware of file locking functions when we open a file ourselves... but what about the files that are locked by some other app..?
-------------------------------------------------
No me, no life.. know me, know life..
|
|
|
|
|
I try setting the top index of the listbox to be anything, and it stays at zero for some odd reason. This listbox has an image under it in order to allow mouse over event. Each item's height is 13.
void __fastcall TfmMain1::lbTitlesMouseMove(TObject *Sender,
TShiftState Shift, int X, int Y)
{
int position = (ScrollBox1->VertScrollBar->Position)/13;
Label1->Caption = position;
lbVisible->TopIndex = 1;
lbTitles->TopIndex = position;
}
|
|
|
|
|
Hello All,
I am overriding "virtual BOOL OnIdle(LONG lCount );" method in my application.
i think it should execute befor application start mean after initinstance and also at the idle time
but it is not executing in my application.
can any one tell me what i have to do for override this method.
please share your knowledge.
thanks
bankey
|
|
|
|
|
Your OnIdle never gets called?
Have you seen this? OnIdle Member Function[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
Hello, now i read that document also but i am still unable to gets called "onIdle" method can you tell what i have to do for that.
also i have another application in which, onIdle method gets called at the time of start application and end application i also i want that
please tell me where i am wrong......
|
|
|
|
|
If your OnIdle() override isn't getting called then I'd guess that your app is dialog based and
your main dialog is modal.
In that case, you need to use the undocumented WM_KICKIDLE message:
afx_msg LRESULT OnKickIdle(WPARAM wp, LPARAM lp);
#include <afxpriv.h>
ON_MESSAGE(WM_KICKIDLE,&CMyMainDlg::OnKickIdle)
LRESULT CMyMainDlg::OnKickIdle(WPARAM wParam, LPARAM lParam)
{
return 0;
}
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|