|
Yes I agree, but my question was, if still would be useful to make code 4K aligned? It makes some improvement to run aligned code in XP or Vista? or depends on fat32 / NTFS?
Thanks for replying.
|
|
|
|
|
You just lose a few bytes in your executable size, that's it.
|
|
|
|
|
so, there's NO benefit in run time execution?
|
|
|
|
|
I played with this linker option some time ago, I couldn't see any difference in performance. This may be different for your code, just try it.
|
|
|
|
|
|
Actually i have build a small software. I want to make a setup file with all component file. I dont want to copy component file manually. Can any one HELP me to build SETUP file.
|
|
|
|
|
|
You can use
1. Inno Setup
2. Nullsoft installer
3. Installschield
you just google for this and you will get information on that.
Inno Setup/NullSoft installer are freewares and popular.
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
|
Hello,
I need to create ISAPI filter, but can't find its template in VS2005 C++ templates can I add it by any means or I have to get back to VC++ 6?
|
|
|
|
|
There is one in my VS2005 Professional
VC++/ATL/ATL Server Project
led mike
|
|
|
|
|
I saw a driver of a cdrom, witch simply transmit IRP_MJ_READ io request to default driver present by the os(calling IofCallDriver). but now, when an io request(IRP_MJ_READ) came, how the driver holds the read data?
I am sure the driver has done some tricks on the read data before returning the data to user application.
Regards,
|
|
|
|
|
If the driver is building its own IRP with IRP_MJ_CREATE before passing it to the lower driver, then that driver has surely supplied a local buffer to the lower driver when calling IoCallDriver. When the IRP returns, then the driver can access the read data through its supplied buffer. Is that what you mean?
|
|
|
|
|
This is a cdrom driver which was installed for the highest driver over the default one present by the os. In the driver, most of the IRP routine is just simply call IofCallDriver to transmit the IO request to lower driver. my question is that, the driver hasn't constructed a new irp before calling IofCallDriver.
The driver mainly perform decryption ops of the content of the discs. No matter you use a normal user mode app to read discs via ReadFile or just simply use windows Ctrl+C and Ctrl+V to copy and paste any file in the disc, the data read from the disc already is decrypted data.
So, i think the driver might use some special tricks to hold the data read by lower default driver and decrypted it just before the data would be returned to the user mode space. but the problem is, i am not a professional driver programmer but only know little about driver programming.
|
|
|
|
|
Hi all
First of all, this is my first time writing here, so please sorry if I do something wrong.
I am developing an application which takes a variable std::string and writes it to an std:fstream file. The string is in Spanish so it may have accents. The problem is that when I try to copy the string to the file, it does not copy the spanish accents. Do you have any idea of what I am doing wrong?
Please help me because this is quite urgent. Thanks in advance.
Regards,
Aitor
The code looks like this:
std::string plainText = receiveString()
printf(plainText.c_str)
std:fstream plainFile;
plainFile.open("c:\\test.txt");
plainFile << plainText << std::endl;
plainFile.close();
|
|
|
|
|
Member 4708544 wrote: urgent
This is not going to improve the response time here, rather the opposite.
Member 4708544 wrote: it does not copy the spanish accents
How do you determine this? What do the strings in the file look like?
Also, what is the locale (language setting) on your OS?
modified on Monday, October 13, 2008 5:34 AM
|
|
|
|
|
Hi Michael
First of all, thank you very much for your reply
Michael Schubert wrote: This is not going to accelerate the response time here, rather the opposite.
Sorry Michael. You know that this is my first time writing here and I just sayed that this question was urgent because it is really quite urgent (We have to deliver our application today. Actually, it was for last friday). Anyway, sorry.
Michael Schubert wrote: How do you determine this? What do the strings in the file look like?
It writes different things depending which letter has the accent. For example, instead of writing "qué" it writes "qu,". Instead of writing "pájaro", it writes "p jaro". Instead of writing "comíamos", it writes "com¡amos".
Michael Schubert wrote: Also, what is the locale (language setting) on your OS?
Spanish
Thanks Michael.
Regards,
Aitor
|
|
|
|
|
This program (I used VS2005) produces the two identical files os.txt, fp.txt, both containing the string with the accent.
#include <stdio.h>
#include <fstream>
#include <string>
using namespace std;
int main()
{
FILE * fp;
ofstream os;
fp = fopen("fp.txt", "w");
os.open("os.txt", ios::out);
fprintf(fp, "città\n");
os << "città" << endl;
fclose(fp);
os.close();
}
[added]
Fixed the formatting of the code snippet, thanks to Rajesh.
[/added]
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]
modified on Monday, October 13, 2008 7:32 AM
|
|
|
|
|
CPallini wrote: #include
#include
#include
The codez need fixzing.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Ooops. What a noob
Fixed, thank you pal.
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]
|
|
|
|
|
Wow! Some idiot voted you down.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: Wow! Some idiot voted you down.
...Kanine Krunchies shortage...
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]
|
|
|
|
|
Hi all
Thank you everyone for your replies, but unfortunately they could not help me to solve my problem. However, I have been trying different things, and now I have a new point of view of my problem.
The string I get from the "receiveString()" function comes from a ms-dos console (it is a client-server communication). The problem is that this console uses CP850 instead of CP1252, which is the correct one for Windows.
So, my new problem is, how do I convert a string with cp850 to another string with cp1252?
Thanks in advance.
Regards,
Aitor
|
|
|
|
|
You can use OemToChar() or OemToCharBuff() for this.
I should have noticed that it was a code page issue when you mentioned that it looks fine using printf() in a console window. D'oh...
|
|
|
|
|
Oh god! Thank you very much Michael! Several hours working on this and it the solution was just to add a line...
Anyway, now it works fine. Thanks again Michael!
Regards,
Aitor
|
|
|
|