|
SeshaSridhar wrote: they should be opened in xml file format
What do you mean by that ? A csv file has a specific format, why do you want to "open it in xml format" ? This doesn't make a lot of sense to me...
|
|
|
|
|
|
Well, you still say exactly the same thing. What has xml to do here ? A csv file is not an xml file so if you try to parse it as an xml file, it will simply no work. It's a bit like trying to use a hammer to mow your grass...
So please, try to explain clearly what you are trying to do.
|
|
|
|
|
I think he might be saying he wants it to be displayed in a grid, like excel.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
But I still don't get it. Why do you have to use xml for that ? Or I am completely missing the point...
|
|
|
|
|
|
SeshaSridhar wrote: when .csv files are clicked they should be opened in xml file format
Read point #2 in the guidelines[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Can you give a sample csv file you want to read and how it should look in your tree control?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
My mistake, sorry. I read xls not xml.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
SeshaSridhar wrote: Please help me out.
With what? This is not a drive-thru code shack. If you want something, come inside and help cook it. There are plenty of people here to help you.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
could anybody please explain the concept of InitATL, wthat is it and why is it necessary? with the help of some example.
thanks in advance.
|
|
|
|
|
I suppose the clue is in the name.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Anjali Patil wrote: could anybody please explain the concept of InitATL...
Where did you find this?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Problem: Hi Iam using std::string to do all operations with string,
Now i want to support UNICODE how can i change it to UNICODE support.
Thanks in advance
----------------------------
KRISHNA KUMAR T M
|
|
|
|
|
std::string doesn't not support UNICODE. If you want to use unicode strings, you have to use std::wstring instead.
If you want support for both, you will need to define your own type, something like that:
#if defined _UNICODE || defined UNICODE
typedef std::wstring TMyString;
#else
typedef std::string TMyString;
#endif
And then everywhere in your code you use TMyString instead of std::string.
|
|
|
|
|
|
Hi,
I am working with COM dll resources. I have created a menu in a com dll and provided an interface with a method to return the handle to the menu.
When I am trying to pass this handle(converting to int) to CSingleDocTemplate of InitInstance() and trying to run the application, I am getting "Failed to create empty document".
My intention is to use the menu(resource) which is present in the com dll in my application.
In order to achieve this, is this the correct way of proceeding or not? If yes, where am I doing wrong?
If not, please suggest an alternative mechanism.
Thanks in advance.
Taruni
|
|
|
|
|
Hi! all
I was working on a project which is completed few weeks ago. This project was developed using Windows Form Application in Visual Studio 2005. We have some standard coding architecture on which we develop all projects.
There are some header files which need to be included in project.My task is to encode these header files so that any body can not directly access and change these files. I have tried to convert them in .lib and include it project but not successful yet.
So is there any way to protect these files, without any disturbance in project compilation. Can we convert these header files in .lib or encrypt them in other way.
Please help me.................
Thanks and regards,
Nitin
|
|
|
|
|
well, al I can think of is make them Read Only, put them on a CD, Store them on a Server with Readonly Access, Put dire consequences to unauthorized changes (e.g. Sacking on the Spot).
The header files contain the declarations etc that the compiler uses to build the symbol table to access objects correctly in the .lib files, so the Compiler MUST be able to read them, and encoding is therefore not an option.
Any programmes worth his salt should know that it is a BAD idea to change a header file belonging to a pre-compiled lib.
regards,
Bram van Kampen
|
|
|
|
|
|
I had to do this a while ago, and here's a snippet of code:
DWORD CNamedPipeServer::ServerThread ()
{
SECURITY_ATTRIBUTES sa;
SECURITY_DESCRIPTOR sd;
if (!InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION))
return 0;
SetSecurityDescriptorDacl (&sd, TRUE, NULL, FALSE);
sa.nLength = sizeof (sa);
sa.bInheritHandle = FALSE;
sa.lpSecurityDescriptor = &sd;
BOOL bLog = FALSE;
char pipename [512];
lstrcpy (pipename, "\\\\.\\pipe\\");
lstrcat (pipename, m_PipeName);
m_hPipe = ::CreateNamedPipe (pipename,
PIPE_ACCESS_DUPLEX | FILE_FLAG_WRITE_THROUGH | FILE_FLAG_OVERLAPPED,
PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT,
1, 0, 0, 100000, &sa);
if (m_hPipe == NULL)
{
TRACE1("Could not start '%s'\n", pipename);
return -1;
}
m_PipeName was the friendly part of the name. I'd use a GUID nowadays, but this was 8-years-ago-Iain. I would also do it unicode too...
To connect, just:
BOOL CNamedPipe::Open (LPCSTR szName, LPCSTR szMachine)
{
Close ();
m_dwError = ERROR_FILE_NOT_FOUND;
if (szName == NULL)
return FALSE;
CString tmp ("\\\\");
tmp += (szMachine && lstrlen (szMachine) > 1) ? szMachine : ".";
tmp += "\\pipe\\";
tmp += szName;
m_hPipe = ::CreateFile (tmp, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
if (m_hPipe == INVALID_HANDLE_VALUE)
{
m_dwError = ::GetLastError ();
return FALSE;
}
Where szName matches the server name, and szMachine is (oddly enough) the machine address. For initial debugging, maybe try a raw IP address?
My bet is that you'll need the blank security descriptor bit from above.
Iain.
|
|
|
|
|
Iain Clarke wrote: Where szName matches the server name, and szMachine is (oddly enough) the machine address. For initial debugging, maybe try a raw IP address
Worth a try if the security bit does not do the trick.
Iain Clarke wrote: My bet is that you'll need the blank security descriptor bit from above.
Well what you say seems to make sense. I used NULL for the Security Attribute Pointer. I put your bit in, and will try it tomorrow on the Network. I'll let you know how I get on. BTW Does this mean that the pipe this way is also potentially accessible from the Internet?
Thanks a Lot
Bram van Kampen
|
|
|
|
|
Bram van Kampen wrote: Does this mean that the pipe this way is also potentially accessible from the Internet?
Well, in the case I was working on the pipe was on a secondary PC, accessible only from a network between it and the primary PC. But as far as the pipe is concerned, it won't care how far a packet has to come. Your issues are more to do with firewalls and routing.
That said, I wouldn't dream of using a named pipe for working over the internet - just simply because of how flaky the big bad world is. Dropped connections, lags, etc. And windows only, I'd think (for all I know, someone has done a bang up job of writing a unix clone).
Iain.
|
|
|
|
|
Iain Clarke wrote: That said, I wouldn't dream of using a named pipe for working over the internet - just simply because of how flaky the big bad world is. Dropped connections, lags, etc. And windows only, I'd think (for all I know, someone has done a bang up job of writing a unix clone).
Exactly my concern. But, as you said, this is a Firewall Issue.
Tried your suggestion, and the error moved from 'cannot open pipe' to 'cannot read pipe'. so it appears to be the right path to a solution. The confusing thing is that all works propperly if ran on a single machine.
Thanks for your help.
Bram van Kampen
|
|
|
|
|
Having said the above,tried a lot of things.I am testing on a test site with 3 computers and no internet connection, No security risks, and No security impediments on the computer of any kind I'm aware off.Everybody is now signed on as administrator, Still, Pipes do not Work! Any Ideas, or should I re-design and implement on connection level.
Kind Regards,
Bram van Kampen
|
|
|
|