|
My application stores its installation path and various information in registry key. But it will be enough for me to find it once, that is at the application startup, in InitInstance() Later I will put this value in one variable and want to call it from various places depending on user's action, and certain events. Now what I do is I am reading that registry path every where throught the program (whenever the value is required)
I thought it would be a nice idea to have stored it in a global variable which would be accessible by all the c++ files.
Thanks for your explanation about naming conventions. I will certainly follow those.
Thanks and Regards,
Aljechin Alexander
|
|
|
|
|
when creating your application object, you could pass those datas as parameters to the constructor, couldn't you ?
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
Can you please tell how to do that? I do not know this. Can you show a small code snippet example? The information will be trivially helpful for me.
Thanks and Regards,
Aljechin Alexander
|
|
|
|
|
well, i think you application is a class, so it might have a constructor, and as a constructor is a function, you can pass parameters to it.
something like this:
InitInstance() {
MyApplication app(params);
}
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
Hi I am using MSchart control in vc.net...
my program goes like this...
double ChartArray __nogc[50][2];
{
......
ChartArray[k][1]= k;
ChartArray[k][2]=mse;
......
}
axMSChart1->set_ChartData(System::Convert::ToString(ChartArray));
//axMSChart1->ChartData = System::Convert::ToString(ChartArray);
when i assign the array to Chartdata, i encountered an error
"An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in axinterop.mschart20lib.dll
Additional information: Bad function argument"
Could anyone solve this problem
Thanks in advance
Salai
|
|
|
|
|
i dont know much about VC.NET but does System::Convert::ToString(ChartArray) return a array ?!?
-Prakash
|
|
|
|
|
I am working on an embedded device which
communicates with the computer with the help
of TCP/IP protocol.A TCP stack is embedded the device .
I want to send an ACK message from my application
to the device do u know anysuch example or so .
ACK is the low-level message send by TCP for acknoleging
the frame send by other device
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
why do you want to do that ?
the ACK is send by the protocol stack, if the protocol stack is not sending the ACK for some reason then that must be a bug in the stack.
-Prakash
|
|
|
|
|
that is for the reason
that my embedded device needs
that ack to move out of the loop.
its stack work in that fashon .
due to some reason the ack do not reach him
so i want to do that manually .
(Anyway we have to learn what going below the layers)
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
ok,
is the embedded code written by u? if yes, can you post that loop here?
-Prakash
|
|
|
|
|
Sorry prakash i have not written
the stack , its done by company &
its too big to understand .
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
Hi,
I am facing problem of calling NetMeeting conf.exe from windows service.
I have developed an application for service in vc++. Which internally calls conf.exe at the starting of service. When i am calling notepad.exe etc its running, but when i am calling conf.exe i can see conf.exe in taskmanager but it is not able to receive calls from another netmeeting application.
when i am running conf.exe individually its working.
plz help me to solve problem.
waiting 4 ur reply
bye
trinadh
|
|
|
|
|
Do you call conf exe from the "LocalService" or a user-account?
It might be that conf.exe changes its behaviour when called from a service.
Additionally, services are (generally) not allowed to directly interact with the user.
This limitation can be overcome. Im not sure why notepad works when called from a service, though.
Did you consider auto-starting a background process for the user instead?
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Thanks for giving reply, and sorry for delay
I am calling conf.exe in LocalService. I put access,launch and configuration permission default in dcomcnfg.
When i am calling simple exe's like notepad,simple vb application i can see that applications in taskmanager. I am writing log with vb application that its opening and closing properly or not and its writing log perfectly. But when i am calling conf.exe its also opening and i am able to see in taskmanager but its not able to accept call. I think conf.exe is not opened properly
trinadh
|
|
|
|
|
I believe that you need to make at least 1 click when launching netmeeting (accepting a connection or something), so that would mean, user interaction.
But, since the user cannot actually SEE that request, nothing would happen, since the user did not click "accept connection".
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
I found many libraries that parsing XML files but all of this use a standard approacing. Read the entire file in memory and parsing the tree. This is very expensive if the file is very big or if you lock far a minimal set of informations (for intance, suppose to check if in a 50Mb XML file exist a reference to a user "Donal Duck" ecc). Any people know a "parsing on the fly" library or class that parse a XML file but don't load the entire file in memory?
Thanks in advance and sorry for the poor english
|
|
|
|
|
Use the SAX API.
The samples/libraries you have been looking at appearantly uses DOM.
Kakan
|
|
|
|
|
To be more specific, you want to find a parser that *supports* the SAX API.
It isn't SAX exactly, but James Clark's expat supports a similar interface and is one of the earliest and IMO still one of the best XML parsers around. It's certainly very easy to use. You can get this on sourceforge.
Kev
|
|
|
|
|
lemur2 wrote: To be more specific, you want to find a parser that *supports* the SAX API.
Well...
It's pretty hard to to use the SAX API (as I suggested), if the parser in question doesn't support it
|
|
|
|
|
kakan wrote: Well...
It's pretty hard to to use the SAX API (as I suggested), if the parser in question doesn't support it
Oops, sorry - slipped into work document-reviewing-mode. Comment still stands though
K
|
|
|
|
|
I looking for a library working like:
ParseXMLFile(file...,callback )
{
while( scanning file...){
.....
callback.OnEnterNode( nodeName, attributes...)
....
.. processing XML formatting...
....
callback.OnExitNode( nodeName )
}
}
|
|
|
|
|
That's what (a parser with a) SAX-api does!
You register callbacks for the events you are interested of.
Then you call the parse() function in the parser, and it calls your callback functions when appropriate.
And it does this "on the fly", that is: while it's reading the XML file.
So it's exacly what you want!
You might be interested in checking MSXML out. It has got a SAX API.
There are heaps of samples how to use SAX on MSXML.
Kakan
|
|
|
|
|
I think MSXML supports both SAX and DOM way of parseing the xml file. It would be good thing to use unless you dont want to use COM in your application.
-Prakash
|
|
|
|
|
|
kakan wrote: Yes, it does.
thanx :->:->
-Prakash
|
|
|
|