|
yes the program are compiled and work as expect (I can input thai and arabic text in to database).
Only the file writing thing that didn't work.
|
|
|
|
|
You have to use binary mode to open the Unicode file.
Reference:
www.gamedev.net/community/forums/topic.asp?topic_id=362755
Maxwell Chen
|
|
|
|
|
Hi Experts,
How can I use detailed view in CListView?
|
|
|
|
|
|
You have to set the report view style, LVS_REPORT.
|
|
|
|
|
i have a class as mentioned below.The size of the class is only 16.Can anybody give me an explanation for this.Is this because of padding
class EXP
{
char c1;
char c2;
int i1;
int i2;
char *ptr;
static int mem;
};
THANKS IN ADVANCE
|
|
|
|
|
There are "paddings " between some members of a structure. This is for convenience for the CPU to access. But you can change the padding size.
To view the positions and the sizes of paddings, you can list the addresses of each members as below.
EXP obj;
printf("obj.c1: 0x%p \nobj.c2: 0x%p \nobj.i1: 0x%p \n", &obj.c1, &obj.c2, &obj.i1);
Maxwell Chen
|
|
|
|
|
|
Hi,
I am trying to open a file, whose name is in UNICODE string with a Byte-order Mark (BOM). How do I open such files? The CFile class fails to recognize such a name.
Thank you.
AJ
|
|
|
|
|
#include <fstream>
wchar_t file_name[] = L"hello.txt";
std::wfstream f(file_name, std::ios::in | std::ios::out);
Maxwell Chen
modified on Thursday, December 27, 2007 4:01:06 AM
|
|
|
|
|
Thank you for your reply. But an existing file with Byte-order Mark (Ex: FFFE), will not open with the above code.
|
|
|
|
|
Ajay L D wrote: But an existing file with Byte-order Mark (Ex: FFFE), will not open with the above code.
I just made a file with the mark EF BB BF in the beginning three bytes of the content, and the content is in Chinese. I use the below code, and it can open and load data into fstream variable. (Sorry for my typo in last reply. Note the "w" of the type name.)
std::wifstream file(file_name, std::ios::in | std::ios::binary);
12-27 05:12 pm> The content loaded is incorrect...
12-27 06:10 pm> Oh you have to use binary mode to open Unicode files.
Reference:
www.gamedev.net/community/forums/topic.asp?topic_id=362755
Maxwell Chen
modified on Thursday, December 27, 2007 5:11:48 AM
|
|
|
|
|
hello,
i am created client/server application,in server iam taking video file from the hard disk then sending to client.In client side i am reciving video data and writing into file(test.m4v) then doing decompressio,rendering using AVCODEC lib funtions.(in windows using vc++)
now i am trying without writing into file(test.m4v)directly can i take buffer then decompress it and render it.
tell me what i have to do.
thanks
AMK
|
|
|
|
|
Hi Experts,
How can I create a shell context menu for files,folders,drives and recycle bin? what is the steps I have to follow?
Thanx in advance.
|
|
|
|
|
|
Hello Friends,
I developed a SDI application,in that i splitted the window.
ie:one view & 3 forms.
In one of the my form created a button as Preview.
Im calling printpreview from main window.using CView::OnFile......
But it hangs, can anybody tell mr how to do it.
thanks in advance.
Reagards
Shiva
|
|
|
|
|
When you create SDI/MDI with FormView using wizard, it will tell FormView can use printing support (Maybe that's the problem).
If I am not wrong, there is tutorial how to use print (form view) in code project.
Good Luck
|
|
|
|
|
I created the SDI with the simple View as base class.
I added the forms to it.
But I want to call the OnFilePrintpreview from one of the forms.
One more thing : I want to preview the content of only simple view
not form..
Reagards
Shiva
|
|
|
|
|
See this[^] does any help?
|
|
|
|
|
I can use classwizard->message Maps->message add OnInitDialog,
but in vc8:dialog property->message, no WM_INITDIALOG, why?
|
|
|
|
|
I believe MSFT changed it to Virtual Function since VC6. Check in the Overrides tab.
If it is changed in VC6, I dont know why it's still showing as message map, Anyway it will not make any entries in you message map even if add the message handler
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
See if this helps.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Gents,
now a more serious question.
There is a small application i would like to trick, it opens up the log file with CreateFileA and
uses WriteFile from application.dll file to store the data.
I have already injected my dll into the exe file, and i am able to catch and replace the
CreateFileA - so that i am not pointing to create a filename but i wanted to redirect the
WriteFile entries to the named pipe.
Looks good, the pipe is created but no data is being sent out - i believe because WriteFile is invoked not from exe file, but from application.dll.
Is there any chance for me to hook into that WriteFile ?
Ps.
I thought that when CreateFile is pointed to pipe, the WriteFile also will store the data there via the Handle..even if invoked from separate dll.
|
|
|
|
|
Sometimes this article can help you out: API Hooking Revealed[^]
If you have copy of Programming Application for Windows by Jeffery Richter, it clearly explains about DLL Injection and API Hooking.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Sarath,
thats great, but please read my question.
When a program uses CreateFile from itself ( exe ) - i am unable to hook into that (CreateFile).
When it uses a WriteFile ( which is in application.dll ) i am unable to hook ?
Seems like when a Api call is used by the DLL not EXE, hooking is not possible?
Is there any difference ?
|
|
|
|