|
Try ::mbtowcs
And be sure to read the texts about conversion linked in that MSDN-Article.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Have you considered the A2W() macro?
"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
|
|
|
|
|
thanks for ur help dears,
i solved the issue..
Born to win...!
|
|
|
|
|
jhwurmbach wrote: Try ::mbtowcs
little correction brother:- it is mbstowcs
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi guys
How to detect cd presence in CD Drive.if any code is available that is greatful.
Thnaks in advance
RYK
|
|
|
|
|
|
see if the following logic works.
say for exmple, your CD drive is "G"
_chdir("G:");
_findfirst();//not sure about the parameters. find them out. otherwise i have to refer my backups.
if find first detects something, then, cd is available.
otherwise not.
simple.
------------------------------------------------
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
What about a Blank CD is in? :P
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
|
Nelek wrote: What about a Blank CD is in?
humm than write it
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ufff... for that I have to code a film-download, save it and burn it... Im lazy :P
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Nelek wrote: ufff... for that I have to code a film-download, save it and burn it... Im lazy
for me game writing will do.. [ ]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
If you download and play with my article Detecting when Drives are added or removed[^], then you will have a handler for WM_DEVICECHANGE.
Putting a breakpoint in, I notice that WM_DEVICECHANGE gets called with a parameter of DBT_DEVICEARRIVAL when a CD is inserted, and the drive has spun up, and DBT_DEVICEREMOVECOMPLETE when the CD is ejected. Both of which I handle nicely!
Detecting if it's blank or not would be a different question, but my code will solve the problem you have.
Iain.
|
|
|
|
|
hi,
How to change text color color of menu ?
Thanks & Regards
|
|
|
|
|
|
thanks for your reply. it is also useful for me.
|
|
|
|
|
You're welcome.
|
|
|
|
|
Hi
I am trying to get list of import module names from PE file. But i can not find the solution.
This is my code:
CString CPE::GetImportModuleNames(CString str_SectionHdrName)<br />
{<br />
CString c;<br />
<br />
<br />
IMAGE_DOS_HEADER * dosheader=(IMAGE_DOS_HEADER *)g_pMappedFileBase;<br />
IMAGE_OPTIONAL_HEADER * opthdr =(IMAGE_OPTIONAL_HEADER *) <br />
((BYTE*)dosheader+dosheader->e_lfanew+24);<br />
<br />
IMAGE_IMPORT_DESCRIPTOR * descriptor=(IMAGE_IMPORT_DESCRIPTOR *)<br />
((BYTE*)dosheader+ <br />
opthdr->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);<br />
<br />
<br />
return c;<br />
}
In Documentation, it says:
" The IMAGE_IMPORT_DESCRIPTOR struct consists of five fields :
Union {
DWORD Characteristics;
PIMAGE_THUNK_DATA OriginalFirstThunk;
};
DWORD TimeDateStamp;
DWORD ForwarderChain;
DWORD Name;
PIMAGE_THUNK_DATA FirstThunk;"
...
"Name contains the a pointer (RVA) to the ASCII name of the DLL."
How can i retrieve the name of modules from that pointer(RVA).
Now i think i must write a loop and get the names but i couldn't do the the last step.
while(?)
{
descriptor->Name (?)
}
Could you please help me.
Thank you.
|
|
|
|
|
Hi serimcc,
serimcc wrote: I am trying to get list of import module names from PE file. But i can not find the solution.
Pietrek has placed his code for examining PE files on the web. The articles of interest are:
* An In-Depth Look into the Win32 Portable Executable File Format, Part 1
* An In-Depth Look into the Win32 Portable Executable File Format, Part 2
* What Goes On Inside Windows 2000: Solving the Mysteries of the Loader
I used them as a basis for a couple of article I wrote a while back...
Jeff
|
|
|
|
|
Thank you
I knew these articles. But i couldn't find the solution from Pietrek's articles.
I need only last step.
|
|
|
|
|
Im not sure see this[^] article is helpful for you.
|
|
|
|
|
Hi All,
Does anyone recall a good artilce on Reading and Writing Raw Sectors under the NT family?
Jeff
|
|
|
|
|
|
Hello,
I have a buffer that contains words. However, the words comes from a client. I just want to get the words out. However, the buffer is being filled with rubbish after the words. Example "Manchester United&^&*#&#&##^&#@*&^^ etc.
How can I just get "Manchester United" out?
I have used the following using length and substring, but it displays everything
<br />
char buffer[256]; <br />
sock.receiveFrom(buffer,sizeof(buffer), addr);<br />
std::string message = buffer;<br />
int strLength = 0;<br />
strLength = message.size();<br />
std::cout << "The length of the string is: " << strLength << std::endl;<br />
message = message.substr(0,strLength);<br />
std::cout << message;<br />
Many thanks,
Steve
|
|
|
|
|